public class VoxelsFactory extends VoxelDataTypeFactoryMultiplexer<VoxelsFactoryTypeBound<?>>
VoxelsUntyped
and provides a singleton location for implementations of VoxelsFactoryTypeBound
for different types.Modifier and Type | Method and Description |
---|---|
VoxelsUntyped |
createEmpty(Extent extent,
VoxelDataType dataType)
Creates empty voxels to match a particular size.
|
<T> VoxelsUntyped |
createFrom(SliceBufferIndex<T> buffer,
VoxelDataType dataType)
Creates voxels from a particular
SliceBufferIndex with specified type. |
static VoxelsFactoryTypeBound<FloatBuffer> |
getFloat()
A factory that creates voxels of type float.
|
static VoxelsFactoryTypeBound<UnsignedByteBuffer> |
getUnsignedByte()
A factory that creates voxels of type unsigned byte.
|
static VoxelsFactoryTypeBound<UnsignedIntBuffer> |
getUnsignedInt()
A factory that creates voxels of type unsigned int.
|
static VoxelsFactoryTypeBound<UnsignedShortBuffer> |
getUnsignedShort()
A factory that creates voxels of type unsigned short.
|
static VoxelsFactory |
instance()
Singleton instance.
|
get
public static VoxelsFactory instance()
public <T> VoxelsUntyped createFrom(SliceBufferIndex<T> buffer, VoxelDataType dataType)
SliceBufferIndex
with specified type.T
- the buffer-type to use in the voxels.buffer
- the buffer to create a VoxelsUntyped
from.dataType
- the data-type that should be compatible with T
.VoxelsUntyped
that reuses the memory in buffer
.public VoxelsUntyped createEmpty(Extent extent, VoxelDataType dataType)
extent
- the size of the VoxelsUntyped
to create.dataType
- the voxel data-type to create.public static VoxelsFactoryTypeBound<UnsignedByteBuffer> getUnsignedByte()
public static VoxelsFactoryTypeBound<UnsignedShortBuffer> getUnsignedShort()
public static VoxelsFactoryTypeBound<UnsignedIntBuffer> getUnsignedInt()
public static VoxelsFactoryTypeBound<FloatBuffer> getFloat()
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.