Class AverageThickness

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

public class AverageThickness
extends RegionAnalyzer2D<AverageThickness.Result>
Compute average thickness of a binary region, or of each region in a label image. The average thickness is computed by:
  1. computing the skeleton of the binary region,
  2. computing the distance map of each foreground pixel of the original binary region,
  3. measuring the value in the distance map for each pixel of the skeleton,
  4. computing the average.
The result largely depends on the algorithms for computing skeleton and distance map. For skeleton, the an adaptation of ImageJ's algorithm is used. For distance maps, chamfer distance maps are used.
Author:
dlegland
See Also:
ImageJSkeleton, DistanceTransform2D
  • Constructor Details

    • AverageThickness

      public AverageThickness()
  • Method Details

    • createTable

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