Package inra.ijpb.measure.region2d
Class IntrinsicVolumesAnalyzer2D
java.lang.Object
inra.ijpb.algo.AlgoStub
inra.ijpb.measure.region2d.RegionAnalyzer2D<IntrinsicVolumesAnalyzer2D.Result>
inra.ijpb.measure.region2d.IntrinsicVolumesAnalyzer2D
- All Implemented Interfaces:
Algo
,AlgoListener
,RegionAnalyzer<IntrinsicVolumesAnalyzer2D.Result>
public class IntrinsicVolumesAnalyzer2D extends RegionAnalyzer2D<IntrinsicVolumesAnalyzer2D.Result> implements AlgoListener
Computation of intrinsic volumes (area, perimeter and Euler number) for
binary or label 2D images.
- Author:
- dlegland
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
IntrinsicVolumesAnalyzer2D.Result
Inner class for storing results. -
Constructor Summary
Constructors Constructor Description IntrinsicVolumesAnalyzer2D()
Default empty constructor. -
Method Summary
Modifier and Type Method Description void
algoProgressChanged(AlgoEvent evt)
The method devoted to manage the change in the progression of the algorithm.void
algoStatusChanged(AlgoEvent evt)
The method devoted to manage the change in the status of the algorithm.IntrinsicVolumesAnalyzer2D.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.static double[]
areaLut(ij.measure.Calibration calib)
Deprecated.use IntrinsicVolumes2DUtils insteadstatic double[]
computeCircularities(IntrinsicVolumesAnalyzer2D.Result[] morphos)
Deprecated.ij.measure.ResultsTable
createTable(java.util.Map<java.lang.Integer,IntrinsicVolumesAnalyzer2D.Result> results)
Utility method that converts the detailed results of theRegionAnalyzer.analyzeRegions(ImagePlus)
method into an instance of ResultsTable to facilitate display by ImageJ.static int[]
eulerNumberIntLut(int conn)
Deprecated.use IntrinsicVolumes2DUtils insteadstatic double[]
eulerNumberLut(int conn)
Deprecated.use IntrinsicVolumes2DUtils insteadint
getConnectivity()
int
getDirectionNumber()
static double[]
perimeterLut(ij.measure.Calibration calib, int nDirs)
Deprecated.use IntrinsicVolumes2DUtils insteadvoid
setConnectivity(int connectivity)
void
setDirectionNumber(int directionNumber)
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
-
IntrinsicVolumesAnalyzer2D
public IntrinsicVolumesAnalyzer2D()Default empty constructor.
-
-
Method Details
-
areaLut
@Deprecated public static final double[] areaLut(ij.measure.Calibration calib)Deprecated.use IntrinsicVolumes2DUtils instead- Parameters:
calib
- spatial calibration of image- Returns:
- area lut
-
perimeterLut
@Deprecated public static final double[] perimeterLut(ij.measure.Calibration calib, int nDirs)Deprecated.use IntrinsicVolumes2DUtils insteadComputes the Look-up table that is used to compute perimeter. The result is an array with 16 entries, each entry corresponding to a binary 2-by-2 configuration of pixels.- Parameters:
calib
- the calibration of the imagenDirs
- the number of directions to use (2 or 4)- Returns:
- an array containing for each 2-by-2 configuration index, the corresponding contribution to perimeter estimate
-
computeCircularities
@Deprecated public static final double[] computeCircularities(IntrinsicVolumesAnalyzer2D.Result[] morphos)Deprecated.Utility method that computes circularities as a numeric array from the result array- Parameters:
morphos
- the array of results- Returns:
- the numeric array of circularities
-
eulerNumberLut
@Deprecated public static final double[] eulerNumberLut(int conn)Deprecated.use IntrinsicVolumes2DUtils insteadComputes the Look-up table that is used to compute Euler number density. The result is an array with 16 entries, each entry corresponding to a binary 2-by-2 configuration of pixels.- Parameters:
conn
- the connectivity to use (4 or 8)- Returns:
- an array containing for each 2-by-2 configuration index, the corresponding contribution to euler number estimate
-
eulerNumberIntLut
@Deprecated public static final int[] eulerNumberIntLut(int conn)Deprecated.use IntrinsicVolumes2DUtils insteadComputes the Look-up table that is used to compute Euler number density. The result is an array with 16 entries, each entry corresponding to a binary 2-by-2 configuration of pixels.- Parameters:
conn
- the connectivity to use (4 or 8)- Returns:
- an array containing for each 2-by-2 configuration index, the corresponding contribution to euler number estimate
-
getDirectionNumber
public int getDirectionNumber()- Returns:
- the number of directions used to compute perimeter
-
setDirectionNumber
public void setDirectionNumber(int directionNumber)- Parameters:
directionNumber
- the number of directions used to compute perimeter (either 2 or 4, default is 4)
-
getConnectivity
public int getConnectivity()- Returns:
- the connectivity used for computing Euler number
-
setConnectivity
public void setConnectivity(int connectivity)- Parameters:
connectivity
- the connectivity for computing Euler number (either 4 or 8, default is 4)
-
createTable
public ij.measure.ResultsTable createTable(java.util.Map<java.lang.Integer,IntrinsicVolumesAnalyzer2D.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.- Specified by:
createTable
in interfaceRegionAnalyzer<IntrinsicVolumesAnalyzer2D.Result>
- 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 IntrinsicVolumesAnalyzer2D.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<IntrinsicVolumesAnalyzer2D.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
-
algoProgressChanged
Description copied from interface:AlgoListener
The method devoted to manage the change in the progression of the algorithm.- Specified by:
algoProgressChanged
in interfaceAlgoListener
- Parameters:
evt
- the AlgoEvent instance containing info about the algorithm.
-
algoStatusChanged
Description copied from interface:AlgoListener
The method devoted to manage the change in the status of the algorithm.- Specified by:
algoStatusChanged
in interfaceAlgoListener
- Parameters:
evt
- the AlgoEvent instance containing info about the algorithm.
-