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