Class BinaryConfigurationsHistogram3D

java.lang.Object
inra.ijpb.algo.AlgoStub
inra.ijpb.measure.region3d.BinaryConfigurationsHistogram3D
All Implemented Interfaces:
Algo

public class BinaryConfigurationsHistogram3D
extends AlgoStub
Computes histogram of binary 2-by-2-by-2 configurations within a 3D image. Implements the Algo interface, so the progress can be tracked.
Author:
dlegland
  • Constructor Summary

    Constructors
    Constructor Description
    BinaryConfigurationsHistogram3D()
    Empty constructor.
  • Method Summary

    Modifier and Type Method Description
    static double[] applyLut​(int[][] histograms, double[] lut)
    Applies look-up-table of values for each configuration of each region, based on the array of count for each binary configuration.
    static double applyLut​(int[] histogram, double[] lut)
    Applies look-up-table of values for each configuration, based on the array of count for each binary configuration.
    int[] process​(ij.ImageStack image)
    Applies a look-up-table for each of the 2x2x2 voxel configurations containing at least one voxel of the input binary image, and returns the sum of contributions for each label.
    int[][] process​(ij.ImageStack image, int[] labels)
    Applies a look-up-table for each of the 2x2x2 voxel configurations containing at least one voxel of the input image, and returns the sum of contributions for each label.
    int[] processInnerFrame​(ij.ImageStack image)
    Applies a look-up-table for each of the 2x2x2 voxel configurations with all voxels within the input binary image, and returns the sum of contributions for each label.

    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

    • BinaryConfigurationsHistogram3D

      public BinaryConfigurationsHistogram3D()
      Empty constructor.
  • Method Details

    • applyLut

      public static final double applyLut​(int[] histogram, double[] lut)
      Applies look-up-table of values for each configuration, based on the array of count for each binary configuration.
      Parameters:
      histogram - the count of each type of 2-by-2-by-2 binary configurations, as a 256 array
      lut - the value to associate to each configuration
      Returns:
      the sum of the products of counts by the associated value
    • applyLut

      public static final double[] applyLut​(int[][] histograms, double[] lut)
      Applies look-up-table of values for each configuration of each region, based on the array of count for each binary configuration.
      Parameters:
      histograms - the count of each type of 2-by-2-by-2 binary configurations, as a 256 array
      lut - the value to associate to each configuration
      Returns:
      the sum of the products of counts by the associated value
    • process

      public int[] process​(ij.ImageStack image)
      Applies a look-up-table for each of the 2x2x2 voxel configurations containing at least one voxel of the input binary image, and returns the sum of contributions for each label. This method is used for computing Euler number, surface area and mean beradth from binary images.
      Parameters:
      image - the input 3D binary image
      Returns:
      an array of 256 integers containing the number of each binary configurations
    • processInnerFrame

      public int[] processInnerFrame​(ij.ImageStack image)
      Applies a look-up-table for each of the 2x2x2 voxel configurations with all voxels within the input binary image, and returns the sum of contributions for each label. This method is used for computing densities of Euler number, surface area and mean breadth from binary images.
      Parameters:
      image - the input 3D binary image
      Returns:
      an array of 256 integers containing the number of each binary configurations
      See Also:
      process(ImageStack)
    • process

      public int[][] process​(ij.ImageStack image, int[] labels)
      Applies a look-up-table for each of the 2x2x2 voxel configurations containing at least one voxel of the input image, and returns the sum of contributions for each label. This method is used for computing Euler number and surface area.
      Parameters:
      image - the input 3D image of labels
      labels - the set of labels to process
      Returns:
      an array of nLabels-by-256 integers containing the number of binary configurations for each label
      See Also:
      processInnerFrame(ImageStack)