Package inra.ijpb.measure.region3d
Class MaxFeretDiameter3D
java.lang.Object
inra.ijpb.algo.AlgoStub
inra.ijpb.measure.region3d.RegionAnalyzer3D<PointPair3D>
inra.ijpb.measure.region3d.MaxFeretDiameter3D
- All Implemented Interfaces:
Algo
,AlgoListener
,RegionAnalyzer<PointPair3D>
public class MaxFeretDiameter3D extends RegionAnalyzer3D<PointPair3D>
Computes maximum Feret Diameter for each region of a 3D binary or label
image.
- Author:
- dlegland
- See Also:
MaxFeretDiameter
-
Constructor Summary
Constructors Constructor Description MaxFeretDiameter3D()
Default constructor -
Method Summary
Modifier and Type Method Description PointPair3D[]
analyzeRegions(ij.ImageStack 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,PointPair3D> maxDiamsMap)
Converts the result of maximum Feret diameters computation to a ResultsTable that can be displayed within ImageJ.static PointPair3D
maxFeretDiameter(java.util.ArrayList<? extends Point3D> points)
Computes Maximum Feret diameter of a set of points.static PointPair3D[]
maxFeretDiameters(ij.ImageStack image, int[] labels, ij.measure.Calibration calib)
Computes Feret diameters as a PointPair3D for each of the specified regions within a label map.Methods inherited from class inra.ijpb.measure.region3d.RegionAnalyzer3D
algoProgressChanged, algoStatusChanged, analyzeRegions, analyzeRegions, computeTable, createMap
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
-
MaxFeretDiameter3D
public MaxFeretDiameter3D()Default constructor
-
-
Method Details
-
maxFeretDiameters
public static final PointPair3D[] maxFeretDiameters(ij.ImageStack image, int[] labels, ij.measure.Calibration calib)Computes Feret diameters as a PointPair3D for each of the specified regions within a label map.- Parameters:
image
- the 3D label map corresponding to the label imagelabels
- the array of region labels to processcalib
- the spatial calibration of the image- Returns:
- the array of 3D Feret diameter results
-
maxFeretDiameter
Computes Maximum Feret diameter of a set of points. Note: it is often a good idea to compute convex hull before computing Feret diameter.- Parameters:
points
- a collection of planar points- Returns:
- the maximum Feret diameter of the point set
-
createTable
public ij.measure.ResultsTable createTable(java.util.Map<java.lang.Integer,PointPair3D> maxDiamsMap)Converts the result of maximum Feret diameters computation to a ResultsTable that can be displayed within ImageJ.- Parameters:
maxDiamsMap
- the map of PointPair3D for each label within a label image- Returns:
- a ResultsTable instance
-
analyzeRegions
public PointPair3D[] analyzeRegions(ij.ImageStack 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 classRegionAnalyzer3D<PointPair3D>
- 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 PointPair3D representing the coordinates of extreme points, in calibrated coordinates.
-