Class ChannelSource
Object
ChannelSource
Extracts a set of
Channels from a NamedStacks, optionally resizing.
Checks may be applied to make sure all channels have the same voxel data-type.
-
Constructor Summary
ConstructorsConstructorDescriptionChannelSource(NamedStacks stackStore, ConsistentChannelChecker channelChecker, Optional<SizeXY> resizeTo, VoxelsResizer resizer) Creates a newChannelSourceinstance. -
Method Summary
Modifier and TypeMethodDescriptionextractChannel(String stackName, boolean checkType) extractChannel(String stackName, boolean checkType, int index) extractChannel(Stack stack, boolean checkType, int index)
-
Constructor Details
-
ChannelSource
public ChannelSource(NamedStacks stackStore, ConsistentChannelChecker channelChecker, Optional<SizeXY> resizeTo, VoxelsResizer resizer) Creates a newChannelSourceinstance.
-
-
Method Details
-
extractChannel
- Parameters:
stackName- the name of theStackwhich contains the channel.checkType- if true, a call occurs toConsistentChannelCheckerto ensure allChannels have consistent voxel data-type.- Returns:
- the extracted
Channel, reused fromstackStore. - Throws:
OperationFailedException- if theStackis not single-channeled, or if non-consistent voxel data-type occurs.
-
extractChannel
public Channel extractChannel(String stackName, boolean checkType, int index) throws OperationFailedException - Parameters:
stackName- the name of theStackwhich contains the channel.checkType- if true, a call occurs toConsistentChannelCheckerto ensure allChannels have consistent voxel data-type.index- the index of the channel to extract from theStack.- Returns:
- the extracted
Channel, reused fromstackStore. - Throws:
OperationFailedException- if theStackcannot be retrieved, or if non-consistent voxel data-type occurs.
-
extractChannel
public Channel extractChannel(Stack stack, boolean checkType, int index) throws OperationFailedException - Parameters:
stack- theStackfrom which to extract the channel.checkType- if true, a call occurs toConsistentChannelCheckerto ensure allChannels have consistent voxel data-type.index- the index of the channel to extract from theStack.- Returns:
- the extracted
Channel, possibly resized. - Throws:
OperationFailedException- if non-consistent voxel data-type occurs.
-
getStackStore
-