Class StackWriterDelegateBase
- Direct Known Subclasses:
BranchChannels
,BranchStack
,BranchSuggestedFormat
A base class for a
StackWriter
delegates to another StackWriter
based on values
of a StackWriteAttributes
.- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfileFormat
(StackWriteOptions writeOptions) The file format that will be written by the generator.protected abstract StackWriter
selectDelegate
(StackWriteOptions writeOptions) Selects aStackWriter
to use as a delegate.void
writeStack
(Stack stack, Path filePath, StackWriteOptions options) Writes a stack to the filesystem at a particular path.Methods inherited from class org.anchoranalysis.image.io.bean.stack.writer.StackWriter
fileFormatWarnUnexpected, writeStackWithExtension
Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
StackWriterDelegateBase
public StackWriterDelegateBase()
-
-
Method Details
-
fileFormat
Description copied from class:StackWriter
The file format that will be written by the generator.- Specified by:
fileFormat
in classStackWriter
- 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 void writeStack(Stack stack, Path filePath, StackWriteOptions options) throws ImageIOException Description copied from class:StackWriter
Writes a stack to the filesystem at a particular path.- Specified by:
writeStack
in classStackWriter
- 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.
-
selectDelegate
protected abstract StackWriter selectDelegate(StackWriteOptions writeOptions) throws ImageIOException Selects aStackWriter
to use as a delegate.- Parameters:
writeOptions
- options that specify what kind of rasters will be written.- Returns:
- the selected
StackWriter
- Throws:
ImageIOException
-