Class NamedChannelsInput

Object
NamedChannelsInput
All Implemented Interfaces:
ProvidesStackInput, InputFromManager
Direct Known Subclasses:
NamedChannelsInputPart

public abstract class NamedChannelsInput extends Object implements ProvidesStackInput
Provides a set of channels as an input, with each channel having a name.

Only the first time-point is considered from each series.

Author:
Owen Feehan
  • Constructor Details

    • NamedChannelsInput

      public NamedChannelsInput()
  • Method Details

    • numberSeries

      public abstract int numberSeries() throws ImageIOException
      Number of series that exist.
      Returns:
      the number of series.
      Throws:
      ImageIOException - if the information cannot be successfully retrieved from the underlying image.
    • dimensions

      public abstract Dimensions dimensions(int seriesIndex, Logger logger) throws ImageIOException
      Dimensions of a particular series.
      Parameters:
      seriesIndex - the index of the series.
      logger - a logger for any non-fatal errors. Fatal errors throw an exception.
      Returns:
      the corresponding dimensions.
      Throws:
      ImageIOException - if the information cannot be successfully retrieved from the underlying image.
    • numberChannels

      public abstract int numberChannels(Logger logger) throws ImageIOException
      Number of channels.
      Parameters:
      logger - a logger for any non-fatal errors. Fatal errors throw an exception.
      Returns:
      the number of channels.
      Throws:
      ImageIOException - if the information cannot be successfully retrieved from the underlying image.
    • bitDepth

      public abstract int bitDepth(Logger logger) throws ImageIOException
      Bit-depth of image.
      Parameters:
      logger - a logger for any non-fatal errors. Fatal errors throw an exception.
      Returns:
      the bit-depth.
      Throws:
      ImageIOException - if the information cannot be successfully retrieved from the underlying image.
    • createChannelsForSeries

      public abstract NamedChannelsMap createChannelsForSeries(int seriesIndex, Logger logger) throws ImageIOException
      Creates a NamedChannelsMap representing the channels for a particular series in this input.
      Parameters:
      seriesIndex - the index of the series to use (beginning at 0).
      logger - the logger where informative or non-fatal error messages amy be written.
      Returns:
      a newly created NamedChannelsMap bound to seriesIndex.
      Throws:
      ImageIOException - if the operation cannot successfully complete.
    • metadata

      public abstract ImageMetadata metadata(int seriesIndex, Logger logger) throws ImageIOException
      The image-metadata associated with a particular series.
      Parameters:
      seriesIndex - the index of the series.
      logger - the logger.
      Returns:
      the metadata.
      Throws:
      ImageIOException - if the metadata cannot be calculated.
    • addToStoreInferNames

      public void addToStoreInferNames(NamedProviderStore<TimeSeries> stacks, int seriesIndex, Logger logger) throws OperationFailedException
      Description copied from interface: ProvidesStackInput
      Adds any stacks exposed by the current element to a named-store of stacks - inferring the names of the Stacks.
      Specified by:
      addToStoreInferNames in interface ProvidesStackInput
      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

      public void addToStoreWithName(String name, NamedProviderStore<TimeSeries> stacks, int seriesIndex, Logger logger) throws OperationFailedException
      Description copied from interface: ProvidesStackInput
      Adds any stacks exposed by the current element to a named-store of stacks - with a particular name.
      Specified by:
      addToStoreWithName in interface ProvidesStackInput
      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.
    • numberFrames

      public int numberFrames()
      Description copied from interface: ProvidesStackInput
      The number of time-frames in the underlying input image.
      Specified by:
      numberFrames in interface ProvidesStackInput
      Returns:
      the number of time-frames.