Interface ProvidesStackInput

All Superinterfaces:
InputFromManager
All Known Subinterfaces:
StackSequenceInput
All Known Implementing Classes:
ConvertNamedChannelsInputToStack, MultiInput, NamedChannelsInput, NamedChannelsInputPart

public interface ProvidesStackInput extends InputFromManager
Base class for inputs which somehow eventually send up providing stacks, with or without names.
Author:
Owen Feehan
  • Method Details

    • asStack

      default Stack asStack(Logger logger) throws OperationFailedException
      Exposes the input as a single Stack throw an error if more than one exists.
      Parameters:
      logger - a logger for any non-fatal errors. Fatal errors throw an exception.
      Returns:
      the single stack.
      Throws:
      OperationFailedException - if more than one stack exists, or otherwise a fatal error occurs loading the stacks.
    • asSet

      default NamedStacks asSet(Logger logger) throws OperationFailedException
      Exposes the input as a set of named stacks (inferring the names).
      Parameters:
      logger - a logger for any non-fatal errors. Fatal errors throw an exception.
      Returns:
      a set of named-stacks.
      Throws:
      OperationFailedException - if a fatal error occurs loading the stack.
    • addToStoreInferNames

      default void addToStoreInferNames(NamedProviderStore<Stack> store, Logger logger) throws OperationFailedException
      Adds the current object to a named-store of stacks (using the default series).
      Parameters:
      store - the store.
      logger - a logger for any non-fatal errors. Fatal errors throw an exception.
      Throws:
      OperationFailedException - if the operation cannot successfully complete.
    • numberFrames

      int numberFrames() throws OperationFailedException
      The number of time-frames in the underlying input image.
      Returns:
      the number of time-frames.
      Throws:
      OperationFailedException - if the operation cannot successfully complete.
    • addToStoreInferNames

      void addToStoreInferNames(NamedProviderStore<TimeSeries> stacks, int seriesIndex, Logger logger) throws OperationFailedException
      Adds any stacks exposed by the current element to a named-store of stacks - inferring the names of the Stacks.
      Parameters:
      stacks - the named-store of stacks.
      seriesIndex - the index of the series (beginning at 0) to retrieve stacks from the TimeSeries.
      logger - a logger for any non-fatal errors. Fatal errors throw an exception.
      Throws:
      OperationFailedException - if the operation cannot successfully complete.
    • addToStoreWithName

      void addToStoreWithName(String name, NamedProviderStore<TimeSeries> stacks, int seriesIndex, Logger logger) throws OperationFailedException
      Adds any stacks exposed by the current element to a named-store of stacks - with a particular name.
      Parameters:
      name - the name to use for the added stack.
      stacks - the named-store of stacks.
      seriesIndex - the index of the series (beginning at 0) to retrieve stacks from the TimeSeries.
      logger - a logger for any non-fatal errors. Fatal errors throw an exception.
      Throws:
      OperationFailedException - if the operation cannot successfully complete.