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 longcountThreshold(RelationToThreshold relationToThreshold)Counts the number of voxels that exist, relative to a threshold.Histogramhistogram()AHistogramof all voxel values.default doublemean()The mean of all voxel values.doublequantile(double quantile)The voxel value corresponding to a particular quantile.longsize()The total count.default doublestdDev()The standard-deviation of all voxel values.longsum()The sum of all voxel values.longsumOfSquares()The sum of the square of all voxel values.VoxelStatisticsthreshold(RelationToThreshold relationToThreshold)Derives statistics only of the voxels that satisfy a condition, relative to a threshold.default doublevariance()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
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
VoxelStatisticspertaining only to the voxels that satisfy the condition.
-
quantile
The voxel value corresponding to a particular quantile.- Parameters:
quantile- the quantile, which should always be>= 0and<= 1.- Returns:
- the voxel value corresponding to the quantile.
- Throws:
OperationFailedException- ifquantileis out-of-range.UnsupportedOperationException- if the operation is unsupported.
-
histogram
AHistogramof all voxel values.- Returns:
- a histogram.
- Throws:
OperationFailedException- if a histogram cannot be created.
-
countThreshold
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.
-