Class OneOrThreeChannelsWriter
- Direct Known Subclasses:
ImageIOWriter,OpenCVWriter
A base-class for a
StackWriter that writes an image that has either one or three
channels.
The StackWriter must also support a flexible extension, which the user can specify.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfileFormat(StackWriteOptions writeOptions) The file format that will be written by the generator.Which extension to use to write the image (without any leading period).voidsetExtension(String extension) Which extension to use to write the image (without any leading period).voidwriteStack(Stack stack, Path filePath, StackWriteOptions options) Writes a stack to the filesystem at a particular path.protected abstract voidwriteStackAfterCheck(Stack stack, Path filePath) Writes theStackto the file-system, after a check has already occurred that the correct number of channels exist.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
-
OneOrThreeChannelsWriter
public OneOrThreeChannelsWriter()
-
-
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.
-
writeStackAfterCheck
Writes theStackto the file-system, after a check has already occurred that the correct number of channels exist.- Parameters:
stack- the stack to write.filePath- the path to write the image to.- Throws:
ImageIOException- if unable to successfully write the image.
-
getExtension
Which extension to use to write the image (without any leading period). -
setExtension
Which extension to use to write the image (without any leading period).
-