public interface Writer extends HasFormat, HasSource
Writer components are used to save Plane objects (output from
the Reader.openPlane(int, long) methods) to a destination image location, via
the savePlane(int, long, io.scif.Plane) methods.
Plane,
Reader.openPlane(int, long)| Modifier and Type | Method and Description |
|---|---|
boolean |
canDoStacks() |
CodecOptions |
getCodecOptions() |
ColorModel |
getColorModel()
Gets the color model.
|
String |
getCompression() |
String[] |
getCompressionTypes()
Gets the available compression types.
|
int |
getFramesPerSecond() |
org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> |
getHandle()
Retrieves a reference to the output source that will be written to during
savePlane(int, long, io.scif.Plane) calls. |
Metadata |
getMetadata()
Gets the
Metadata that will be used when saving planes. |
int[] |
getPixelTypes(String codec)
Gets the supported pixel types for the given codec.
|
int |
getValidBits() |
boolean |
isInitialized(int imageIndex,
long planeIndex) |
void |
isSupportedCompression(String compress)
Checks if the given compression type is supported.
|
boolean |
isSupportedType(int type,
String codec)
Checks if the given pixel type is supported.
|
void |
savePlane(int imageIndex,
long planeIndex,
Plane plane)
Saves the provided plane to the specified image and plane index of this
Writer's destination image. |
void |
savePlane(int imageIndex,
long planeIndex,
Plane plane,
net.imglib2.Interval bounds)
Saves the specified tile (sub-region) of the provided plane to the
specified image and plane index of this
Writer's destination image. |
void |
setColorModel(ColorModel cm)
Sets the color model.
|
void |
setDest(org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> handle)
Sets the source that will be written to during
savePlane(int, long, io.scif.Plane) calls. |
void |
setDest(org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> handle,
int imageIndex)
As
setDest(DataHandle), with specification for source image index. |
void |
setDest(org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> handle,
int imageIndex,
SCIFIOConfig config)
As
setDest(DataHandle, int), with specification for new
configuration options. |
void |
setDest(org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> handle,
SCIFIOConfig config)
As
setDest(DataHandle), with specification for new configuration
options. |
void |
setDest(org.scijava.io.location.Location location)
Sets the source that will be written to during
savePlane(int, long, io.scif.Plane) calls. |
void |
setDest(org.scijava.io.location.Location location,
int imageIndex)
As
setDest(Location) with specification for source image index. |
void |
setDest(org.scijava.io.location.Location location,
int imageIndex,
SCIFIOConfig config)
As
setDest(Location, int) with specification for new configuration
options. |
void |
setDest(org.scijava.io.location.Location location,
SCIFIOConfig config)
As
setDest(Location) with specification for new configuration
options. |
void |
setMetadata(Metadata meta)
Provides this
Writer with a Metadata object to use when
interpreting Planes during calls to savePlane(int, long, io.scif.Plane). |
boolean |
writeSequential() |
getFormat, getFormatNamegetVersion, loggetIdentifiercontext, getContext, setContextcompareTo, getPriority, setPrioritygetInfo, setInfogetLocationvoid savePlane(int imageIndex,
long planeIndex,
Plane plane)
throws FormatException,
IOException
Writer's destination image.imageIndex - the image index within the dataset.planeIndex - the plane index within the image.plane - the pixels saveFormatException - if one of the parameters is invalid.IOException - if there was a problem writing to the file.void savePlane(int imageIndex,
long planeIndex,
Plane plane,
net.imglib2.Interval bounds)
throws FormatException,
IOException
Writer's destination image.imageIndex - the image index within the dataset.planeIndex - the plane index within the image.plane - the pixels savebounds - bounds of the planar axes.FormatException - if one of the parameters is invalid.IOException - if there was a problem writing to the file.boolean canDoStacks()
Writer can save multiple images to a single
file.void setMetadata(Metadata meta) throws FormatException
Writer with a Metadata object to use when
interpreting Planes during calls to savePlane(int, long, io.scif.Plane).
NB: This method has accepts a general Metadata so that this
signature can appear in the base interface for all Writers, but
behavior if provided with a Metadata instance not associated with
this Writer is undefined and should throw an exception.
meta - The Metadata to associate with this Writer.IllegalArgumentException - If the provided Metadata type is
not compatible with this Writer.FormatExceptionMetadata getMetadata()
Metadata that will be used when saving planes.Metadata associated with this Writer.void setDest(org.scijava.io.location.Location location) throws FormatException, IOException
savePlane(int, long, io.scif.Plane) calls.
NB: resets any configuration on this writer.location - The Location to where the image source will be
written.FormatExceptionIOExceptionvoid setDest(org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> handle) throws FormatException, IOException
savePlane(int, long, io.scif.Plane) calls.
NB: resets any configuration on this writer.handle - The image source to write to.FormatExceptionIOExceptionvoid setDest(org.scijava.io.location.Location location, int imageIndex) throws FormatException, IOException
setDest(Location) with specification for source image index.location - The Location of an image source to be written.imageIndex - The index within the source that will be written.FormatExceptionIOExceptionvoid setDest(org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> handle, int imageIndex) throws FormatException, IOException
setDest(DataHandle), with specification for source image index.handle - The image source to write to.imageIndex - The index within the source that will be written.FormatExceptionIOExceptionvoid setDest(org.scijava.io.location.Location location, SCIFIOConfig config) throws FormatException, IOException
setDest(Location) with specification for new configuration
options.location - The Location of an image source to be written.config - Configuration information to use for this write.FormatExceptionIOExceptionvoid setDest(org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> handle, SCIFIOConfig config) throws FormatException, IOException
setDest(DataHandle), with specification for new configuration
options.handle - The image source to write to.config - Configuration information to use for this write.FormatExceptionIOExceptionvoid setDest(org.scijava.io.location.Location location, int imageIndex, SCIFIOConfig config) throws FormatException, IOException
setDest(Location, int) with specification for new configuration
options.location - The Location of an image source to be written.imageIndex - The index within the source that will be written.config - Configuration information to use for this write.FormatExceptionIOExceptionvoid setDest(org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> handle, int imageIndex, SCIFIOConfig config) throws FormatException, IOException
setDest(DataHandle, int), with specification for new
configuration options.handle - The image source to write to.imageIndex - The index within the source that will be written.config - Configuration information to use for this write.FormatExceptionIOExceptionorg.scijava.io.handle.DataHandle<org.scijava.io.location.Location> getHandle()
savePlane(int, long, io.scif.Plane) calls.DataHandle} associated with this Writer.void setColorModel(ColorModel cm)
NB: the color model should be set before the output destination.
ColorModel getColorModel()
String[] getCompressionTypes()
int[] getPixelTypes(String codec)
boolean isSupportedType(int type,
String codec)
void isSupportedCompression(String compress) throws FormatException
FormatExceptionboolean isInitialized(int imageIndex,
long planeIndex)
String getCompression()
int getFramesPerSecond()
CodecOptions getCodecOptions()
CodecOptions used by this writer, if applicable.boolean writeSequential()
int getValidBits()
Copyright © 2011–2026 SCIFIO. All rights reserved.