Interface VoxelStatistics

All Known Implementing Classes:
VoxelStatisticsCombined, VoxelStatisticsFromHistogram

public interface VoxelStatistics
Allows retrieval of statistics about voxel values.
Author:
Owen Feehan
  • Method Summary

    Modifier and Type Method Description
    long countThreshold​(RelationToThreshold relationToThreshold)
    Counts the number of voxels that exist, relative to a threshold.
    Histogram histogram()
    A Histogram of all voxel values.
    default double mean()
    The mean of all voxel values.
    double quantile​(double quantile)
    The voxel value corresponding to a particular quantile.
    long size()
    The total count.
    default double stdDev()
    The standard-deviation of all voxel values.
    long sum()
    The sum of all voxel values.
    long sumOfSquares()
    The sum of the square of all voxel values.
    VoxelStatistics threshold​(RelationToThreshold relationToThreshold)
    Derives statistics only of the voxels that satisfy a condition, relative to a threshold.
    default double variance()
    The variance of all voxel values.
  • Method Details

    • size

      long size()
      The total count.
      Returns:
      the total number of voxels.
    • sum

      long sum()
      The sum of all voxel values.
      Returns:
      the sum.
    • sumOfSquares

      long sumOfSquares()
      The sum of the square of all voxel values.
      Returns:
      the sum-of-squares.
    • threshold

      VoxelStatistics threshold​(RelationToThreshold relationToThreshold)
      Derives statistics only of the voxels that satisfy a condition, relative to a threshold.
      Parameters:
      relationToThreshold - the condition that must be satisfied for voxels to be included in the statistics.
      Returns:
      a new VoxelStatistics pertaining only to the voxels that satisfy the condition.
    • quantile

      double quantile​(double quantile) throws OperationFailedException
      The voxel value corresponding to a particular quantile.
      Parameters:
      quantile - the quantile, which should always be >= 0 and <= 1.
      Returns:
      the voxel value corresponding to the quantile.
      Throws:
      OperationFailedException - if quantile is out-of-range.
      UnsupportedOperationException - if the operation is unsupported.
    • histogram

      A Histogram of all voxel values.
      Returns:
      a histogram.
      Throws:
      OperationFailedException - if a histogram cannot be created.
    • countThreshold

      long countThreshold​(RelationToThreshold relationToThreshold)
      Counts the number of voxels that exist, relative to a threshold.

      This methods conveniently avoids overhead with assigning new memory when counting.

      Parameters:
      relationToThreshold - defines the relation to a threshold e.g. above a number, or below a number.
      Returns:
      the total number of voxels that fulfill relationToThreshold.
    • mean

      default double mean()
      The mean of all voxel values.
      Returns:
      the mean.
    • variance

      default double variance()
      The variance of all voxel values.
      Returns:
      the variance.
    • stdDev

      default double stdDev()
      The standard-deviation of all voxel values.
      Returns:
      the standard-deviation.