Modifier and Type | Method and Description |
---|---|
Extent |
extent()
The size of each buffer.
|
default void |
iterateOverSlices(java.util.function.Consumer<VoxelBuffer<T>> sliceConsumer)
Calls
sliceConsumer once for each slice with the respective buffer. |
default void |
iterateOverSlicesAndOffsets(ProcessVoxelBufferUnary<T> process)
Calls
process for each offset in each slice. |
void |
replaceSlice(int z,
VoxelBuffer<T> sliceToAssign)
Replaces the voxels for a particular z-slice.
|
VoxelBuffer<T> |
slice(int z)
A
VoxelBuffer corresponding to a particular z-slice. |
default T |
sliceBuffer(int z)
The underlying buffer corresponding to a particular z-slice.
|
VoxelBuffer<T> slice(int z)
VoxelBuffer
corresponding to a particular z-slice.z
- the index (beginning at 0) of all z-slices.z
.default T sliceBuffer(int z)
z
- the index (beginning at 0) of all z-slices.z
.void replaceSlice(int z, VoxelBuffer<T> sliceToAssign)
z
- the index of z-slice to replace.sliceToAssign
- the voxels for the new slice to assign.Extent extent()
default void iterateOverSlices(java.util.function.Consumer<VoxelBuffer<T>> sliceConsumer)
sliceConsumer
once for each slice with the respective buffer.
This occurs sequentially from 0 (inclusive) to z()
(exclusive).
sliceConsumer
- called for each index (z-value).default void iterateOverSlicesAndOffsets(ProcessVoxelBufferUnary<T> process)
process
for each offset in each slice.
This occurs sequentially from 0 (inclusive) to extent.z()
(exclusive) and from 0
(inclusive) to extent.x() * extent.y()
(exclusive) for the offsets.
process
- called for each offset on each slice.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.