Class MaxFeretDiameter3D

java.lang.Object
All Implemented Interfaces:
Algo, AlgoListener, RegionAnalyzer<PointPair3D>

public class MaxFeretDiameter3D
extends RegionAnalyzer3D<PointPair3D>
Computes maximum Feret Diameter for each region of a 3D binary or label image.
Author:
dlegland
See Also:
MaxFeretDiameter
  • Constructor Details

    • MaxFeretDiameter3D

      public MaxFeretDiameter3D()
      Default constructor
  • Method Details

    • maxFeretDiameters

      public static final PointPair3D[] maxFeretDiameters​(ij.ImageStack image, int[] labels, ij.measure.Calibration calib)
      Computes Feret diameters as a PointPair3D for each of the specified regions within a label map.
      Parameters:
      image - the 3D label map corresponding to the label image
      labels - the array of region labels to process
      calib - the spatial calibration of the image
      Returns:
      the array of 3D Feret diameter results
    • maxFeretDiameter

      public static final PointPair3D maxFeretDiameter​(java.util.ArrayList<? extends Point3D> points)
      Computes Maximum Feret diameter of a set of points. Note: it is often a good idea to compute convex hull before computing Feret diameter.
      Parameters:
      points - a collection of planar points
      Returns:
      the maximum Feret diameter of the point set
    • createTable

      public ij.measure.ResultsTable createTable​(java.util.Map<java.lang.Integer,​PointPair3D> maxDiamsMap)
      Converts the result of maximum Feret diameters computation to a ResultsTable that can be displayed within ImageJ.
      Parameters:
      maxDiamsMap - the map of PointPair3D for each label within a label image
      Returns:
      a ResultsTable instance
    • analyzeRegions

      public PointPair3D[] analyzeRegions​(ij.ImageStack image, int[] labels, ij.measure.Calibration calib)
      Computes maximum Feret Diameter for each label of the input label image. Computes diameter between corners of image pixels, so the result is always greater than or equal to one.
      Specified by:
      analyzeRegions in class RegionAnalyzer3D<PointPair3D>
      Parameters:
      image - a label image (8, 16 or 32 bits)
      labels - the set of labels within the image
      calib - the spatial calibration of the image
      Returns:
      an array of PointPair3D representing the coordinates of extreme points, in calibrated coordinates.