Package inra.ijpb.measure.region2d
Class MaxFeretDiameter
java.lang.Object
inra.ijpb.algo.AlgoStub
inra.ijpb.measure.region2d.RegionAnalyzer2D<PointPair2D>
inra.ijpb.measure.region2d.MaxFeretDiameter
- All Implemented Interfaces:
Algo
,RegionAnalyzer<PointPair2D>
public class MaxFeretDiameter extends RegionAnalyzer2D<PointPair2D>
Computes maximum Feret Diameter for each region of a binary or label image.
- Author:
- dlegland
- See Also:
MaxFeretDiameter3D
-
Constructor Summary
Constructors Constructor Description MaxFeretDiameter()
Default constructor -
Method Summary
Modifier and Type Method Description PointPair2D
analyzeBinary(ij.process.ImageProcessor image, double[] calib)
Computes Maximum Feret diameter from a single region in a binary image.PointPair2D[]
analyzeRegions(ij.process.ImageProcessor image, int[] labels, ij.measure.Calibration calib)
Computes maximum Feret Diameter for each label of the input label image.ij.measure.ResultsTable
createTable(java.util.Map<java.lang.Integer,PointPair2D> maxDiamsMap)
Converts the result of maximum Feret diameters computation to a ResultsTable that can be displayed within ImageJ.static PointPair2D[]
maxFeretDiameters(ij.process.ImageProcessor image, int[] labels, ij.measure.Calibration calib)
Computes Feret diameters as a PointPair2D for each of the specified regions within a label map.Methods inherited from class inra.ijpb.measure.region2d.RegionAnalyzer2D
analyzeRegions, analyzeRegions, computeTable
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
-
MaxFeretDiameter
public MaxFeretDiameter()Default constructor
-
-
Method Details
-
maxFeretDiameters
public static final PointPair2D[] maxFeretDiameters(ij.process.ImageProcessor image, int[] labels, ij.measure.Calibration calib)Computes Feret diameters as a PointPair2D for each of the specified regions within a label map.- Parameters:
image
- the label map corresponding to the label imagelabels
- the array of region labels to processcalib
- the spatial calibration of the image- Returns:
- the array of Feret diameter results
-
createTable
public ij.measure.ResultsTable createTable(java.util.Map<java.lang.Integer,PointPair2D> maxDiamsMap)Converts the result of maximum Feret diameters computation to a ResultsTable that can be displayed within ImageJ.- Parameters:
maxDiamsMap
- the map of PointPair2D for each label within a label image- Returns:
- a ResultsTable instance
-
analyzeRegions
public PointPair2D[] analyzeRegions(ij.process.ImageProcessor image, int[] labels, ij.measure.Calibration calib)Computes maximum Feret Diameter for each label of the input label image. Computes diameter between corners of image pixels, so the result is always greater than or equal to one.- Specified by:
analyzeRegions
in classRegionAnalyzer2D<PointPair2D>
- Parameters:
image
- a label image (8, 16 or 32 bits)labels
- the set of labels within the imagecalib
- the spatial calibration of the image- Returns:
- an array of PointPair2D representing the coordinates of extreme points, in calibrated coordinates.
-
analyzeBinary
Computes Maximum Feret diameter from a single region in a binary image. Computes diameter between corners of image pixels, so the result is always greater than or equal to one.- Parameters:
image
- a binary image representing the particle.calib
- the spatial calibration- Returns:
- the maximum Feret diameter of the binary region
-