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:
loci.formats.IFormatHandler, loci.formats.IFormatWriter, loci.formats.StatusReporter
Direct Known Subclasses:
OMETiffWriter

public class TiffWriter
extends loci.formats.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()
           
 void close()
           
 void saveImage(Image image, boolean last)
           
 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)
           
 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,
                      loci.formats.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
loci.formats.FormatException

saveImage

public void saveImage(Image image,
                      Hashtable ifd,
                      int series,
                      boolean lastInSeries,
                      boolean last)
               throws IOException,
                      loci.formats.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
loci.formats.FormatException

saveImage

public void saveImage(Image image,
                      boolean last)
               throws loci.formats.FormatException,
                      IOException
Throws:
loci.formats.FormatException
IOException

saveImage

public void saveImage(Image image,
                      int series,
                      boolean lastInSeries,
                      boolean last)
               throws loci.formats.FormatException,
                      IOException
Specified by:
saveImage in interface loci.formats.IFormatWriter
Overrides:
saveImage in class loci.formats.FormatWriter
Throws:
loci.formats.FormatException
IOException

canDoStacks

public boolean canDoStacks()
Specified by:
canDoStacks in interface loci.formats.IFormatWriter
Overrides:
canDoStacks in class loci.formats.FormatWriter

close

public void close()
           throws IOException
Throws:
IOException

saveImage

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

Throws:
IOException
loci.formats.FormatException