Package inra.ijpb.binary.distmap
Class ChamferMask3DW6
java.lang.Object
inra.ijpb.binary.distmap.ChamferMask3D
inra.ijpb.binary.distmap.ChamferMask3DW6
public class ChamferMask3DW6 extends ChamferMask3D
Implementation of Chamfer Weights for 3D images that manages six types of
offsets (all the possibilities in a 5-by-5-by-5 neighborhood).
Offsets correspond to:
- orthogonal neighbors
- square-diagonal neighbors
- cube-diagonal neighbors
- shift by a permutation of (+/-1, +/-1, +/-2)
- shift by a permutation of (+/-1, +/-1, +/-2)
- Author:
- dlegland
- See Also:
ChamferMask3DW3,ChamferMask3DW3Float
-
Nested Class Summary
Nested classes/interfaces inherited from class inra.ijpb.binary.distmap.ChamferMask3D
ChamferMask3D.FloatOffset, ChamferMask3D.ShortOffset -
Field Summary
Fields inherited from class inra.ijpb.binary.distmap.ChamferMask3D
BORGEFORS, CHESSBOARD, CITY_BLOCK, QUASI_EUCLIDEAN, SVENSSON_3_4_5_7 -
Constructor Summary
Constructors Constructor Description ChamferMask3DW6(int a, int b, int c, int d, int e, int f)Creates a new ChamferWeights3D object by specifying the weights associated to the six different kind of offsets.ChamferMask3DW6(short[] weights)Creates a new ChamferWeights3D object by specifying the four weights associated to the four different kind of offsets. -
Method Summary
Modifier and Type Method Description java.util.Collection<ChamferMask3D.ShortOffset>getBackwardOffsets()java.util.Collection<ChamferMask3D.ShortOffset>getForwardOffsets()shortgetShortNormalizationWeight()Methods inherited from class inra.ijpb.binary.distmap.ChamferMask3D
fromWeights, fromWeights, fromWeights, getBackwardFloatOffsets, getFloatOffsets, getForwardFloatOffsets, getNormalizationWeight, getOffsetsMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ChamferMask3DW6
public ChamferMask3DW6(int a, int b, int c, int d, int e, int f)Creates a new ChamferWeights3D object by specifying the weights associated to the six different kind of offsets. Notations are from Svensson and Borgefors.- Parameters:
a- the weight associated to orthogonal neighborsb- the weight associated to square-diagonal neighborsc- the weight associated to cube-diagonal neighborsd- the weight associated to permutations of (2, 1, 0)e- the weight associated to permutations of (2, 1, 1)f- the weight associated to permutations of (2, 2, 1)
-
ChamferMask3DW6
public ChamferMask3DW6(short[] weights)Creates a new ChamferWeights3D object by specifying the four weights associated to the four different kind of offsets.- Parameters:
weights- the weights associated to the different types of neighbors
-
-
Method Details
-
getForwardOffsets
- Specified by:
getForwardOffsetsin classChamferMask3D- Returns:
- the set of offsets defined by this ChamferWeights3D for forward iteration using integer weights.
-
getBackwardOffsets
- Specified by:
getBackwardOffsetsin classChamferMask3D- Returns:
- the set of offsets defined by this ChamferWeights3D for backward iteration using integer weights.
-
getShortNormalizationWeight
public short getShortNormalizationWeight()- Specified by:
getShortNormalizationWeightin classChamferMask3D- Returns:
- the weight associated to orthogonal offsets, that can be used to normalize the distance map.
-