Class BinaryThinning.Mask

    • Constructor Summary

      Constructors 
      Constructor Description
      Mask​(byte[] mask)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void apply​(org.ddogleg.struct.GrowQueue_I32 onesIn, org.ddogleg.struct.GrowQueue_I32 onesOut, org.ddogleg.struct.GrowQueue_I32 zerosOut)  
      protected boolean borderMask​(int cx, int cy)
      Slower code which uses a generic mask to handle image border
      protected abstract boolean innerMask​(int indexIn)
      Specialized code optimized for the inner image
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Mask

        public Mask​(byte[] mask)
    • Method Detail

      • apply

        public void apply​(org.ddogleg.struct.GrowQueue_I32 onesIn,
                          org.ddogleg.struct.GrowQueue_I32 onesOut,
                          org.ddogleg.struct.GrowQueue_I32 zerosOut)
        Parameters:
        onesIn - (input) Indexes of pixels with a value of 1
        onesOut - (output) Indexes of pixels with a value of 1 after the mask is applied
        zerosOut - (output) Indexes of pixels whose values have changed form 1 to 0
      • borderMask

        protected boolean borderMask​(int cx,
                                     int cy)
        Slower code which uses a generic mask to handle image border
        Parameters:
        cx - x-coordinate of center pixels, always 1
        cy - y-coordinate of center pixels, always 1
        Returns:
        true means the pixels keeps the value of one, otherwise it is set to zero
      • innerMask

        protected abstract boolean innerMask​(int indexIn)
        Specialized code optimized for the inner image
        Parameters:
        indexIn - Index of center pixels, always 1
        Returns:
        true means the pixels keeps the value of one, otherwise it is set to zero