VTK  9.3.0
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
18#ifndef vtkTIFFWriter_h
19#define vtkTIFFWriter_h
20
21#include "vtkIOImageModule.h" // For export macro
22#include "vtkImageWriter.h"
23
24VTK_ABI_NAMESPACE_BEGIN
25class VTKIOIMAGE_EXPORT vtkTIFFWriter : public vtkImageWriter
26{
27public:
28 static vtkTIFFWriter* New();
30 void PrintSelf(ostream& os, vtkIndent indent) override;
31
35 void Write() override;
36
37 enum
38 { // Compression types
43 LZW
44 };
45
47
51 vtkSetClampMacro(Compression, int, NoCompression, LZW);
52 vtkGetMacro(Compression, int);
53 void SetCompressionToNoCompression() { this->SetCompression(NoCompression); }
54 void SetCompressionToPackBits() { this->SetCompression(PackBits); }
55 void SetCompressionToJPEG() { this->SetCompression(JPEG); }
56 void SetCompressionToDeflate() { this->SetCompression(Deflate); }
57 void SetCompressionToLZW() { this->SetCompression(LZW); }
59
60protected:
62 ~vtkTIFFWriter() override = default;
63
64 void WriteFile(ostream* file, vtkImageData* data, int ext[6], int wExt[6]) override;
65 void WriteFileHeader(ostream*, vtkImageData*, int wExt[6]) override;
66 void WriteFileTrailer(ostream*, vtkImageData*) override;
67
68 void* TIFFPtr;
70 int Width;
71 int Height;
72 int Pages;
75
76private:
77 vtkTIFFWriter(const vtkTIFFWriter&) = delete;
78 void operator=(const vtkTIFFWriter&) = delete;
79
80 template <typename T>
81 void WriteVolume(T* buffer);
82};
83
84VTK_ABI_NAMESPACE_END
85#endif
topologically and geometrically regular array of data
Writes images to files.
a simple class to control print indentation
Definition vtkIndent.h:29
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