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
39class VTKIOIMAGE_EXPORT vtkTIFFWriter : public vtkImageWriter
40{
41public:
42 static vtkTIFFWriter *New();
44 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
45
49 virtual void Write();
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
73protected:
76
77 virtual void WriteFile(ofstream *file, vtkImageData *data, int ext[6], int wExt[6]);
78 virtual void WriteFileHeader(ofstream *, vtkImageData *, int wExt[6]);
79 virtual void WriteFileTrailer(ofstream *, vtkImageData *);
80
81 void* TIFFPtr;
83 int Width;
84 int Height;
85 int Pages;
88
89private:
90 vtkTIFFWriter(const vtkTIFFWriter&) VTK_DELETE_FUNCTION;
91 void operator=(const vtkTIFFWriter&) VTK_DELETE_FUNCTION;
92
93 template<typename T> void WriteVolume(T *buffer);
94};
95
96#endif
97
topologically and geometrically regular array of data
Definition: vtkImageData.h:46
Writes images to files.
a simple class to control print indentation
Definition: vtkIndent.h:40
write out image data as a TIFF file
Definition: vtkTIFFWriter.h:40
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetCompressionToJPEG()
Definition: vtkTIFFWriter.h:68
virtual void WriteFileHeader(ofstream *, vtkImageData *, int wExt[6])
virtual void Write()
The main interface which triggers the writer to start.
void SetCompressionToNoCompression()
Definition: vtkTIFFWriter.h:66
double YResolution
Definition: vtkTIFFWriter.h:87
void SetCompressionToDeflate()
Definition: vtkTIFFWriter.h:69
static vtkTIFFWriter * New()
void SetCompressionToLZW()
Definition: vtkTIFFWriter.h:70
virtual void WriteFileTrailer(ofstream *, vtkImageData *)
virtual void WriteFile(ofstream *file, vtkImageData *data, int ext[6], int wExt[6])
double XResolution
Definition: vtkTIFFWriter.h:86
void SetCompressionToPackBits()
Definition: vtkTIFFWriter.h:67
@ data
Definition: vtkX3D.h:315