public class VoxelStatisticsCombined extends Object implements VoxelStatistics
VoxelStatistics
as if they were one.Constructor and Description |
---|
VoxelStatisticsCombined() |
Modifier and Type | Method and Description |
---|---|
void |
add(VoxelStatistics element)
Adds an element.
|
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 void add(VoxelStatistics element)
element
- an element to add.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)
VoxelStatistics
quantile
in interface VoxelStatistics
quantile
- the quantile, which should always be >= 0
and <= 1
.public Histogram histogram() throws OperationFailedException
VoxelStatistics
Histogram
of all voxel values.histogram
in interface VoxelStatistics
OperationFailedException
- if a histogram cannot be created.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.