Class ChamferMask3DW3

java.lang.Object
inra.ijpb.binary.distmap.ChamferMask3D
inra.ijpb.binary.distmap.ChamferMask3DW3

public class ChamferMask3DW3
extends ChamferMask3D
Implementation of Chamfer Weights for 3D images that manages three type offset types, corresponding to orthogonal, square-diagonal and cube-diagonal neighbors. By default, computation is performed using integers.
Author:
dlegland
See Also:
ChamferMask3DW3Float, ChamferMask3DW4
  • Constructor Details

    • ChamferMask3DW3

      public ChamferMask3DW3​(int w0, int w1, int w2)
      Creates a new ChamferWeights3D object by specifying the weights associated to orthogonal, square-diagonal and cube-diagonal neighbors, respectively.
      Parameters:
      w0 - the weight associated to orthogonal neighbors
      w1 - the weight associated to square-diagonal neighbors
      w2 - the weight associated to cube-diagonal neighbors
    • ChamferMask3DW3

      public ChamferMask3DW3​(short[] weights)
      Creates a new ChamferMask3D object by specifying the weights associated to orthogonal and diagonal neighbors.
      Parameters:
      weights - the weights associated to the different types of offset
  • Method Details

    • getForwardOffsets

      public java.util.Collection<ChamferMask3D.ShortOffset> getForwardOffsets()
      Specified by:
      getForwardOffsets in class ChamferMask3D
      Returns:
      the set of offsets defined by this ChamferWeights3D for forward iteration using integer weights.
    • getBackwardOffsets

      public java.util.Collection<ChamferMask3D.ShortOffset> getBackwardOffsets()
      Specified by:
      getBackwardOffsets in class ChamferMask3D
      Returns:
      the set of offsets defined by this ChamferWeights3D for backward iteration using integer weights.
    • getShortNormalizationWeight

      public short getShortNormalizationWeight()
      Specified by:
      getShortNormalizationWeight in class ChamferMask3D
      Returns:
      the weight associated to orthogonal offsets, that can be used to normalize the distance map.