Class Convexity

java.lang.Object
All Implemented Interfaces:
Algo, RegionAnalyzer<Convexity.Result>

public class Convexity
extends RegionAnalyzer2D<Convexity.Result>
Computes convex area and convexity for regions within a binary or label image.
Author:
dlegland
  • Nested Class Summary

    Nested Classes
    Modifier and Type Class Description
    class  Convexity.Result
    Simple class for storing the results of convexity computations.
  • Constructor Summary

    Constructors
    Constructor Description
    Convexity()  
  • Method Summary

    Modifier and Type Method Description
    Convexity.Result[] analyzeRegions​(ij.process.ImageProcessor image, int[] labels, ij.measure.Calibration calib)
    Computes an instance of the generic type T for each region in input label image.
    static ij.process.ImageProcessor convexify​(ij.process.ImageProcessor binaryImage)
    Computes the binary image representing the convex hull of the input binary image.
    ij.measure.ResultsTable createTable​(java.util.Map<java.lang.Integer,​Convexity.Result> results)
    Utility method that converts the detailed results of the RegionAnalyzer.analyzeRegions(ImagePlus) method into an instance of ResultsTable to facilitate display by ImageJ.

    Methods inherited from class inra.ijpb.measure.region2d.RegionAnalyzer2D

    analyzeRegions, analyzeRegions, computeTable

    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

    • Convexity

      public Convexity()
  • Method Details

    • convexify

      public static final ij.process.ImageProcessor convexify​(ij.process.ImageProcessor binaryImage)
      Computes the binary image representing the convex hull of the input binary image.
      Parameters:
      binaryImage - the binary image of a region
      Returns:
      the binary image representing the convex hull of the region in the input image.
      See Also:
      Polygons2D
    • createTable

      public ij.measure.ResultsTable createTable​(java.util.Map<java.lang.Integer,​Convexity.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.
      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 Convexity.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<Convexity.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