Package inra.ijpb.measure.region2d
Class AverageThickness
java.lang.Object
inra.ijpb.algo.AlgoStub
inra.ijpb.measure.region2d.RegionAnalyzer2D<AverageThickness.Result>
inra.ijpb.measure.region2d.AverageThickness
- All Implemented Interfaces:
Algo
,RegionAnalyzer<AverageThickness.Result>
public class AverageThickness extends RegionAnalyzer2D<AverageThickness.Result>
Compute average thickness of a binary region, or of each region in a label image.
The average thickness is computed by:
- computing the skeleton of the binary region,
- computing the distance map of each foreground pixel of the original binary region,
- measuring the value in the distance map for each pixel of the skeleton,
- computing the average.
- Author:
- dlegland
- See Also:
ImageJSkeleton
,DistanceTransform2D
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
AverageThickness.Result
Inner class used for representing results of average thickness computations. -
Constructor Summary
Constructors Constructor Description AverageThickness()
-
Method Summary
Modifier and Type Method Description AverageThickness.Result[]
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.ij.measure.ResultsTable
createTable(java.util.Map<java.lang.Integer,AverageThickness.Result> results)
Utility method that converts the detailed results of theRegionAnalyzer.analyzeRegions(ImagePlus)
method into an instance of ResultsTable to facilitate display by ImageJ.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
-
AverageThickness
public AverageThickness()
-
-
Method Details
-
createTable
public ij.measure.ResultsTable createTable(java.util.Map<java.lang.Integer,AverageThickness.Result> results)Description copied from interface:RegionAnalyzer
Utility method that converts the detailed results of theRegionAnalyzer.analyzeRegions(ImagePlus)
method into an instance of ResultsTable to facilitate display by ImageJ.- Parameters:
results
- the mapping between each region label and the result of the analysis- Returns:
- an instance of ResultsTable containing results presented in a tabular format.
-
analyzeRegions
public AverageThickness.Result[] analyzeRegions(ij.process.ImageProcessor image, int[] labels, ij.measure.Calibration calib)Description copied from class:RegionAnalyzer2D
Computes an instance of the generic type T for each region in input label image.- Specified by:
analyzeRegions
in classRegionAnalyzer2D<AverageThickness.Result>
- 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
-