Class ChannelSource
Object
ChannelSource
Extracts a set of
Channel
s 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 newChannelSource
instance. -
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 newChannelSource
instance.
-
-
Method Details
-
extractChannel
- Parameters:
stackName
- the name of theStack
which contains the channel.checkType
- if true, a call occurs toConsistentChannelChecker
to ensure allChannel
s have consistent voxel data-type.- Returns:
- the extracted
Channel
, reused fromstackStore
. - Throws:
OperationFailedException
- if theStack
is 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 theStack
which contains the channel.checkType
- if true, a call occurs toConsistentChannelChecker
to ensure allChannel
s have consistent voxel data-type.index
- the index of the channel to extract from theStack
.- Returns:
- the extracted
Channel
, reused fromstackStore
. - Throws:
OperationFailedException
- if theStack
cannot be retrieved, or if non-consistent voxel data-type occurs.
-
extractChannel
public Channel extractChannel(Stack stack, boolean checkType, int index) throws OperationFailedException - Parameters:
stack
- theStack
from which to extract the channel.checkType
- if true, a call occurs toConsistentChannelChecker
to ensure allChannel
s 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
-