loci.formats
Interface IFormatWriter

All Superinterfaces:
IFormatHandler, StatusReporter
All Known Implementing Classes:
AVIWriter, EPSWriter, FormatWriter, ImageIOWriter, ImageWriter, JPEGWriter, LegacyQTWriter, OMETiffWriter, PNGWriter, QTWriter, TiffWriter

public interface IFormatWriter
extends IFormatHandler

Interface for all biological file format writers.

Source code:
Trac, SVN


Method Summary
 boolean canDoStacks()
          Reports whether the writer can save multiple images to a single file.
 boolean canDoStacks(String id)
          Deprecated. Replaced by canDoStacks()
 ColorModel getColorModel()
          Gets the color model.
 String[] getCompressionTypes()
          Gets the available compression types.
 int getFramesPerSecond()
          Gets the frames per second to use when writing.
 MetadataRetrieve getMetadataRetrieve()
          Retrieves the current metadata retrieval object for this writer.
 int[] getPixelTypes()
          Gets the supported pixel types.
 int[] getPixelTypes(String id)
          Deprecated. Replaced by getPixelTypes()
 boolean isSupportedType(int type)
          Checks if the given pixel type is supported.
 boolean isSupportedType(String id, int type)
          Deprecated. Replaced by isSupportedType(int type)
 void save(String id, Image image, boolean last)
          Deprecated. Replaced by saveImage(Image, boolean)
 void saveBytes(byte[] bytes, boolean last)
          Saves the given byte array to the current file.
 void saveBytes(byte[] bytes, int series, boolean lastInSeries, boolean last)
          Saves the given byte array to the given series in the current file.
 void saveImage(Image image, boolean last)
          Saves the given image to the current file.
 void saveImage(Image image, int series, boolean lastInSeries, boolean last)
          Saves the given image to the given series in the current file.
 void setColorModel(ColorModel cm)
          Sets the color model.
 void setCompression(String compress)
          Sets the current compression type.
 void setFramesPerSecond(int rate)
          Sets the frames per second to use when writing.
 void setMetadataRetrieve(MetadataRetrieve r)
          Sets the metadata retrieval object from which to retrieve standardized metadata.
 
Methods inherited from interface loci.formats.IFormatHandler
close, getFormat, getSuffixes, isThisType, isThisType, setId, setId
 
Methods inherited from interface loci.formats.StatusReporter
addStatusListener, getStatusListeners, removeStatusListener
 

Method Detail

saveImage

void saveImage(Image image,
               boolean last)
               throws FormatException,
                      IOException
Saves the given image to the current file. If this image is the last one in the file, the last flag must be set.

Throws:
FormatException
IOException

saveImage

void saveImage(Image image,
               int series,
               boolean lastInSeries,
               boolean last)
               throws FormatException,
                      IOException
Saves the given image to the given series in the current file. If this image is the last one in the series, the lastInSeries flag must be set. If this image is the last one in the file, the last flag must be set.

Throws:
FormatException
IOException

saveBytes

void saveBytes(byte[] bytes,
               boolean last)
               throws FormatException,
                      IOException
Saves the given byte array to the current file. If this is the last array to be written, the last flag must be set.

Throws:
FormatException
IOException

saveBytes

void saveBytes(byte[] bytes,
               int series,
               boolean lastInSeries,
               boolean last)
               throws FormatException,
                      IOException
Saves the given byte array to the given series in the current file. If this is the last array in the series, the lastInSeries flag must be set. If this is the last array to be written, the last flag must be set.

Throws:
FormatException
IOException

canDoStacks

boolean canDoStacks()
Reports whether the writer can save multiple images to a single file.


setMetadataRetrieve

void setMetadataRetrieve(MetadataRetrieve r)
Sets the metadata retrieval object from which to retrieve standardized metadata.


getMetadataRetrieve

MetadataRetrieve getMetadataRetrieve()
Retrieves the current metadata retrieval object for this writer. You can be assured that this method will never return a null metadata retrieval object.

Returns:
A metadata retrieval object.

setColorModel

void setColorModel(ColorModel cm)
Sets the color model.


getColorModel

ColorModel getColorModel()
Gets the color model.


setFramesPerSecond

void setFramesPerSecond(int rate)
Sets the frames per second to use when writing.


getFramesPerSecond

int getFramesPerSecond()
Gets the frames per second to use when writing.


getCompressionTypes

String[] getCompressionTypes()
Gets the available compression types.


getPixelTypes

int[] getPixelTypes()
Gets the supported pixel types.


isSupportedType

boolean isSupportedType(int type)
Checks if the given pixel type is supported.


setCompression

void setCompression(String compress)
                    throws FormatException
Sets the current compression type.

Throws:
FormatException

canDoStacks

boolean canDoStacks(String id)
                    throws FormatException
Deprecated. Replaced by canDoStacks()

Throws:
FormatException

getPixelTypes

int[] getPixelTypes(String id)
                    throws FormatException,
                           IOException
Deprecated. Replaced by getPixelTypes()

Throws:
FormatException
IOException

isSupportedType

boolean isSupportedType(String id,
                        int type)
                        throws FormatException,
                               IOException
Deprecated. Replaced by isSupportedType(int type)

Throws:
FormatException
IOException

save

void save(String id,
          Image image,
          boolean last)
          throws FormatException,
                 IOException
Deprecated. Replaced by saveImage(Image, boolean)

Throws:
FormatException
IOException