loci.formats.out
Class TiffWriter

java.lang.Object
  extended by loci.formats.FormatHandler
      extended by loci.formats.FormatWriter
          extended by loci.formats.out.TiffWriter
All Implemented Interfaces:
IFormatHandler, IFormatWriter, StatusReporter
Direct Known Subclasses:
OMETiffWriter

public class TiffWriter
extends FormatWriter

TiffWriter is the file format writer for TIFF files.

Source code:
Trac, SVN


Field Summary
protected  Vector imageCounts
          Image counts for each open series.
protected  int lastOffset
          The last offset written to.
protected  BufferedOutputStream out
          Current output stream.
 
Fields inherited from class loci.formats.FormatWriter
cm, compression, compressionTypes, fps, initialized, metadataRetrieve
 
Fields inherited from class loci.formats.FormatHandler
currentId, debug, debugLevel, format, statusListeners, suffixes
 
Constructor Summary
TiffWriter()
           
TiffWriter(String format, String[] exts)
           
 
Method Summary
 boolean canDoStacks()
          Reports whether the writer can save multiple images to a single file.
 void close()
          Closes currently open file(s) and frees allocated memory.
 void saveImage(Image image, boolean last)
          Saves the given image to the current file.
 void saveImage(Image image, Hashtable ifd, boolean last)
          Saves the given image to the specified (possibly already open) file.
 void saveImage(Image image, Hashtable ifd, int series, boolean lastInSeries, boolean last)
          Saves the given image to the specified series in 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 saveImage(String id, Image image, Hashtable ifd, boolean last)
          Deprecated. Replaced by saveImage(Image, Hashtable, boolean)
 
Methods inherited from class loci.formats.FormatWriter
canDoStacks, getColorModel, getCompressionTypes, getFramesPerSecond, getMetadataRetrieve, getPixelTypes, getPixelTypes, isSupportedType, isSupportedType, save, saveBytes, saveBytes, setColorModel, setCompression, setFramesPerSecond, setId, setMetadataRetrieve
 
Methods inherited from class loci.formats.FormatHandler
addStatusListener, debug, getFormat, getStatusListeners, getSuffixes, isThisType, isThisType, removeStatusListener, setDebug, setDebugLevel, setId, status, status, status, trace, trace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface loci.formats.IFormatHandler
getFormat, getSuffixes, isThisType, isThisType, setId
 
Methods inherited from interface loci.formats.StatusReporter
addStatusListener, getStatusListeners, removeStatusListener
 

Field Detail

lastOffset

protected int lastOffset
The last offset written to.


out

protected BufferedOutputStream out
Current output stream.


imageCounts

protected Vector imageCounts
Image counts for each open series.

Constructor Detail

TiffWriter

public TiffWriter()

TiffWriter

public TiffWriter(String format,
                  String[] exts)
Method Detail

saveImage

public void saveImage(Image image,
                      Hashtable ifd,
                      boolean last)
               throws IOException,
                      FormatException
Saves the given image to the specified (possibly already open) file. The IFD hashtable allows specification of TIFF parameters such as bit depth, compression and units. If this image is the last one in the file, the last flag must be set.

Throws:
IOException
FormatException

saveImage

public void saveImage(Image image,
                      Hashtable ifd,
                      int series,
                      boolean lastInSeries,
                      boolean last)
               throws IOException,
                      FormatException
Saves the given image to the specified series in the current file. The IFD hashtable allows specification of TIFF parameters such as bit depth, compression and units. 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:
IOException
FormatException

saveImage

public void saveImage(Image image,
                      boolean last)
               throws FormatException,
                      IOException
Description copied from interface: IFormatWriter
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

public void saveImage(Image image,
                      int series,
                      boolean lastInSeries,
                      boolean last)
               throws FormatException,
                      IOException
Description copied from interface: IFormatWriter
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.

Specified by:
saveImage in interface IFormatWriter
Overrides:
saveImage in class FormatWriter
Throws:
FormatException
IOException

canDoStacks

public boolean canDoStacks()
Description copied from interface: IFormatWriter
Reports whether the writer can save multiple images to a single file.

Specified by:
canDoStacks in interface IFormatWriter
Overrides:
canDoStacks in class FormatWriter

close

public void close()
           throws IOException
Description copied from interface: IFormatHandler
Closes currently open file(s) and frees allocated memory.

Throws:
IOException

saveImage

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

Throws:
IOException
FormatException