Direct Known Subclasses:
BioformatsWriter, ImageJRasterWriter, OneOrThreeChannelsWriter, StackWriterDelegateBase, WriteResolutionXml

public abstract class StackWriter extends AnchorBean<StackWriter>
Writes a stack (i.e. raster) to the filesystem.
Author:
Owen Feehan
  • Constructor Details

    • StackWriter

      public StackWriter()
  • Method Details

    • writeStackWithExtension

      public Path writeStackWithExtension(Stack stack, Path filePath, StackWriteOptions options) throws ImageIOException
      Writes a stack to the filesystem at a particular path with an extension appended to the path.
      Parameters:
      stack - the stack to write.
      filePath - the path to write the file to, apart from an extension.
      options - options which may influence how a raster is written.
      Returns:
      the full path (including extension) used for writing.
      Throws:
      ImageIOException - if anything goes wrong while writing.
    • fileFormatWarnUnexpected

      public ImageFileFormat fileFormatWarnUnexpected(StackWriteOptions writeOptions, Optional<Logger> logger) throws ImageIOException
      The file format that will be written by the generator, warning with a log message if different to suggestion.
      Parameters:
      writeOptions - options which may influence how a raster is written.
      logger - the logger to use for the warning message.
      Returns:
      the image file-format.
      Throws:
      ImageIOException - if unable to successfully determine the file-format to use to write.
    • fileFormat

      public abstract ImageFileFormat fileFormat(StackWriteOptions writeOptions) throws ImageIOException
      The file format that will be written by the generator.
      Parameters:
      writeOptions - options which may influence how a raster is written.
      Returns:
      the image file-format.
      Throws:
      ImageIOException - if unable to successfully determine the file-format to use to write.
    • writeStack

      public abstract void writeStack(Stack stack, Path filePath, StackWriteOptions options) throws ImageIOException
      Writes a stack to the filesystem at a particular path.
      Parameters:
      stack - the stack to write.
      filePath - the path to write the file to.
      options - options which may influence how a raster is written.
      Throws:
      ImageIOException - if anything goes wrong while writing.