Class IntrinsicVolumesAnalyzer2D

java.lang.Object
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
  • 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 instead
      Computes 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 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 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 instead
      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

      @Deprecated public static final int[] eulerNumberIntLut​(int conn)
      Deprecated.
      use IntrinsicVolumes2DUtils instead
      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
    • 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 the RegionAnalyzer.analyzeRegions(ImagePlus) method into an instance of ResultsTable to facilitate display by ImageJ.
      Specified by:
      createTable in interface RegionAnalyzer<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 class RegionAnalyzer2D<IntrinsicVolumesAnalyzer2D.Result>
      Parameters:
      image - the input image containing label of particles
      labels - the array of labels within the image
      calib - the spatial calibration of the image
      Returns:
      an array of the type used to represent the analysis result of each region
    • algoProgressChanged

      public void algoProgressChanged​(AlgoEvent evt)
      Description copied from interface: AlgoListener
      The method devoted to manage the change in the progression of the algorithm.
      Specified by:
      algoProgressChanged in interface AlgoListener
      Parameters:
      evt - the AlgoEvent instance containing info about the algorithm.
    • algoStatusChanged

      public void algoStatusChanged​(AlgoEvent evt)
      Description copied from interface: AlgoListener
      The method devoted to manage the change in the status of the algorithm.
      Specified by:
      algoStatusChanged in interface AlgoListener
      Parameters:
      evt - the AlgoEvent instance containing info about the algorithm.