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 StackWriterselectDelegate(StackWriteOptions writeOptions) Selects aStackWriterto use as a delegate.voidwriteStack(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, writeStackWithExtensionMethods 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:StackWriterThe file format that will be written by the generator.- Specified by:
fileFormatin 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:StackWriterWrites a stack to the filesystem at a particular path.- Specified by:
writeStackin 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 aStackWriterto use as a delegate.- Parameters:
writeOptions- options that specify what kind of rasters will be written.- Returns:
- the selected
StackWriter - Throws:
ImageIOException
-