Class GeometricMeasures3D
@Deprecated
public class GeometricMeasures3D
extends java.lang.Object
- a method with two (or more) input parameters: the label image and the resolution, and which returns a ResultsTable
- a method with three (or more) input parameters: the label image, the list of labels to consider, and the resolution, and which returns an array of double, with as many elements as the number of labels
Example of code:
ImageStack labelImage = ...
int[] labels = LabelImages.findAllLabels(image);
double[] resol = new double[]{1, 1, 1};
double[][] ellipsoids = GeometricMeasures3D.inertiaEllipsoid(labelImage,
labels, resol);
double[][] elongations = GeometricMeasures3D.computeEllipsoidElongations(ellipsoids);
- Author:
- David Legland
-
Method Summary
Modifier and Type Method Description static ij.measure.ResultsTable
boundingBox(ij.ImageStack labelImage)
Deprecated.use BoundingBox3D insteadstatic double[][]
boundingBox(ij.ImageStack labelImage, int[] labels)
Deprecated.Computes bounding box of each label in input stack and returns the result as an array of double for each label.static double[][]
centroids(ij.ImageStack labelImage, int[] labels)
Deprecated.useCentroid3D.centroids(ImageStack, int[])
insteadstatic double[][]
computeEllipsoidElongations(double[][] ellipsoids)
Deprecated.useEllipsoid.elongations(Ellipsoid[])
insteadstatic double[]
computeSphericity(double[] volumes, double[] surfaces)
Deprecated.use IntrinsicVolumes3D insteadstatic double[]
eulerNumber(ij.ImageStack image, int[] labels, int conn)
Deprecated.static ij.measure.ResultsTable
inertiaEllipsoid(ij.ImageStack image)
Deprecated.useInertiaEllipsoid
insteadstatic ij.measure.ResultsTable
inertiaEllipsoid(ij.ImageStack image, double[] resol)
Deprecated.useInertiaEllipsoid
insteadstatic double[][]
inertiaEllipsoid(ij.ImageStack image, int[] labels, double[] resol)
Deprecated.useInertiaEllipsoid
insteadstatic ij.measure.ResultsTable
maximumInscribedSphere(ij.ImageStack labelImage, double[] resol)
Deprecated.use LargestInscribedBall insteadstatic double[][]
maximumInscribedSphere(ij.ImageStack labelImage, int[] labels, double[] resol)
Deprecated.Radius of maximum inscribed sphere of each particle within a label image.static ij.measure.ResultsTable
surfaceArea(ij.ImageStack labelImage, double[] resol, int nDirs)
Deprecated.Computes the surface area of each label in the 3D image, using the specified resolution, and the given number of directions.static double[]
surfaceAreaCrofton(ij.ImageStack image, int[] labels, double[] resol, int nDirs)
Deprecated.use IntrinsicVolumes3D insteadstatic double
surfaceAreaCrofton(ij.ImageStack image, int label, double[] resol, int nDirs)
Deprecated.use IntrinsicVolumes3D insteadstatic double
surfaceAreaCroftonD3(ij.ImageStack image, double[] resol)
Deprecated.use IntrinsicVolumes3D insteadstatic ij.measure.ResultsTable
volume(ij.ImageStack labelImage, double[] resol)
Deprecated.used IntrinsicVolumes3D insteadstatic double[]
volume(ij.ImageStack labelImage, int[] labels, double[] resol)
Deprecated.use IntrinsicVolumes3D insteadMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
boundingBox
@Deprecated public static final ij.measure.ResultsTable boundingBox(ij.ImageStack labelImage)Deprecated.use BoundingBox3D insteadComputes bounding box of each label in input stack and returns the result as a ResultsTable.- Parameters:
labelImage
- a 3D image containing label of particles or regions- Returns:
- a new ResultsTable containing for each label, the extent of the corresponding region
-
boundingBox
public static final double[][] boundingBox(ij.ImageStack labelImage, int[] labels)Deprecated.Computes bounding box of each label in input stack and returns the result as an array of double for each label.- Parameters:
labelImage
- a 3D image containing label of particles or regionslabels
- the set of labels present in image- Returns:
- a new array of doubles containing for each label, the extent of the corresponding region
-
volume
@Deprecated public static final ij.measure.ResultsTable volume(ij.ImageStack labelImage, double[] resol)Deprecated.used IntrinsicVolumes3D insteadMeasures the volume of each particle in a 3D label image.- Parameters:
labelImage
- image containing the label of each particleresol
- image resolution, as a double array with 3 elements- Returns:
- the volume of each particle in the image
-
volume
@Deprecated public static final double[] volume(ij.ImageStack labelImage, int[] labels, double[] resol)Deprecated.use IntrinsicVolumes3D insteadMeasures the volume of each particle in the 3D label image.- Parameters:
labelImage
- image containing the label of each particlelabels
- the set of labels for which volume has to be computedresol
- image resolution, as a double array with 3 elements- Returns:
- the volume of each particle in the image
-
computeSphericity
@Deprecated public static final double[] computeSphericity(double[] volumes, double[] surfaces)Deprecated.use IntrinsicVolumes3D insteadHelper function that computes the sphericity index of 3D particles, based on the value of volume and surface area. The sphericity is computed using the following formula:sphericity = 36 * PI * V^2 / S^3
A perfect ball would have a sphericity index close to 1, a very complex particle will present a lower sphericity index.- Parameters:
volumes
- the volume of each particlesurfaces
- the surface area of each particle- Returns:
- the sphericity index of each particle
- See Also:
surfaceArea(ImageStack, double[], int)
,volume(ImageStack, int[], double[])
-
surfaceArea
public static final ij.measure.ResultsTable surfaceArea(ij.ImageStack labelImage, double[] resol, int nDirs)Deprecated.Computes the surface area of each label in the 3D image, using the specified resolution, and the given number of directions. Current algorithms pre-computes a LUT, then iterate on 2-by-2-by-2 configurations of voxels, and identifies the labels whose surface area measure need to be updated. For 3 directions, the surfaceAreaD3 function is an alternative that does not uses LUT.- Parameters:
labelImage
- image containing the label of each particleresol
- image resolution, as a double array with 3 elementsnDirs
- the number of directions to consider, either 3 or 13- Returns:
- the surface area of each particle in the image
-
surfaceAreaCrofton
@Deprecated public static final double[] surfaceAreaCrofton(ij.ImageStack image, int[] labels, double[] resol, int nDirs)Deprecated.use IntrinsicVolumes3D insteadComputes surface area for each label given in the "labels" argument.- Parameters:
image
- image containing the label of each particlelabels
- the set of labels in the imageresol
- image resolution, as a double array with 3 elementsnDirs
- the number of directions to consider, either 3 or 13- Returns:
- the surface area of each particle in the image
-
surfaceAreaCrofton
@Deprecated public static final double surfaceAreaCrofton(ij.ImageStack image, int label, double[] resol, int nDirs)Deprecated.use IntrinsicVolumes3D insteadComputes surface area for a single label in the image, using discretization of the Crofton formula. This can be useful for binary images by using label 255.- Parameters:
image
- the input 3D label image (with labels having integer values)label
- the value of the label to measureresol
- the resolution of the image, in each directionnDirs
- the number of directions to consider for computing surface (3 or 13)- Returns:
- the surface area measured for the given label
-
surfaceAreaCroftonD3
@Deprecated public static final double surfaceAreaCroftonD3(ij.ImageStack image, double[] resol)Deprecated.use IntrinsicVolumes3D insteadComputes surface area of a binary image using 3 directions.- Parameters:
image
- the input 3D label image (with labels having integer values)resol
- the resolution of the image, in each direction- Returns:
- the surface area measured for the binary image
-
eulerNumber
@Deprecated public static final double[] eulerNumber(ij.ImageStack image, int[] labels, int conn)Deprecated.Computes Euler number for each label given in the "labels" argument, using the specified connectivity.- Parameters:
image
- the input 3D label image (with labels having integer values)labels
- the set of unique labels in imageconn
- the connectivity to use (either 6 or 26)- Returns:
- the Euler-Poincare characteristic of each region
- See Also:
IntrinsicVolumes3D.eulerNumbers(ImageStack, int[], int)
-
centroids
@Deprecated public static final double[][] centroids(ij.ImageStack labelImage, int[] labels)Deprecated.useCentroid3D.centroids(ImageStack, int[])
insteadComputes centroid of each label in input stack and returns the result as an array of double for each label.- Parameters:
labelImage
- an instance of ImageStack containing region labelslabels
- the set of indices contained in the image- Returns:
- the centroid of each region, as an array of double[3]
-
inertiaEllipsoid
@Deprecated public static final ij.measure.ResultsTable inertiaEllipsoid(ij.ImageStack image)Deprecated.useInertiaEllipsoid
insteadComputes inertia ellipsoid of each 3D region in input 3D label image.- Parameters:
image
- an instance of ImageStack containing region labels- Returns:
- the parameters of the inertia ellipsoid for each region
- Throws:
java.lang.RuntimeException
- if jama package is not found.
-
inertiaEllipsoid
@Deprecated public static final ij.measure.ResultsTable inertiaEllipsoid(ij.ImageStack image, double[] resol)Deprecated.useInertiaEllipsoid
insteadComputes inertia ellipsoid of each 3D region in input 3D label image.
The result is given as a ResultsTable with as many rows as the number of labels, and 9 columns. Columns correspond to the centroid coordinates (3 values), the radius of the ellipsoid (3 values), and the orientation, given as azimut, elevation, and roll angles, in degrees (3 values).
- Parameters:
image
- an instance of ImageStack containing region labelsresol
- the resolution of the image, in each direction- Returns:
- the parameters of the inertia ellipsoid for each region
- Throws:
java.lang.RuntimeException
- if jama package is not found.
-
inertiaEllipsoid
@Deprecated public static final double[][] inertiaEllipsoid(ij.ImageStack image, int[] labels, double[] resol)Deprecated.useInertiaEllipsoid
insteadComputes inertia ellipsoid from input 3D label image for each specified region label.
The result is given as an array of double with as many rows as the number of labels, and 9 columns. Columns correspond to the centroid coordinates (3 values), the radius of the ellipsoid (3 values), and the orientation, given as azimut, elevation, and roll angles, in degrees (3 values).
ImageStack labelImage = ... int[] labels = LabelImages.findAllLabels(image); double[] resol = new double[]{1, 1, 1}; double[][] ellipsoids = GeometricMeasures3D.inertiaEllipsoid(labelImage, labels, resol); double[][] elongations = GeometricMeasures3D.computeEllipsoidElongations(ellipsoids);
- Parameters:
image
- input image containing label of each particlelabels
- the list of labels for which we want to compute inertia ellipsoidresol
- the spatial resolution, as an array of length 3.- Returns:
- an array with as many rows as the number of labels, and 9 columns
- Throws:
java.lang.RuntimeException
- if jama package is not found.
-
computeEllipsoidElongations
@Deprecated public static final double[][] computeEllipsoidElongations(double[][] ellipsoids)Deprecated.useEllipsoid.elongations(Ellipsoid[])
insteadComputes the three elongation factors for an array of ellipsoids.ImageStack labelImage = ... int[] labels = LabelImages.findAllLabels(image); double[] resol = new double[]{1, 1, 1}; double[][] ellipsoids = GeometricMeasures3D.inertiaEllipsoid(labelImage, labels, resol); double[][] elongations = GeometricMeasures3D.computeEllipsoidElongations(ellipsoids);
- Parameters:
ellipsoids
- an array of ellipsoids, with radius data given in columns 3, 4, and 5- Returns:
- an array of elongation factors. When radii are ordered such that R1 > R2 > R3, the three elongation factors are defined by ratio of R1 by R2, ratio of R1 by R3, and ratio of R2 by R3.
- See Also:
inertiaEllipsoid(ImageStack, double[])
,inertiaEllipsoid(ImageStack, int[], double[])
-
maximumInscribedSphere
@Deprecated public static final ij.measure.ResultsTable maximumInscribedSphere(ij.ImageStack labelImage, double[] resol)Deprecated.use LargestInscribedBall insteadRadius of maximum inscribed sphere of each particle within a label image.- Parameters:
labelImage
- input image containing label of each particleresol
- the spatial resolution, as an array of length 3.- Returns:
- a ResultsTable with as many rows as the number of labels, and 4 columns (xi, yi, zi, radius)
-
maximumInscribedSphere
public static final double[][] maximumInscribedSphere(ij.ImageStack labelImage, int[] labels, double[] resol)Deprecated.Radius of maximum inscribed sphere of each particle within a label image.- Parameters:
labelImage
- input image containing label of each particlelabels
- the list of labels for which we want to compute inertia ellipsoidresol
- the spatial resolution, as an array of length 3.- Returns:
- an array with as many rows as the number of labels, and 4 columns (xi, yi, zi, radius)
-