Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkTIFFWriter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkTIFFWriter.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00043 #ifndef __vtkTIFFWriter_h
00044 #define __vtkTIFFWriter_h
00045 
00046 #include "vtkImageWriter.h"
00047 
00048 class VTK_IO_EXPORT vtkTIFFWriter : public vtkImageWriter
00049 {
00050 public:
00051   static vtkTIFFWriter *New();
00052   vtkTypeRevisionMacro(vtkTIFFWriter,vtkImageWriter);
00053   virtual void PrintSelf(ostream& os, vtkIndent indent);
00054 
00055 //BTX
00056   enum { // Compression types
00057     NoCompression,
00058     PackBits,
00059     JPEG,
00060     Deflate,
00061     LZW
00062   };
00063 //ETX
00064 
00066 
00069   vtkSetClampMacro(Compression, int, NoCompression, LZW);
00070   vtkGetMacro(Compression, int);
00071   void SetCompressionToNoCompression() { this->SetCompression(NoCompression); }
00072   void SetCompressionToPackBits()      { this->SetCompression(PackBits); }
00073   void SetCompressionToJPEG()          { this->SetCompression(JPEG); }
00074   void SetCompressionToDeflate()       { this->SetCompression(Deflate); }
00075   void SetCompressionToLZW()           { this->SetCompression(LZW); }
00077 
00078 protected:
00079   vtkTIFFWriter();
00080   ~vtkTIFFWriter() {}
00081 
00082   virtual void WriteFile(ofstream *file, vtkImageData *data, int ext[6]);
00083   virtual void WriteFileHeader(ofstream *, vtkImageData *);
00084   virtual void WriteFileTrailer(ofstream *, vtkImageData *);
00085 
00086   void* TIFFPtr;
00087   int Compression;
00088 
00089 private:
00090   vtkTIFFWriter(const vtkTIFFWriter&);  // Not implemented.
00091   void operator=(const vtkTIFFWriter&);  // Not implemented.
00092 };
00093 
00094 #endif
00095