Interface VoxelsFactoryTypeBound<T>
- Type Parameters:
T- buffer-type
public interface VoxelsFactoryTypeBound<T>
A factory for creating voxels with a particular buffer-type.
This class (and all its sub-classes) are immutable.
- Author:
- Owen Feehan
-
Method Summary
Modifier and Type Method Description Voxels<T>create(SliceBufferIndex<T> voxels)Create a newVoxelsthat has been initialized with buffers fromSliceBufferIndex.default BoundedVoxels<T>createBounded(BoundingBox box)Creates and initializes voxels that correspond to a particular bounding-box region.default Voxels<T>createForVoxelBuffer(VoxelBuffer<T> buffer, Extent extent)Create a newVoxelsthat has been initialized with a single-slice's memory buffers.Voxels<T>createInitialized(Extent extent)Create a newVoxelsthat has been initialized with memory buffers.Voxels<T>createUninitialized(Extent extent)Create a newVoxelsthat has not yet been initialized with memory buffers.VoxelDataTypedataType()The data-type of the voxels, as created by this factory.
-
Method Details
-
create
Create a newVoxelsthat has been initialized with buffers fromSliceBufferIndex.- Parameters:
voxels- the buffers to initialize with.- Returns:
- the newly created voxels.
-
createInitialized
Create a newVoxelsthat has been initialized with memory buffers.The voxel values in all initialized buffers are 0.
- Parameters:
extent- the size of voxels to create.- Returns:
- the newly created voxels.
-
createUninitialized
Create a newVoxelsthat has not yet been initialized with memory buffers.- Parameters:
extent- the size of voxels to create.- Returns:
- the newly created voxels.
-
dataType
VoxelDataType dataType()The data-type of the voxels, as created by this factory.- Returns:
- the voxel data-type.
-
createForVoxelBuffer
Create a newVoxelsthat has been initialized with a single-slice's memory buffers.- Parameters:
buffer- the voxels for a single-slice.extent- the size of voxels, that should be equal to the number of elements inbuffer.- Returns:
- the newly created voxels, containing a single z-slice.
-
createBounded
Creates and initializes voxels that correspond to a particular bounding-box region.- Parameters:
box- the bounding-box region.- Returns:
- newly created voxels of the same extent as
boxand retaining an association withbox.
-