T
- type to convert to (destination-type)public abstract class ChannelConverter<T> extends Object
Channel
s from one type to another specific type.Modifier | Constructor and Description |
---|---|
protected |
ChannelConverter(VoxelDataType targetDataType,
VoxelsConverter<T> voxelsConverter,
VoxelsFactoryTypeBound<T> voxelsFactory) |
Modifier and Type | Method and Description |
---|---|
Channel |
convert(Channel channel,
ConversionPolicy changeExisting)
Converts
channel to have voxels with data-type T . |
Stack |
convert(Stack stack,
ConversionPolicy changeExisting)
Like
convert(Channel, ConversionPolicy) but converts every channel in a Stack . |
VoxelsConverter<T> |
getVoxelsConverter()
A converter used to change the
Voxels to targetDataType . |
protected ChannelConverter(VoxelDataType targetDataType, VoxelsConverter<T> voxelsConverter, VoxelsFactoryTypeBound<T> voxelsFactory)
public Stack convert(Stack stack, ConversionPolicy changeExisting)
convert(Channel, ConversionPolicy)
but converts every channel in a Stack
.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.Stack
containing converted versions of each respective
channel in stack
.public Channel convert(Channel channel, ConversionPolicy changeExisting)
channel
to have voxels with data-type T
.
This can occur by either replacing the existing voxels in the channel, or creating a new channel entirely.
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.public VoxelsConverter<T> getVoxelsConverter()
Voxels
to targetDataType
.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.