Class ChannelConverter<T>
Object
ChannelConverter<T>
- Type Parameters:
T- type to convert to (destination-type)
- Direct Known Subclasses:
ToFloat,ToUnsignedByte,ToUnsignedByteScaleByMinMaxValue,ToUnsignedShort
Base class to convert
Channels from one type to another specific type.- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedChannelConverter(VoxelDataType targetDataType, VoxelsConverter<T> voxelsConverter, VoxelsFactoryTypeBound<T> voxelsFactory) Creates a newChannelConverterinstance. -
Method Summary
Modifier and TypeMethodDescriptionconvert(Channel channel, ConversionPolicy changeExisting) Convertschannelto have voxels with data-typeT.convert(Stack stack, ConversionPolicy changeExisting) Likeconvert(Channel, ConversionPolicy)but converts every channel in aStack.A converter used to change theVoxelstotargetDataType.
-
Constructor Details
-
ChannelConverter
protected ChannelConverter(VoxelDataType targetDataType, VoxelsConverter<T> voxelsConverter, VoxelsFactoryTypeBound<T> voxelsFactory) Creates a newChannelConverterinstance.
-
-
Method Details
-
convert
Likeconvert(Channel, ConversionPolicy)but converts every channel in aStack.- Parameters:
stack- the stack whose channels will be converted.changeExisting- if true, the existing channels will be changed in-place, otherwise a new channel will be created.- Returns:
- a newly created
Stackcontaining converted versions of each respective channel instack.
-
convert
Convertschannelto have voxels with data-typeT.This can occur by either replacing the existing voxels in the channel, or creating a new channel entirely.
- Parameters:
channel- channel whose voxels will be converted.changeExisting- if true, the existing channels will be changed in-place, otherwise a new channel will be created.- Returns:
- the converted channel, either the existing channel, or a newly-created one, as per above.
-
getVoxelsConverter
A converter used to change theVoxelstotargetDataType.
-