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
Channel
s from one type to another specific type.- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ChannelConverter
(VoxelDataType targetDataType, VoxelsConverter<T> voxelsConverter, VoxelsFactoryTypeBound<T> voxelsFactory) Creates a newChannelConverter
instance. -
Method Summary
Modifier and TypeMethodDescriptionconvert
(Channel channel, ConversionPolicy changeExisting) Convertschannel
to have voxels with data-typeT
.convert
(Stack stack, ConversionPolicy changeExisting) Likeconvert(Channel, ConversionPolicy)
but converts every channel in aStack
.A converter used to change theVoxels
totargetDataType
.
-
Constructor Details
-
ChannelConverter
protected ChannelConverter(VoxelDataType targetDataType, VoxelsConverter<T> voxelsConverter, VoxelsFactoryTypeBound<T> voxelsFactory) Creates a newChannelConverter
instance.
-
-
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
Stack
containing converted versions of each respective channel instack
.
-
convert
Convertschannel
to 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 theVoxels
totargetDataType
.
-