Package inra.ijpb.label.filter
Class ChamferLabelDilation2DShort
java.lang.Object
inra.ijpb.algo.AlgoStub
inra.ijpb.label.filter.ChamferLabelDilation2DShort
- All Implemented Interfaces:
Algo
public class ChamferLabelDilation2DShort extends AlgoStub
Apply a dilation by a specified radius to each label of a label map by
constraining the dilation. Labels can not dilate over existing labels.
Can be applied to label map encoded with 8 or 16 bits integers, or 32 bit
floats.
- Author:
- dlegland
- See Also:
ChamferMask2D
,ChamferLabelDilation3DShort
-
Constructor Summary
Constructors Constructor Description ChamferLabelDilation2DShort(ChamferMask2D mask, double radius)
Creates a new image processor for dilating labels using the specified chamfer mask, using 16-bits integer computation. -
Method Summary
Modifier and Type Method Description ij.process.ImageProcessor
process(ij.process.ImageProcessor labelImage)
Computes dilation of labels within label image by a specified radius.Methods inherited from class inra.ijpb.algo.AlgoStub
addAlgoListener, removeAlgoListener
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ChamferLabelDilation2DShort
Creates a new image processor for dilating labels using the specified chamfer mask, using 16-bits integer computation.- Parameters:
mask
- the Chamfer mask to use.radius
- the radius of dilation of labels. In practice, the distance is propagated up to radius + 0.5.
-
-
Method Details
-
process
public ij.process.ImageProcessor process(ij.process.ImageProcessor labelImage)Computes dilation of labels within label image by a specified radius. Labels can not dilate over existing labels. The function returns a new ImageProcessor the same size and the same type as the input, with values greater than or equal to zero.- Parameters:
labelImage
- the original label map- Returns:
- a new label image where each label is dilated over background pixels.
-