public class VoxelStatisticsFromHistogram extends Object implements VoxelStatistics
Histogram
of voxel intensities.Constructor and Description |
---|
VoxelStatisticsFromHistogram(Histogram histogram) |
Modifier and Type | Method and Description |
---|---|
long |
countThreshold(RelationToThreshold relationToThreshold)
Counts the number of voxels that exist, relative to a threshold.
|
Histogram |
histogram()
A
Histogram 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 |
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
mean, stdDev, variance
public VoxelStatisticsFromHistogram(Histogram histogram)
public long size()
VoxelStatistics
size
in interface VoxelStatistics
public long sum()
VoxelStatistics
sum
in interface VoxelStatistics
public long sumOfSquares()
VoxelStatistics
sumOfSquares
in interface VoxelStatistics
public VoxelStatistics threshold(RelationToThreshold relationToThreshold)
VoxelStatistics
threshold
in interface VoxelStatistics
relationToThreshold
- the condition that must be satisfied for voxels to be included in
the statistics.VoxelStatistics
pertaining only to the voxels that satisfy the
condition.public long countThreshold(RelationToThreshold relationToThreshold)
VoxelStatistics
This methods conveniently avoids overhead with assigning new memory when counting.
countThreshold
in interface VoxelStatistics
relationToThreshold
- defines the relation to a threshold e.g. above a number, or below
a number.relationToThreshold
.public double quantile(double quantile) throws OperationFailedException
VoxelStatistics
quantile
in interface VoxelStatistics
quantile
- the quantile, which should always be >= 0
and <= 1
.OperationFailedException
- if quantile
is out-of-range.public Histogram histogram()
VoxelStatistics
Histogram
of all voxel values.histogram
in interface VoxelStatistics
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.