Class IterateVoxelsMask
Object
IterateVoxelsMask
Utilities for iterating over the subset of voxels corresponding to an on state in a
Mask
.
The utilities operate on one or more Voxels
. A processor is called on each selected
voxel.
- Author:
- Owen Feehan
-
Method Summary
Modifier and TypeMethodDescriptionstatic RunningSum
calculateRunningSum
(Mask mask, Voxels<UnsignedByteBuffer> voxelsIntensity) Calculates the sum and count across voxels intensity that correspond to on voxels on a maskstatic <T> void
withBuffer
(Mask mask, Voxels<T> voxels, ProcessBufferUnary<T> process) Iterate over each voxel in a mask - with an associated buffer for each slice from a voxel-bo
-
Method Details
-
withBuffer
Iterate over each voxel in a mask - with an associated buffer for each slice from a voxel-bo- Type Parameters:
T
- buffer-type for voxels- Parameters:
mask
- the mask is used as a condition on what voxels to iterate i.e. only voxels within these boundsvoxels
- voxels to iterate over (if the corresponding mask voxel is on)process
- is called for each voxel within the bounding-box using global coordinates.
-
calculateRunningSum
Calculates the sum and count across voxels intensity that correspond to on voxels on a maskThe
mask
must have equal extent tovoxelsIntensity
- Parameters:
mask
- only voxels who correspond to an on voxels in the mask are includedvoxelsIntensity
- the voxels whose intensity we wish to find the mean of (subject tomask
- Returns:
- the running-sum
-