VTK
dox/IO/Image/vtkTIFFWriter.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkTIFFWriter.h
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 =========================================================================*/
00032 #ifndef __vtkTIFFWriter_h
00033 #define __vtkTIFFWriter_h
00034 
00035 #include "vtkIOImageModule.h" // For export macro
00036 #include "vtkImageWriter.h"
00037 
00038 class VTKIOIMAGE_EXPORT vtkTIFFWriter : public vtkImageWriter
00039 {
00040 public:
00041   static vtkTIFFWriter *New();
00042   vtkTypeMacro(vtkTIFFWriter,vtkImageWriter);
00043   virtual void PrintSelf(ostream& os, vtkIndent indent);
00044 
00045 //BTX
00046   enum { // Compression types
00047     NoCompression,
00048     PackBits,
00049     JPEG,
00050     Deflate,
00051     LZW
00052   };
00053 //ETX
00054 
00056 
00059   vtkSetClampMacro(Compression, int, NoCompression, LZW);
00060   vtkGetMacro(Compression, int);
00061   void SetCompressionToNoCompression() { this->SetCompression(NoCompression); }
00062   void SetCompressionToPackBits()      { this->SetCompression(PackBits); }
00063   void SetCompressionToJPEG()          { this->SetCompression(JPEG); }
00064   void SetCompressionToDeflate()       { this->SetCompression(Deflate); }
00065   void SetCompressionToLZW()           { this->SetCompression(LZW); }
00067 
00068 protected:
00069   vtkTIFFWriter();
00070   ~vtkTIFFWriter() {}
00071 
00072   virtual void WriteFile(ofstream *file, vtkImageData *data, int ext[6], int wExt[6]);
00073   virtual void WriteFileHeader(ofstream *, vtkImageData *, int wExt[6]);
00074   virtual void WriteFileTrailer(ofstream *, vtkImageData *);
00075 
00076   void* TIFFPtr;
00077   int Compression;
00078 
00079 private:
00080   vtkTIFFWriter(const vtkTIFFWriter&);  // Not implemented.
00081   void operator=(const vtkTIFFWriter&);  // Not implemented.
00082 };
00083 
00084 #endif
00085