Class StackWriter
- Direct Known Subclasses:
BioformatsWriter
,ImageJRasterWriter
,OneOrThreeChannelsWriter
,StackWriterDelegateBase
,WriteResolutionXml
Writes a stack (i.e. raster) to the filesystem.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract ImageFileFormat
fileFormat
(StackWriteOptions writeOptions) The file format that will be written by the generator.fileFormatWarnUnexpected
(StackWriteOptions writeOptions, Optional<Logger> logger) The file format that will be written by the generator, warning with a log message if different to suggestion.abstract void
writeStack
(Stack stack, Path filePath, StackWriteOptions options) Writes a stack to the filesystem at a particular path.writeStackWithExtension
(Stack stack, Path filePath, StackWriteOptions options) Writes a stack to the filesystem at a particular path with an extension appended to the path.Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
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
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.
-