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 =========================================================================*/
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();
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39 
43  void Write() override;
44 
45  enum { // Compression types
50  LZW
51  };
52 
54 
58  vtkSetClampMacro(Compression, int, NoCompression, LZW);
59  vtkGetMacro(Compression, int);
60  void SetCompressionToNoCompression() { this->SetCompression(NoCompression); }
61  void SetCompressionToPackBits() { this->SetCompression(PackBits); }
62  void SetCompressionToJPEG() { this->SetCompression(JPEG); }
63  void SetCompressionToDeflate() { this->SetCompression(Deflate); }
64  void SetCompressionToLZW() { this->SetCompression(LZW); }
66 
67 protected:
68  vtkTIFFWriter();
69  ~vtkTIFFWriter() override {}
70 
71  void WriteFile(ostream *file, vtkImageData *data, int ext[6], int wExt[6]) override;
72  void WriteFileHeader(ostream *, vtkImageData *, int wExt[6]) override;
73  void WriteFileTrailer(ostream *, vtkImageData *) override;
74 
75  void* TIFFPtr;
77  int Width;
78  int Height;
79  int Pages;
80  double XResolution;
81  double YResolution;
82 
83 private:
84  vtkTIFFWriter(const vtkTIFFWriter&) = delete;
85  void operator=(const vtkTIFFWriter&) = delete;
86 
87  template<typename T> void WriteVolume(T *buffer);
88 };
89 
90 #endif
91 
vtkTIFFWriter::~vtkTIFFWriter
~vtkTIFFWriter() override
Definition: vtkTIFFWriter.h:69
vtkTIFFWriter::Pages
int Pages
Definition: vtkTIFFWriter.h:79
vtkTIFFWriter::Width
int Width
Definition: vtkTIFFWriter.h:77
vtkImageWriter::WriteFileHeader
virtual void WriteFileHeader(ostream *, vtkImageData *, int[6])
Definition: vtkImageWriter.h:113
vtkImageWriter
Writes images to files.
Definition: vtkImageWriter.h:32
vtkX3D::data
Definition: vtkX3D.h:315
vtkTIFFWriter::PackBits
Definition: vtkTIFFWriter.h:47
vtkTIFFWriter::SetCompressionToJPEG
void SetCompressionToJPEG()
Definition: vtkTIFFWriter.h:62
vtkTIFFWriter
write out image data as a TIFF file
Definition: vtkTIFFWriter.h:33
vtkTIFFWriter::JPEG
Definition: vtkTIFFWriter.h:48
vtkTIFFWriter::NoCompression
Definition: vtkTIFFWriter.h:46
vtkImageWriter.h
vtkTIFFWriter::SetCompressionToDeflate
void SetCompressionToDeflate()
Definition: vtkTIFFWriter.h:63
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:39
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::Deflate
Definition: vtkTIFFWriter.h:49
vtkTIFFWriter::TIFFPtr
void * TIFFPtr
Definition: vtkTIFFWriter.h:75
vtkTIFFWriter::SetCompressionToLZW
void SetCompressionToLZW()
Definition: vtkTIFFWriter.h:64
vtkTIFFWriter::SetCompressionToPackBits
void SetCompressionToPackBits()
Definition: vtkTIFFWriter.h:61
vtkImageWriter::WriteFile
virtual void WriteFile(ostream *file, vtkImageData *data, int extent[6], int wExtent[6])
vtkImageWriter::Write
virtual void Write()
The main interface which triggers the writer to start.
vtkTIFFWriter::Height
int Height
Definition: vtkTIFFWriter.h:78
vtkImageWriter::WriteFileTrailer
virtual void WriteFileTrailer(ostream *, vtkImageData *)
Definition: vtkImageWriter.h:114
vtkImageWriter::New
static vtkImageWriter * New()
vtkTIFFWriter::Compression
int Compression
Definition: vtkTIFFWriter.h:76
vtkTIFFWriter::XResolution
double XResolution
Definition: vtkTIFFWriter.h:80
vtkTIFFWriter::SetCompressionToNoCompression
void SetCompressionToNoCompression()
Definition: vtkTIFFWriter.h:60
vtkTIFFWriter::YResolution
double YResolution
Definition: vtkTIFFWriter.h:81