Interface SliceBufferIndex<T>
- Type Parameters:
T
- buffer-type
public interface SliceBufferIndex<T>
A container with voxel-buffers for each z-slice.
- Author:
- Owen Feehan
-
Method Summary
Modifier and TypeMethodDescriptionextent()
The size of each buffer.default void
iterateOverSlices
(Consumer<VoxelBuffer<T>> sliceConsumer) CallssliceConsumer
once for each slice with the respective buffer.default void
Callsprocess
for each offset in each slice.void
replaceSlice
(int z, VoxelBuffer<T> sliceToAssign) Replaces the voxels for a particular z-slice.slice
(int z) AVoxelBuffer
corresponding to a particular z-slice.default T
sliceBuffer
(int z) The underlying buffer corresponding to a particular z-slice.
-
Method Details
-
slice
AVoxelBuffer
corresponding to a particular z-slice.- Parameters:
z
- the index (beginning at 0) of all z-slices.- Returns:
- the corresponding buffer for
z
.
-
sliceBuffer
The underlying buffer corresponding to a particular z-slice.- Parameters:
z
- the index (beginning at 0) of all z-slices.- Returns:
- the corresponding buffer for
z
.
-
replaceSlice
Replaces the voxels for a particular z-slice.- Parameters:
z
- the index of z-slice to replace.sliceToAssign
- the voxels for the new slice to assign.
-
extent
Extent extent()The size of each buffer.- Returns:
- the size.
-
iterateOverSlices
CallssliceConsumer
once for each slice with the respective buffer.This occurs sequentially from 0 (inclusive) to
z()
(exclusive).- Parameters:
sliceConsumer
- called for each index (z-value).
-
iterateOverSlicesAndOffsets
Callsprocess
for each offset in each slice.This occurs sequentially from 0 (inclusive) to
extent.z()
(exclusive) and from 0 (inclusive) toextent.x() * extent.y()
(exclusive) for the offsets.- Parameters:
process
- called for each offset on each slice.
-