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 newBioformatsWriterinstance. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract loci.formats.IFormatWriterCreates or gets an instance ofIFormatWriterwhich dictates the file format to use for writing.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
fileFormat, fileFormatWarnUnexpected, writeStackWithExtensionMethods 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 newBioformatsWriterinstance.- 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: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.
-
createWriter
Creates or gets an instance ofIFormatWriterwhich dictates the file format to use for writing.- Returns:
- a newly created writer.
- Throws:
ImageIOException- if a writer cannot be created successfully.
-