VTK  9.1.0
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=========================================================================*/
56#ifndef vtkTIFFWriter_h
57#define vtkTIFFWriter_h
58
59#include "vtkIOImageModule.h" // For export macro
60#include "vtkImageWriter.h"
61
62class VTKIOIMAGE_EXPORT vtkTIFFWriter : public vtkImageWriter
63{
64public:
65 static vtkTIFFWriter* New();
67 void PrintSelf(ostream& os, vtkIndent indent) override;
68
72 void Write() override;
73
74 enum
75 { // Compression types
80 LZW
81 };
82
84
88 vtkSetClampMacro(Compression, int, NoCompression, LZW);
89 vtkGetMacro(Compression, int);
90 void SetCompressionToNoCompression() { this->SetCompression(NoCompression); }
91 void SetCompressionToPackBits() { this->SetCompression(PackBits); }
92 void SetCompressionToJPEG() { this->SetCompression(JPEG); }
93 void SetCompressionToDeflate() { this->SetCompression(Deflate); }
94 void SetCompressionToLZW() { this->SetCompression(LZW); }
96
97protected:
99 ~vtkTIFFWriter() override = default;
100
101 void WriteFile(ostream* file, vtkImageData* data, int ext[6], int wExt[6]) override;
102 void WriteFileHeader(ostream*, vtkImageData*, int wExt[6]) override;
103 void WriteFileTrailer(ostream*, vtkImageData*) override;
104
105 void* TIFFPtr;
107 int Width;
109 int Pages;
112
113private:
114 vtkTIFFWriter(const vtkTIFFWriter&) = delete;
115 void operator=(const vtkTIFFWriter&) = delete;
116
117 template <typename T>
118 void WriteVolume(T* buffer);
119};
120
121#endif
topologically and geometrically regular array of data
Definition: vtkImageData.h:157
Writes images to files.
a simple class to control print indentation
Definition: vtkIndent.h:113
write out image data as a TIFF file
Definition: vtkTIFFWriter.h:63
~vtkTIFFWriter() override=default
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetCompressionToJPEG()
Set compression type.
Definition: vtkTIFFWriter.h:92
void WriteFileHeader(ostream *, vtkImageData *, int wExt[6]) override
void SetCompressionToNoCompression()
Set compression type.
Definition: vtkTIFFWriter.h:90
double YResolution
void SetCompressionToDeflate()
Set compression type.
Definition: vtkTIFFWriter.h:93
static vtkTIFFWriter * New()
void SetCompressionToLZW()
Set compression type.
Definition: vtkTIFFWriter.h:94
void Write() override
The main interface which triggers the writer to start.
void WriteFile(ostream *file, vtkImageData *data, int ext[6], int wExt[6]) override
double XResolution
void SetCompressionToPackBits()
Set compression type.
Definition: vtkTIFFWriter.h:91
void WriteFileTrailer(ostream *, vtkImageData *) override
@ data
Definition: vtkX3D.h:321