VTK
vtkTIFFWriter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTIFFWriter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
32 #ifndef vtkTIFFWriter_h
33 #define vtkTIFFWriter_h
34 
35 #include "vtkIOImageModule.h" // For export macro
36 #include "vtkImageWriter.h"
37 
39 {
40 public:
41  static vtkTIFFWriter *New();
43  virtual void PrintSelf(ostream& os, vtkIndent indent);
44 
46  virtual void Write();
47 
48 //BTX
49  enum { // Compression types
54  LZW
55  };
56 //ETX
57 
59 
62  vtkSetClampMacro(Compression, int, NoCompression, LZW);
63  vtkGetMacro(Compression, int);
64  void SetCompressionToNoCompression() { this->SetCompression(NoCompression); }
65  void SetCompressionToPackBits() { this->SetCompression(PackBits); }
66  void SetCompressionToJPEG() { this->SetCompression(JPEG); }
67  void SetCompressionToDeflate() { this->SetCompression(Deflate); }
68  void SetCompressionToLZW() { this->SetCompression(LZW); }
70 
71 protected:
72  vtkTIFFWriter();
74 
75  virtual void WriteFile(ofstream *file, vtkImageData *data, int ext[6], int wExt[6]);
76  virtual void WriteFileHeader(ofstream *, vtkImageData *, int wExt[6]);
77  virtual void WriteFileTrailer(ofstream *, vtkImageData *);
78 
79  void* TIFFPtr;
81  int Width;
82  int Height;
83  int Pages;
84  double XResolution;
85  double YResolution;
86 
87 private:
88  vtkTIFFWriter(const vtkTIFFWriter&); // Not implemented.
89  void operator=(const vtkTIFFWriter&); // Not implemented.
90 
91  template<typename T> void WriteVolume(T *buffer);
92 };
93 
94 #endif
95 
virtual void WriteFile(ofstream *file, vtkImageData *data, int extent[6], int wExtent[6])
virtual void WriteFileTrailer(ofstream *, vtkImageData *)
void SetCompressionToDeflate()
Definition: vtkTIFFWriter.h:67
write out image data as a TIFF file
Definition: vtkTIFFWriter.h:38
void SetCompressionToLZW()
Definition: vtkTIFFWriter.h:68
a simple class to control print indentation
Definition: vtkIndent.h:38
void SetCompressionToNoCompression()
Definition: vtkTIFFWriter.h:64
void SetCompressionToJPEG()
Definition: vtkTIFFWriter.h:66
topologically and geometrically regular array of data
Definition: vtkImageData.h:44
virtual void Write()
void SetCompressionToPackBits()
Definition: vtkTIFFWriter.h:65
double XResolution
Definition: vtkTIFFWriter.h:84
Writes images to files.
static vtkImageWriter * New()
void PrintSelf(ostream &os, vtkIndent indent)
double YResolution
Definition: vtkTIFFWriter.h:85
#define VTKIOIMAGE_EXPORT
virtual void WriteFileHeader(ofstream *, vtkImageData *, int[6])