Class ChamferMask3DW3Float

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

public class ChamferMask3DW3Float
extends ChamferMask3D
Implementation of Chamfer Weights for 3D images that manages three types of offsets, corresponding to orthogonal, square-diagonal and cube-diagonal neighbors. This implementation manages two series of weights, one for integer computation, the other one for floating-point computation.
Author:
dlegland
See Also:
ChamferMask3DW3, ChamferMask3DW4
  • Constructor Details

    • ChamferMask3DW3Float

      public ChamferMask3DW3Float​(short[] shortWeights, float[] floatWeights)
      Creates a new chamfer mask
      Parameters:
      shortWeights - the offset weights used for integer computations
      floatWeights - the offset weights used for floating-point computations
  • 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.
    • getForwardFloatOffsets

      public java.util.Collection<ChamferMask3D.FloatOffset> getForwardFloatOffsets()
      Overrides:
      getForwardFloatOffsets in class ChamferMask3D
      Returns:
      the set of offsets defined by this ChamferWeights3D for forward iteration using floating-point weights.
    • getBackwardFloatOffsets

      public java.util.Collection<ChamferMask3D.FloatOffset> getBackwardFloatOffsets()
      Overrides:
      getBackwardFloatOffsets in class ChamferMask3D
      Returns:
      the set of offsets defined by this ChamferWeights3D for backward iteration using floating-point weights.
    • getNormalizationWeight

      public double getNormalizationWeight()
      Overrides:
      getNormalizationWeight in class ChamferMask3D
      Returns:
      the weight associated to orthogonal offsets, that can be used to normalize the distance map.
    • 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.