Package inra.ijpb.measure.region2d
Class RegionAnalyzer2D<T>
java.lang.Object
inra.ijpb.algo.AlgoStub
inra.ijpb.measure.region2d.RegionAnalyzer2D<T>
- Type Parameters:
T
- the type of the data computed for each region. May be a class instance, or a single Numeric type.
- All Implemented Interfaces:
Algo
,RegionAnalyzer<T>
- Direct Known Subclasses:
AverageThickness
,BoundingBox
,Centroid
,Convexity
,EquivalentEllipse
,GeodesicDiameter
,InertiaEllipse
,IntrinsicVolumesAnalyzer2D
,LargestInscribedCircle
,MaxFeretDiameter
,OrientedBoundingBox2D
public abstract class RegionAnalyzer2D<T> extends AlgoStub implements RegionAnalyzer<T>
Base implementation of RegionAnalyzer interface for planar binary/label
images.
- Author:
- dlegland
- See Also:
RegionAnalyzer3D
-
Constructor Summary
Constructors Constructor Description RegionAnalyzer2D()
-
Method Summary
Modifier and Type Method Description java.util.Map<java.lang.Integer,T>
analyzeRegions(ij.ImagePlus labelPlus)
Default implementation of the analyzeRegions method, that calls the more specializedanalyzeRegions(ImageProcessor, int[], Calibration)
method and transforms the result into a map.abstract T[]
analyzeRegions(ij.process.ImageProcessor image, int[] labels, ij.measure.Calibration calib)
Computes an instance of the generic type T for each region in input label image.java.util.Map<java.lang.Integer,T>
analyzeRegions(ij.process.ImageProcessor image, ij.measure.Calibration calib)
Identifies labels within image and computes an instance of the generic type T for each region in input label image.ij.measure.ResultsTable
computeTable(ij.ImagePlus labelPlus)
Default implementation of computeTable method, using the two other methodsanalyzeRegions(ImagePlus)
andRegionAnalyzer.createTable(Map)
: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
Methods inherited from interface inra.ijpb.measure.RegionAnalyzer
createTable
-
Constructor Details
-
RegionAnalyzer2D
public RegionAnalyzer2D()
-
-
Method Details
-
analyzeRegions
public abstract T[] analyzeRegions(ij.process.ImageProcessor image, int[] labels, ij.measure.Calibration calib)Computes an instance of the generic type T for each region in input label image.- Parameters:
image
- the input image containing label of particleslabels
- the array of labels within the imagecalib
- the spatial calibration of the image- Returns:
- an array of the type used to represent the analysis result of each region
-
analyzeRegions
public java.util.Map<java.lang.Integer,T> analyzeRegions(ij.process.ImageProcessor image, ij.measure.Calibration calib)Identifies labels within image and computes an instance of the generic type T for each region in input label image.- Parameters:
image
- a label image (8, 16 or 32 bits)calib
- the spatial calibration of the image- Returns:
- a map between the region label and the result of analysis for each region
-
analyzeRegions
Default implementation of the analyzeRegions method, that calls the more specializedanalyzeRegions(ImageProcessor, int[], Calibration)
method and transforms the result into a map.- Specified by:
analyzeRegions
in interfaceRegionAnalyzer<T>
- Parameters:
labelPlus
- the input image containing label of regions- Returns:
- the mapping between region label and result of analysis for each region
-
computeTable
public ij.measure.ResultsTable computeTable(ij.ImagePlus labelPlus)Default implementation of computeTable method, using the two other methodsanalyzeRegions(ImagePlus)
andRegionAnalyzer.createTable(Map)
:- Specified by:
computeTable
in interfaceRegionAnalyzer<T>
- Parameters:
labelPlus
- a label or binary image of region(s)- Returns:
- an instance of ResultsTable containing results presented in a tabular format.
-