Class BioformatsWriter
Base class for writing a stack to the filesystem using the Bioformats library.
The following formats are supported with a variety of number of channels and stacks:
- unsigned 8-bit
- unsigned 16-bit
- unsigned 32-bit
- float
Note that not all implementations support writing as RGB. When they do, it insists on three channels, and only supported unsigned 8-bit or unsigned-16 bit as channel types.
If a stack has heterogeneous channel types (i.e. not all channels have the same type) then it writes all channels with the most generic type (e.g. most bits).
- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionBioformatsWriter
(boolean supportsRGB) Creates a newBioformatsWriter
instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract loci.formats.IFormatWriter
Creates or gets an instance ofIFormatWriter
which dictates the file format to use for writing.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
fileFormat, fileFormatWarnUnexpected, writeStackWithExtension
Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
BioformatsWriter
public BioformatsWriter(boolean supportsRGB) Creates a newBioformatsWriter
instance.- Parameters:
supportsRGB
- Whether the writer supports writing RGB images or not.
-
-
Method Details
-
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.
-
createWriter
Creates or gets an instance ofIFormatWriter
which dictates the file format to use for writing.- Returns:
- a newly created writer.
- Throws:
ImageIOException
- if a writer cannot be created successfully.
-