Class VoxelStatisticsFromHistogram
Object
VoxelStatisticsFromHistogram
- All Implemented Interfaces:
VoxelStatistics
Calculates statistics from a
Histogram
of voxel intensities.- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionVoxelStatisticsFromHistogram
(Histogram histogram) Creates a newVoxelStatisticsFromHistogram
instance. -
Method Summary
Modifier and TypeMethodDescriptionlong
countThreshold
(RelationToThreshold relationToThreshold) Counts the number of voxels that exist, relative to a threshold.AHistogram
of all voxel values.double
quantile
(double quantile) The voxel value corresponding to a particular quantile.long
size()
The total count.long
sum()
The sum of all voxel values.long
The sum of the square of all voxel values.threshold
(RelationToThreshold relationToThreshold) Derives statistics only of the voxels that satisfy a condition, relative to a threshold.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.anchoranalysis.image.voxel.statistics.VoxelStatistics
mean, stdDev, variance
-
Constructor Details
-
VoxelStatisticsFromHistogram
Creates a newVoxelStatisticsFromHistogram
instance.- Parameters:
histogram
- The histogram to calculate statistics from.
-
-
Method Details
-
size
public long size()Description copied from interface:VoxelStatistics
The total count.- Specified by:
size
in interfaceVoxelStatistics
- 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 interfaceVoxelStatistics
- 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 interfaceVoxelStatistics
- Returns:
- the sum-of-squares.
-
quantile
Description copied from interface:VoxelStatistics
The voxel value corresponding to a particular quantile.- Specified by:
quantile
in interfaceVoxelStatistics
- Parameters:
quantile
- the quantile, which should always be>= 0
and<= 1
.- Returns:
- the voxel value corresponding to the quantile.
- Throws:
OperationFailedException
- ifquantile
is out-of-range.
-
histogram
Description copied from interface:VoxelStatistics
AHistogram
of all voxel values.- Specified by:
histogram
in interfaceVoxelStatistics
- Returns:
- a histogram.
-