Class VoxelStatisticsCombined

Object
VoxelStatisticsCombined
All Implemented Interfaces:
VoxelStatistics

public class VoxelStatisticsCombined extends Object implements VoxelStatistics
Aggregates statistics of a list of VoxelStatistics as if they were one.
Author:
Owen Feehan
  • Constructor Details

    • VoxelStatisticsCombined

      public VoxelStatisticsCombined()
  • Method Details

    • add

      public void add(VoxelStatistics element)
      Adds an element.
      Parameters:
      element - an element to add.
    • size

      public long size()
      Description copied from interface: VoxelStatistics
      The total count.
      Specified by:
      size in interface VoxelStatistics
      Returns:
      the total number of voxels.
    • sum

      public long sum()
      Description copied from interface: VoxelStatistics
      The sum of all voxel values.
      Specified by:
      sum in interface VoxelStatistics
      Returns:
      the sum.
    • sumOfSquares

      public long sumOfSquares()
      Description copied from interface: VoxelStatistics
      The sum of the square of all voxel values.
      Specified by:
      sumOfSquares in interface VoxelStatistics
      Returns:
      the sum-of-squares.
    • threshold

      public VoxelStatistics threshold(RelationToThreshold relationToThreshold)
      Description copied from interface: VoxelStatistics
      Derives statistics only of the voxels that satisfy a condition, relative to a threshold.
      Specified by:
      threshold in interface VoxelStatistics
      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.
    • countThreshold

      public long countThreshold(RelationToThreshold relationToThreshold)
      Description copied from interface: VoxelStatistics
      Counts the number of voxels that exist, relative to a threshold.

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

      Specified by:
      countThreshold in interface VoxelStatistics
      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.
    • quantile

      public double quantile(double quantile)
      Description copied from interface: VoxelStatistics
      The voxel value corresponding to a particular quantile.
      Specified by:
      quantile in interface VoxelStatistics
      Parameters:
      quantile - the quantile, which should always be >= 0 and <= 1.
      Returns:
      the voxel value corresponding to the quantile.
    • histogram

      public Histogram histogram() throws OperationFailedException
      Description copied from interface: VoxelStatistics
      A Histogram of all voxel values.
      Specified by:
      histogram in interface VoxelStatistics
      Returns:
      a histogram.
      Throws:
      OperationFailedException - if a histogram cannot be created.