Class IntrinsicVolumes2D

java.lang.Object
inra.ijpb.measure.IntrinsicVolumes2D

public class IntrinsicVolumes2D
extends java.lang.Object
Computation of intrinsic volumes(area, perimeter, Euler number) in planar binary or label images. For binary images, a binary image is expected, together with the spatial calibration of the image. For label images, the list of region labels within images should be specified as an array of integers.
Author:
dlegland
See Also:
IntrinsicVolumes3D, IntrinsicVolumesAnalyzer2D, IntrinsicVolumes2DUtils
  • Method Summary

    Modifier and Type Method Description
    static double area​(ij.process.ImageProcessor image, ij.measure.Calibration calib)
    Measures the area of the foreground region within a binary image.
    static double areaDensity​(ij.process.ImageProcessor image)
    Computes the area density for the 2D binary microstructure.
    static double[] areas​(ij.process.ImageProcessor image, int[] labels, ij.measure.Calibration calib)
    Measures the area of each region within a label image, taking into account image resolution.
    static int eulerNumber​(ij.process.ImageProcessor image, int conn)
    Measures the Euler number of the region within the binary image, using the specified connectivity.
    static double eulerNumberDensity​(ij.process.ImageProcessor image, ij.measure.Calibration calib, int conn)
    Measures the Euler number density of the foreground region within a binary image, using the specified connectivity.
    static int[] eulerNumbers​(ij.process.ImageProcessor image, int[] labels, int conn)
    Measures the Euler number of each region given in the "labels" argument, using the specified connectivity.
    static double perimeter​(ij.process.ImageProcessor image, ij.measure.Calibration calib, int nDirs)
    Measures the perimeter of the foreground region within a binary image.
    static double perimeterDensity​(ij.process.ImageProcessor image, ij.measure.Calibration calib, int nDirs)
    Computes perimeter density of binary image.
    static double[] perimeters​(ij.process.ImageProcessor image, int[] labels, ij.measure.Calibration calib, int nDirs)
    Measures the perimeter of each region within a label image.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • area

      public static final double area​(ij.process.ImageProcessor image, ij.measure.Calibration calib)
      Measures the area of the foreground region within a binary image.
      Parameters:
      image - the input binary image containing the region to analyze
      calib - the spatial calibration of the image
      Returns:
      the area of each region
      See Also:
      perimeter(ImageProcessor, Calibration, int), eulerNumber(ImageProcessor, int), BinaryImages.countForegroundPixels(ImageProcessor)
    • areas

      public static final double[] areas​(ij.process.ImageProcessor image, int[] labels, ij.measure.Calibration calib)
      Measures the area of each region within a label image, taking into account image resolution.
      Parameters:
      image - the input image containing label of particles
      labels - the array of unique labels in image
      calib - the spatial calibration of the image
      Returns:
      the area of each region
      See Also:
      LabelImages.pixelCount(ImageProcessor, int[])
    • areaDensity

      public static final double areaDensity​(ij.process.ImageProcessor image)
      Computes the area density for the 2D binary microstructure.
      Parameters:
      image - the input binary image
      Returns:
      the area density of the binary structure
    • perimeter

      public static final double perimeter​(ij.process.ImageProcessor image, ij.measure.Calibration calib, int nDirs)
      Measures the perimeter of the foreground region within a binary image.
      Parameters:
      image - the input image containing the binary region to analyze
      calib - the spatial calibration of the image
      nDirs - the number of directions to consider, either 2 or 4
      Returns:
      the perimeter of the binary region within the image
      See Also:
      area(ImageProcessor, Calibration), eulerNumber(ImageProcessor, int)
    • perimeters

      public static final double[] perimeters​(ij.process.ImageProcessor image, int[] labels, ij.measure.Calibration calib, int nDirs)
      Measures the perimeter of each region within a label image.
      Parameters:
      image - the input image containing the labels of regions to analyze
      labels - the labels of the regions within the image
      calib - the spatial calibration of the image
      nDirs - the number of directions to consider, either 2 or 4
      Returns:
      the perimeter of each region within the image
      See Also:
      areas(ImageProcessor, int[], Calibration), eulerNumbers(ImageProcessor, int[], int)
    • perimeterDensity

      public static final double perimeterDensity​(ij.process.ImageProcessor image, ij.measure.Calibration calib, int nDirs)
      Computes perimeter density of binary image.
      Parameters:
      image - the input binary image
      calib - the spatial calibration of the image
      nDirs - the number of directions to consider, either 2 or 4
      Returns:
      the perimeter density of the binary image
    • eulerNumber

      public static final int eulerNumber​(ij.process.ImageProcessor image, int conn)
      Measures the Euler number of the region within the binary image, using the specified connectivity.
      Parameters:
      image - the input 2D binary image
      conn - the connectivity to use (either 4 or 8)
      Returns:
      the Euler number of the region within the binary image
    • eulerNumbers

      public static final int[] eulerNumbers​(ij.process.ImageProcessor image, int[] labels, int conn)
      Measures the Euler number of each region given in the "labels" argument, using the specified connectivity.
      Parameters:
      image - the input label image (with labels having integer values)
      labels - the set of unique labels in image
      conn - the connectivity to use (either 4 or 8)
      Returns:
      the Euler number of each region within the image
    • eulerNumberDensity

      public static final double eulerNumberDensity​(ij.process.ImageProcessor image, ij.measure.Calibration calib, int conn)
      Measures the Euler number density of the foreground region within a binary image, using the specified connectivity.
      Parameters:
      image - the input 2D binary image
      calib - the spatial calibration of the image
      conn - the connectivity to use (either 4 or 8)
      Returns:
      the Euler number density within the binary image