Class VoxelsConverterMulti
Object
VoxelsConverterMulti
Converts a channel from one voxel data-type to one of multiple other types.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<S,T> Voxels <S> convert(VoxelsUntyped voxels, VoxelsFactoryTypeBound<T> outputVoxelsFactory) Converts aVoxelsto another type.
-
Constructor Details
-
VoxelsConverterMulti
public VoxelsConverterMulti()
-
-
Method Details
-
convert
public <S,T> Voxels<S> convert(VoxelsUntyped voxels, VoxelsFactoryTypeBound<T> outputVoxelsFactory) Converts aVoxelsto another type.If
outputVoxelTypematches the existing data-type, the existingvoxelsis returned uncchanged.Otherwise a new
Voxelsof identical size is created for the new type.- Type Parameters:
S- voxel data type to convert from.T- voxel data type to convert to.- Parameters:
voxels- the voxels to convert.outputVoxelsFactory- a factory for creating the data-type to convert to.- Returns:
- a
Voxelsto matchoutputVoxelsFactory, either reused (if already identical, or newly-created).
-