Class EquivalentEllipsoid

java.lang.Object
inra.ijpb.algo.AlgoStub
inra.ijpb.measure.region3d.RegionAnalyzer3D<Ellipsoid>
inra.ijpb.measure.region3d.EquivalentEllipsoid
All Implemented Interfaces:
Algo, AlgoListener, RegionAnalyzer<Ellipsoid>

public class EquivalentEllipsoid
extends RegionAnalyzer3D<Ellipsoid>
Compute the parameters of 3D ellipsoids that has the same moments up to the second order than the region(s) within a 3D binary / label image.
Author:
dlegland
See Also:
EquivalentEllipse
  • Nested Class Summary

    Nested Classes
    Modifier and Type Class Description
    class  EquivalentEllipsoid.Moments3D
    Encapsulates the results of 3D Moments computations.
  • Constructor Summary

    Constructors
    Constructor Description
    EquivalentEllipsoid()
    Default constructor
  • Method Summary

    Modifier and Type Method Description
    Ellipsoid[] analyzeRegions​(ij.ImageStack image, int[] labels, ij.measure.Calibration calib)
    Computes equivalent ellipsoid of each region in the input 3D label image.
    EquivalentEllipsoid.Moments3D[] computeMoments​(ij.ImageStack image, int[] labels, ij.measure.Calibration calib)
    Computes the matrix of moments for each region within the 3D label map.
    ij.measure.ResultsTable createTable​(int[] labels, Ellipsoid[] ellipsoids)
    Utility method that transforms a pair of arrays for labels and equivalent ellipsoids instances into a ResultsTable that can be displayed with ImageJ.
    ij.measure.ResultsTable createTable​(int[] labels, EquivalentEllipsoid.Moments3D[] moments)
    Utility method that transforms a pair of arrays for labels and 3D moments instances into a ResultsTable that can be displayed with ImageJ.
    ij.measure.ResultsTable createTable​(java.util.Map<java.lang.Integer,​Ellipsoid> map)
    Utility method that transforms the mapping between labels and equivalent ellipsoids instances into a ResultsTable that can be displayed with ImageJ.
    static Ellipsoid[] equivalentEllipsoids​(ij.ImageStack image, int[] labels, ij.measure.Calibration calib)
    Computes equivalent ellipsoid of each region in the input 3D label image.
    Ellipsoid[] momentsToEllipsoids​(EquivalentEllipsoid.Moments3D[] moments)
    Converts an array of 3D moments into equivalent ellipsoid representation.

    Methods inherited from class inra.ijpb.measure.region3d.RegionAnalyzer3D

    algoProgressChanged, algoStatusChanged, analyzeRegions, analyzeRegions, computeTable, createMap

    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
  • Constructor Details

    • EquivalentEllipsoid

      public EquivalentEllipsoid()
      Default constructor
  • Method Details

    • equivalentEllipsoids

      public static final Ellipsoid[] equivalentEllipsoids​(ij.ImageStack image, int[] labels, ij.measure.Calibration calib)
      Computes equivalent ellipsoid of each region in the input 3D label image.
      Parameters:
      image - the input image containing label of particles
      labels - the array of labels within the image
      calib - the calibration of the image
      Returns:
      an array of Ellipsoid instances representing the calibrated coordinates of the equivalent ellipsoid of each region
    • createTable

      public ij.measure.ResultsTable createTable​(int[] labels, Ellipsoid[] ellipsoids)
      Utility method that transforms a pair of arrays for labels and equivalent ellipsoids instances into a ResultsTable that can be displayed with ImageJ.
      Parameters:
      labels - the array of region labels
      ellipsoids - the array of region ellipsoids (the same size as the array of labels)
      Returns:
      a ResultsTable that can be displayed with ImageJ.
    • createTable

      public ij.measure.ResultsTable createTable​(int[] labels, EquivalentEllipsoid.Moments3D[] moments)
      Utility method that transforms a pair of arrays for labels and 3D moments instances into a ResultsTable that can be displayed with ImageJ.
      Parameters:
      labels - the array of region labels
      moments - the array of moments (the same size as the array of labels)
      Returns:
      a ResultsTable that can be displayed with ImageJ.
    • momentsToEllipsoids

      public Ellipsoid[] momentsToEllipsoids​(EquivalentEllipsoid.Moments3D[] moments)
      Converts an array of 3D moments into equivalent ellipsoid representation.
      Parameters:
      moments - the moments to convert
      Returns:
      the array of ellipsoids corresponding to the moments
    • computeMoments

      public EquivalentEllipsoid.Moments3D[] computeMoments​(ij.ImageStack image, int[] labels, ij.measure.Calibration calib)
      Computes the matrix of moments for each region within the 3D label map.
      Parameters:
      image - the 3D image of labels (label map)
      labels - the array of region labels to process
      calib - the spatial calibration of the image
      Returns:
      an array the same size as labels, containing for each processed region result of 3D Moments computations
    • analyzeRegions

      public Ellipsoid[] analyzeRegions​(ij.ImageStack image, int[] labels, ij.measure.Calibration calib)
      Computes equivalent ellipsoid of each region in the input 3D label image.
      Specified by:
      analyzeRegions in class RegionAnalyzer3D<Ellipsoid>
      Parameters:
      image - the input image containing label of particles
      labels - the array of labels within the image
      calib - the calibration of the image
      Returns:
      an array of Ellipsoid instances representing the calibrated coordinates of the equivalent ellipsoid of each region
    • createTable

      public ij.measure.ResultsTable createTable​(java.util.Map<java.lang.Integer,​Ellipsoid> map)
      Utility method that transforms the mapping between labels and equivalent ellipsoids instances into a ResultsTable that can be displayed with ImageJ.
      Parameters:
      map - the mapping between labels and Equivalent Ellipsoids
      Returns:
      a ResultsTable that can be displayed with ImageJ.