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 =========================================================================*/
33 #ifndef vtkTIFFWriter_h
34 #define vtkTIFFWriter_h
35 
36 #include "vtkIOImageModule.h" // For export macro
37 #include "vtkImageWriter.h"
38 
39 class VTKIOIMAGE_EXPORT vtkTIFFWriter : public vtkImageWriter
40 {
41 public:
42  static vtkTIFFWriter *New();
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
49  void Write() override;
50 
51  enum { // Compression types
56  LZW
57  };
58 
60 
64  vtkSetClampMacro(Compression, int, NoCompression, LZW);
65  vtkGetMacro(Compression, int);
66  void SetCompressionToNoCompression() { this->SetCompression(NoCompression); }
67  void SetCompressionToPackBits() { this->SetCompression(PackBits); }
68  void SetCompressionToJPEG() { this->SetCompression(JPEG); }
69  void SetCompressionToDeflate() { this->SetCompression(Deflate); }
70  void SetCompressionToLZW() { this->SetCompression(LZW); }
72 
73 protected:
74  vtkTIFFWriter();
75  ~vtkTIFFWriter() override {}
76 
77  void WriteFile(ostream *file, vtkImageData *data, int ext[6], int wExt[6]) override;
78  void WriteFileHeader(ostream *, vtkImageData *, int wExt[6]) override;
79  void WriteFileTrailer(ostream *, vtkImageData *) override;
80 
81  void* TIFFPtr;
83  int Width;
84  int Height;
85  int Pages;
86  double XResolution;
87  double YResolution;
88 
89 private:
90  vtkTIFFWriter(const vtkTIFFWriter&) = delete;
91  void operator=(const vtkTIFFWriter&) = delete;
92 
93  template<typename T> void WriteVolume(T *buffer);
94 };
95 
96 #endif
97 
vtkTIFFWriter::~vtkTIFFWriter
~vtkTIFFWriter() override
Definition: vtkTIFFWriter.h:75
vtkTIFFWriter::Pages
int Pages
Definition: vtkTIFFWriter.h:85
vtkTIFFWriter::Width
int Width
Definition: vtkTIFFWriter.h:83
vtkImageWriter::WriteFileHeader
virtual void WriteFileHeader(ostream *, vtkImageData *, int[6])
Definition: vtkImageWriter.h:116
vtkImageWriter
Writes images to files.
Definition: vtkImageWriter.h:35
vtkX3D::data
Definition: vtkX3D.h:315
vtkTIFFWriter::PackBits
Definition: vtkTIFFWriter.h:53
vtkTIFFWriter::SetCompressionToJPEG
void SetCompressionToJPEG()
Definition: vtkTIFFWriter.h:68
vtkTIFFWriter
write out image data as a TIFF file
Definition: vtkTIFFWriter.h:39
vtkTIFFWriter::JPEG
Definition: vtkTIFFWriter.h:54
vtkTIFFWriter::NoCompression
Definition: vtkTIFFWriter.h:52
vtkImageWriter.h
vtkTIFFWriter::SetCompressionToDeflate
void SetCompressionToDeflate()
Definition: vtkTIFFWriter.h:69
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkImageWriter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTIFFWriter::Deflate
Definition: vtkTIFFWriter.h:55
vtkTIFFWriter::TIFFPtr
void * TIFFPtr
Definition: vtkTIFFWriter.h:81
vtkTIFFWriter::SetCompressionToLZW
void SetCompressionToLZW()
Definition: vtkTIFFWriter.h:70
vtkTIFFWriter::SetCompressionToPackBits
void SetCompressionToPackBits()
Definition: vtkTIFFWriter.h:67
vtkImageWriter::WriteFile
virtual void WriteFile(ostream *file, vtkImageData *data, int extent[6], int wExtent[6])
vtkImageWriter::Write
virtual void Write()
The main interface which triggers the writer to start.
vtkTIFFWriter::Height
int Height
Definition: vtkTIFFWriter.h:84
vtkImageWriter::WriteFileTrailer
virtual void WriteFileTrailer(ostream *, vtkImageData *)
Definition: vtkImageWriter.h:117
vtkImageWriter::New
static vtkImageWriter * New()
vtkTIFFWriter::Compression
int Compression
Definition: vtkTIFFWriter.h:82
vtkTIFFWriter::XResolution
double XResolution
Definition: vtkTIFFWriter.h:86
vtkTIFFWriter::SetCompressionToNoCompression
void SetCompressionToNoCompression()
Definition: vtkTIFFWriter.h:66
vtkTIFFWriter::YResolution
double YResolution
Definition: vtkTIFFWriter.h:87