Class IntrinsicVolumes2DUtils

java.lang.Object
inra.ijpb.measure.region2d.IntrinsicVolumes2DUtils

public class IntrinsicVolumes2DUtils
extends java.lang.Object
Utility functions for classes that compute 2D intrinsic volumes measures.
Author:
dlegland
See Also:
IntrinsicVolumes2D
  • Method Summary

    Modifier and Type Method Description
    static double[] areaLut​(ij.measure.Calibration calib)
    Computes the Look-up table that is used for computing area.
    static double[] computeCircularities​(IntrinsicVolumesAnalyzer2D.Result[] morphos)
    Utility method that computes circularities as a numeric array from the result array
    static int[] eulerNumberIntLut​(int conn)
    Computes the Look-up table that is used to compute Euler number density.
    static double[] eulerNumberLut​(int conn)
    Computes the Look-up table that is used to compute Euler number density.
    static double[] perimeterLut​(ij.measure.Calibration calib, int nDirs)
    Computes the Look-up table that is used for computing perimeter.

    Methods inherited from class java.lang.Object

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

    • areaLut

      public static final double[] areaLut​(ij.measure.Calibration calib)
      Computes the Look-up table that is used for computing area. 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 image
      Returns:
      an array containing for each 2-by-2 configuration index, the corresponding contribution to the calibrated area fraction within configuration
    • perimeterLut

      public static final double[] perimeterLut​(ij.measure.Calibration calib, int nDirs)
      Computes the Look-up table that is used for computing 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 image
      nDirs - the number of directions to use (2 or 4)
      Returns:
      an array containing for each 2-by-2 configuration index, the corresponding contribution to the calibrated perimeter estimate
    • computeCircularities

      public static final double[] computeCircularities​(IntrinsicVolumesAnalyzer2D.Result[] morphos)
      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

      public static final double[] eulerNumberLut​(int conn)
      Computes 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

      public static final int[] eulerNumberIntLut​(int conn)
      Computes 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