Package inra.ijpb.binary.distmap
Class ChamferMask2DW2Float
java.lang.Object
inra.ijpb.binary.distmap.ChamferMask2D
inra.ijpb.binary.distmap.ChamferMask2DW2Float
public class ChamferMask2DW2Float extends ChamferMask2D
Implementation of Chamfer Weights that manages two types of offsets,
corresponding to orthogonal, and 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
-
Nested Class Summary
Nested classes/interfaces inherited from class inra.ijpb.binary.distmap.ChamferMask2D
ChamferMask2D.FloatOffset, ChamferMask2D.ShortOffset
-
Field Summary
Fields inherited from class inra.ijpb.binary.distmap.ChamferMask2D
BORGEFORS, CHESSBOARD, CHESSKNIGHT, CITY_BLOCK, QUASI_EUCLIDEAN, VERWER
-
Constructor Summary
Constructors Constructor Description ChamferMask2DW2Float(short[] shortWeights, float[] floatWeights)
Creates a new chamfer mask -
Method Summary
Modifier and Type Method Description java.util.Collection<ChamferMask2D.FloatOffset>
getBackwardFloatOffsets()
java.util.Collection<ChamferMask2D.ShortOffset>
getBackwardOffsets()
java.util.Collection<ChamferMask2D.FloatOffset>
getForwardFloatOffsets()
java.util.Collection<ChamferMask2D.ShortOffset>
getForwardOffsets()
double
getNormalizationWeight()
short
getShortNormalizationWeight()
Methods inherited from class inra.ijpb.binary.distmap.ChamferMask2D
fromWeights, fromWeights, fromWeights, getFloatOffsets, getOffsets
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ChamferMask2DW2Float
public ChamferMask2DW2Float(short[] shortWeights, float[] floatWeights)Creates a new chamfer mask- Parameters:
shortWeights
- the offset weights used for integer computationsfloatWeights
- the offset weights used for floating-point computations
-
-
Method Details
-
getForwardOffsets
- Specified by:
getForwardOffsets
in classChamferMask2D
- Returns:
- the set of offsets defined by this ChamferMask2D for forward iteration using integer weights.
-
getBackwardOffsets
- Specified by:
getBackwardOffsets
in classChamferMask2D
- Returns:
- the set of offsets defined by this ChamferMask2D for backward iteration using integer weights.
-
getForwardFloatOffsets
- Overrides:
getForwardFloatOffsets
in classChamferMask2D
- Returns:
- the set of offsets defined by this ChamferMask2D for forward iteration using floating-point weights.
-
getBackwardFloatOffsets
- Overrides:
getBackwardFloatOffsets
in classChamferMask2D
- Returns:
- the set of offsets defined by this ChamferMask2D for backward iteration using floating-point weights.
-
getNormalizationWeight
public double getNormalizationWeight()- Overrides:
getNormalizationWeight
in classChamferMask2D
- Returns:
- the weight associated to orthogonal offsets, that can be used to normalize the distance map.
-
getShortNormalizationWeight
public short getShortNormalizationWeight()- Specified by:
getShortNormalizationWeight
in classChamferMask2D
- Returns:
- the weight associated to orthogonal offsets, that can be used to normalize the distance map.
-