public abstract class OneOrThreeChannelsWriter extends StackWriter
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.
Constructor and Description |
---|
OneOrThreeChannelsWriter() |
Modifier and Type | Method and Description |
---|---|
ImageFileFormat |
fileFormat(StackWriteOptions writeOptions)
The file format that will be written by the generator.
|
String |
getExtension()
Which extension to use to write the image (without any leading period).
|
void |
setExtension(String extension)
Which extension to use to write the image (without any leading period).
|
void |
writeStack(Stack stack,
Path filePath,
StackWriteOptions options)
Writes a stack to the filesystem at a particular path.
|
protected abstract void |
writeStackAfterCheck(Stack stack,
Path filePath)
Writes the
Stack to the file-system, after a check has already occurred that the
correct number of channels exist. |
fileFormatWarnUnexpected, writeStackWithExtension
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
public ImageFileFormat fileFormat(StackWriteOptions writeOptions) throws ImageIOException
StackWriter
fileFormat
in class StackWriter
writeOptions
- options which may influence how a raster is written.ImageIOException
- if unable to successfully determine the file-format to use to write.public void writeStack(Stack stack, Path filePath, StackWriteOptions options) throws ImageIOException
StackWriter
writeStack
in class StackWriter
stack
- the stack to write.filePath
- the path to write the file to.options
- options which may influence how a raster is written.ImageIOException
- if anything goes wrong while writing.protected abstract void writeStackAfterCheck(Stack stack, Path filePath) throws ImageIOException
Stack
to the file-system, after a check has already occurred that the
correct number of channels exist.stack
- the stack to write.filePath
- the path to write the image to.ImageIOException
- if unable to successfully write the image.public String getExtension()
public void setExtension(String extension)
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.