Class ChamferMask3DW4

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

public class ChamferMask3DW4
extends ChamferMask3D
Implementation of Chamfer Weights for 3D images that manages four types of offsets. Offsets correspond to:
  • orthogonal neighbors
  • square-diagonal neighbors
  • cube-diagonal neighbors
  • shift by a permutation of (+/-1, +/-1, +/-2)
Author:
dlegland
See Also:
ChamferMask3DW3, ChamferMask3DW3Float
  • Constructor Details

    • ChamferMask3DW4

      public ChamferMask3DW4​(int a, int b, int c, int e)
      Creates a new ChamferWeights3D object by specifying the four weights associated to the four different kind of offsets. Notations are from Svensson and Borgefors.
      Parameters:
      a - the weight associated to orthogonal neighbors
      b - the weight associated to square-diagonal neighbors
      c - the weight associated to cube-diagonal neighbors
      e - the weight associated to (1,1,2) vectors and its permutations and symmetries
    • ChamferMask3DW4

      public ChamferMask3DW4​(short[] weights)
      Creates a new ChamferWeights3D object by specifying the four weights associated to the four different kind of offsets. Notations are from Svensson and Borgefors.
      Parameters:
      weights - the weight associated to the four different kind of offsets.
  • 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.