Class ChannelSource
Object
org.anchoranalysis.plugin.image.task.grouped.ChannelSource
public class ChannelSource extends Object
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
Constructors Constructor Description ChannelSource(org.anchoranalysis.image.core.stack.named.NamedStacks stackStore, org.anchoranalysis.image.bean.nonbean.ConsistentChannelChecker channelChecker, Optional<org.anchoranalysis.image.bean.spatial.SizeXY> resizeTo, org.anchoranalysis.image.voxel.resizer.VoxelsResizer resizer) -
Method Summary
Modifier and Type Method Description org.anchoranalysis.image.core.channel.ChannelextractChannel(String stackName, boolean checkType)Extracts aChannelfrom a particularStackinstackStore.org.anchoranalysis.image.core.channel.ChannelextractChannel(String stackName, boolean checkType, int index)Extracts aChannelfrom a particularStackinstackStore.org.anchoranalysis.image.core.channel.ChannelextractChannel(org.anchoranalysis.image.core.stack.Stack stack, boolean checkType, int index)Extracts aChannelfrom a givenStack.org.anchoranalysis.image.core.stack.named.NamedStacksgetStackStore()A named set ofStacks from whichChannels may be extracted.
-
Constructor Details
-
ChannelSource
public ChannelSource(org.anchoranalysis.image.core.stack.named.NamedStacks stackStore, org.anchoranalysis.image.bean.nonbean.ConsistentChannelChecker channelChecker, Optional<org.anchoranalysis.image.bean.spatial.SizeXY> resizeTo, org.anchoranalysis.image.voxel.resizer.VoxelsResizer resizer)
-
-
Method Details
-
extractChannel
public org.anchoranalysis.image.core.channel.Channel extractChannel(String stackName, boolean checkType) throws org.anchoranalysis.core.exception.OperationFailedExceptionExtracts aChannelfrom a particularStackinstackStore.This
Stackmust be single-channeled.- 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:
org.anchoranalysis.core.exception.OperationFailedException- if theStackis not single-channeled, or if non-consistent voxel data-type occurs.
-
extractChannel
public org.anchoranalysis.image.core.channel.Channel extractChannel(String stackName, boolean checkType, int index) throws org.anchoranalysis.core.exception.OperationFailedExceptionExtracts aChannelfrom a particularStackinstackStore.- 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:
org.anchoranalysis.core.exception.OperationFailedException- if theStackcannot be retrieved, or if non-consistent voxel data-type occurs.
-
extractChannel
public org.anchoranalysis.image.core.channel.Channel extractChannel(org.anchoranalysis.image.core.stack.Stack stack, boolean checkType, int index) throws org.anchoranalysis.core.exception.OperationFailedExceptionExtracts aChannelfrom a givenStack.- 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:
org.anchoranalysis.core.exception.OperationFailedException- if non-consistent voxel data-type occurs.
-
getStackStore
public org.anchoranalysis.image.core.stack.named.NamedStacks getStackStore()A named set ofStacks from whichChannels may be extracted.
-