Direct Known Subclasses:
BranchExtension, FlattenAsChannel, ImposeResolution, MultiFileReader, OpenCVReader, ReadVoxelExtentXml, RejectIfConditionXYResolution, StackReaderOrientationCorrection

public abstract class StackReader extends AnchorBean<StackReader>
Reads an image-Stack from the file-system.
Author:
Owen Feehan
  • Constructor Details

    • StackReader

      public StackReader()
  • Method Details

    • readStack

      public Stack readStack(Path path, OperationContext context) throws ImageIOException
      Opens a file at path that should contain only a single-stack.

      This method should run as computationally quicky as possible. Image voxels should not yet be read.

      Parameters:
      path - the path of the image-file to open.
      context - context parameters.
      Returns:
      the stack that has been read.
      Throws:
      ImageIOException - if there is a series of stacks in the file, or if anything else goes wrong.
    • openFile

      public abstract OpenedImageFile openFile(Path path, ExecutionTimeRecorder executionTimeRecorder) throws ImageIOException
      Opens a file containing one or more images.

      This method should run as computationally quicky as possible. Image voxels should not yet be read.

      Parameters:
      path - where the file is located.
      executionTimeRecorder - records the execution-times of certain operations.
      Returns:
      an interface to the opened file that should be closed when no longer in use.
      Throws:
      ImageIOException - if the file cannot be read.