Class RegionAnalyzer3D<T>

java.lang.Object
inra.ijpb.algo.AlgoStub
inra.ijpb.measure.region3d.RegionAnalyzer3D<T>
Type Parameters:
T - the type of the data computed for each region. May be a class instance, or a single Numeric type.
All Implemented Interfaces:
Algo, AlgoListener, RegionAnalyzer<T>
Direct Known Subclasses:
BoundingBox3D, Centroid3D, EquivalentEllipsoid, GeodesicDiameter3D, InertiaEllipsoid, IntrinsicVolumesAnalyzer3D, LargestInscribedBall, MaxFeretDiameter3D

public abstract class RegionAnalyzer3D<T>
extends AlgoStub
implements RegionAnalyzer<T>, AlgoListener
Base implementation of RegionAnalyzer interface for 3D binary/label images.
Author:
dlegland
See Also:
RegionAnalyzer2D
  • Constructor Summary

    Constructors
    Constructor Description
    RegionAnalyzer3D()  
  • 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.
    java.util.Map<java.lang.Integer,​T> analyzeRegions​(ij.ImagePlus labelPlus)
    Default implementation of the analyzeRegions method, that calls the more specialized analyzeRegions(ImageStack, int[], ij.measure.Calibration) method and transforms the result into a map.
    abstract T[] analyzeRegions​(ij.ImageStack image, int[] labels, ij.measure.Calibration calib)
    Computes an instance of the generic type T for each region in input label image.
    java.util.Map<java.lang.Integer,​T> analyzeRegions​(ij.ImageStack image, ij.measure.Calibration calib)
    Identifies labels within image and computes an instance of the generic type T for each region in input label image.
    ij.measure.ResultsTable computeTable​(ij.ImagePlus labelPlus)
    Default implementation of computeTable method, using the two other methods analyzeRegions(ImagePlus) and RegionAnalyzer.createTable(Map):
    static <T2> java.util.Map<java.lang.Integer,​T2> createMap​(int[] labels, T2[] data)
    Utility method that convert an array of result into a map using labels as keys.

    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

    Methods inherited from interface inra.ijpb.measure.RegionAnalyzer

    createTable
  • Constructor Details

    • RegionAnalyzer3D

      public RegionAnalyzer3D()
  • Method Details

    • createMap

      public static final <T2> java.util.Map<java.lang.Integer,​T2> createMap​(int[] labels, T2[] data)
      Utility method that convert an array of result into a map using labels as keys.
      Type Parameters:
      T2 - the type of data measured for each label
      Parameters:
      labels - the array of labels to use as keys
      data - the array of objects to map
      Returns:
      a map between each entry of label array and data array
    • analyzeRegions

      public abstract T[] analyzeRegions​(ij.ImageStack image, int[] labels, ij.measure.Calibration calib)
      Computes an instance of the generic type T for each region in input label image.
      Parameters:
      image - the input 3D 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
    • analyzeRegions

      public java.util.Map<java.lang.Integer,​T> analyzeRegions​(ij.ImageStack image, ij.measure.Calibration calib)
      Identifies labels within image and computes an instance of the generic type T for each region in input label image.
      Parameters:
      image - a 3D label image (8, 16 or 32 bits)
      calib - the spatial calibration of the image
      Returns:
      a map between the region label and the result of analysis for each region
    • analyzeRegions

      public java.util.Map<java.lang.Integer,​T> analyzeRegions​(ij.ImagePlus labelPlus)
      Default implementation of the analyzeRegions method, that calls the more specialized analyzeRegions(ImageStack, int[], ij.measure.Calibration) method and transforms the result into a map.
      Specified by:
      analyzeRegions in interface RegionAnalyzer<T>
      Parameters:
      labelPlus - the input image containing label of regions
      Returns:
      the mapping between region label and result of analysis for each region
    • computeTable

      public ij.measure.ResultsTable computeTable​(ij.ImagePlus labelPlus)
      Default implementation of computeTable method, using the two other methods analyzeRegions(ImagePlus) and RegionAnalyzer.createTable(Map):
      Specified by:
      computeTable in interface RegionAnalyzer<T>
      Parameters:
      labelPlus - a label or binary image of region(s)
      Returns:
      an instance of ResultsTable containing results presented in a tabular format.
    • 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.