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.Channel extractChannel​(String stackName, boolean checkType)
    Extracts a Channel from a particular Stack in stackStore.
    org.anchoranalysis.image.core.channel.Channel extractChannel​(String stackName, boolean checkType, int index)
    Extracts a Channel from a particular Stack in stackStore.
    org.anchoranalysis.image.core.channel.Channel extractChannel​(org.anchoranalysis.image.core.stack.Stack stack, boolean checkType, int index)
    Extracts a Channel from a given Stack.
    org.anchoranalysis.image.core.stack.named.NamedStacks getStackStore()
    A named set of Stacks from which Channels may be extracted.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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.OperationFailedException
      Extracts a Channel from a particular Stack in stackStore.

      This Stack must be single-channeled.

      Parameters:
      stackName - the name of the Stack which contains the channel.
      checkType - if true, a call occurs to ConsistentChannelChecker to ensure all Channels have consistent voxel data-type.
      Returns:
      the extracted Channel, reused from stackStore.
      Throws:
      org.anchoranalysis.core.exception.OperationFailedException - if the Stack is 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.OperationFailedException
      Extracts a Channel from a particular Stack in stackStore.
      Parameters:
      stackName - the name of the Stack which contains the channel.
      checkType - if true, a call occurs to ConsistentChannelChecker to ensure all Channels have consistent voxel data-type.
      index - the index of the channel to extract from the Stack.
      Returns:
      the extracted Channel, reused from stackStore.
      Throws:
      org.anchoranalysis.core.exception.OperationFailedException - if the Stack cannot 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.OperationFailedException
      Extracts a Channel from a given Stack.
      Parameters:
      stack - the Stack from which to extract the channel.
      checkType - if true, a call occurs to ConsistentChannelChecker to ensure all Channels have consistent voxel data-type.
      index - the index of the channel to extract from the Stack.
      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 of Stacks from which Channels may be extracted.