VTK  9.4.20241218
vtkTIFFWriter.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
47#ifndef vtkTIFFWriter_h
48#define vtkTIFFWriter_h
49
50#include "vtkIOImageModule.h" // For export macro
51#include "vtkImageWriter.h"
52
53VTK_ABI_NAMESPACE_BEGIN
54class VTKIOIMAGE_EXPORT vtkTIFFWriter : public vtkImageWriter
55{
56public:
57 static vtkTIFFWriter* New();
59 void PrintSelf(ostream& os, vtkIndent indent) override;
60
64 void Write() override;
65
66 enum
67 { // Compression types
72 LZW
73 };
74
76
80 vtkSetClampMacro(Compression, int, NoCompression, LZW);
81 vtkGetMacro(Compression, int);
82 void SetCompressionToNoCompression() { this->SetCompression(NoCompression); }
83 void SetCompressionToPackBits() { this->SetCompression(PackBits); }
84 void SetCompressionToJPEG() { this->SetCompression(JPEG); }
85 void SetCompressionToDeflate() { this->SetCompression(Deflate); }
86 void SetCompressionToLZW() { this->SetCompression(LZW); }
88
89protected:
91 ~vtkTIFFWriter() override = default;
92
93 void WriteFile(ostream* file, vtkImageData* data, int ext[6], int wExt[6]) override;
94 void WriteFileHeader(ostream*, vtkImageData*, int wExt[6]) override;
95 void WriteFileTrailer(ostream*, vtkImageData*) override;
96
97 void* TIFFPtr;
99 int Width;
101 int Pages;
104
105private:
106 vtkTIFFWriter(const vtkTIFFWriter&) = delete;
107 void operator=(const vtkTIFFWriter&) = delete;
108
109 template <typename T>
110 void WriteVolume(T* buffer);
111};
112
113VTK_ABI_NAMESPACE_END
114#endif
topologically and geometrically regular array of data
Writes images to files.
a simple class to control print indentation
Definition vtkIndent.h:108
write out image data as a TIFF file
~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.
void WriteFileHeader(ostream *, vtkImageData *, int wExt[6]) override
void SetCompressionToNoCompression()
Set compression type.
void SetCompressionToDeflate()
Set compression type.
static vtkTIFFWriter * New()
void SetCompressionToLZW()
Set compression type.
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
void SetCompressionToPackBits()
Set compression type.
void WriteFileTrailer(ostream *, vtkImageData *) override