VTK
vtkPNGWriter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPNGWriter.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 =========================================================================*/
32 #ifndef vtkPNGWriter_h
33 #define vtkPNGWriter_h
34 
35 #include "vtkIOImageModule.h" // For export macro
36 #include "vtkImageWriter.h"
37 
38 class vtkImageData;
40 
41 class VTKIOIMAGE_EXPORT vtkPNGWriter : public vtkImageWriter
42 {
43 public:
44  static vtkPNGWriter *New();
46  void PrintSelf(ostream& os, vtkIndent indent);
47 
51  virtual void Write();
52 
54 
61  vtkSetClampMacro(CompressionLevel, int, 0, 9);
62  vtkGetMacro(CompressionLevel, int);
64 
66 
69  vtkSetMacro(WriteToMemory, unsigned int);
70  vtkGetMacro(WriteToMemory, unsigned int);
71  vtkBooleanMacro(WriteToMemory, unsigned int);
73 
75 
80  vtkGetObjectMacro(Result, vtkUnsignedCharArray);
82 
90  void AddText(const char* key, const char* value);
92 
95  static const char* TITLE;
96  static const char* AUTHOR;
97  static const char* DESCRIPTION;
98  static const char* COPYRIGHT;
99  static const char* CREATION_TIME;
100  static const char* SOFTWARE;
101  static const char* DISCLAIMER;
102  static const char* WARNING;
103  static const char* SOURCE;
104  static const char* COMMENT;
106 
107 protected:
110 
111  void WriteSlice(vtkImageData *data, int* uExtent);
113  unsigned int WriteToMemory;
115  FILE *TempFP;
116  class vtkInternals;
117  vtkInternals* Internals;
118 
119 
120 private:
121  vtkPNGWriter(const vtkPNGWriter&) VTK_DELETE_FUNCTION;
122  void operator=(const vtkPNGWriter&) VTK_DELETE_FUNCTION;
123 };
124 
125 #endif
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
Writes PNG files.
Definition: vtkPNGWriter.h:42
static const char * CREATION_TIME
Definition: vtkPNGWriter.h:99
unsigned int WriteToMemory
Definition: vtkPNGWriter.h:113
vtkUnsignedCharArray * Result
Definition: vtkPNGWriter.h:114
static const char * WARNING
Definition: vtkPNGWriter.h:102
virtual void Write()
The main interface which triggers the writer to start.
void WriteSlice(vtkImageData *data, int *uExtent)
virtual void SetResult(vtkUnsignedCharArray *)
When writing to memory this is the result, it will be NULL until the data is written the first time.
static const char * DISCLAIMER
Definition: vtkPNGWriter.h:101
static const char * COPYRIGHT
Definition: vtkPNGWriter.h:98
static const char * COMMENT
Definition: vtkPNGWriter.h:104
vtkInternals * Internals
Definition: vtkPNGWriter.h:116
static const char * SOURCE
Definition: vtkPNGWriter.h:103
static const char * SOFTWARE
Definition: vtkPNGWriter.h:100
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
static const char * TITLE
Standard keys.
Definition: vtkPNGWriter.h:95
static const char * AUTHOR
Definition: vtkPNGWriter.h:96
int CompressionLevel
Definition: vtkPNGWriter.h:112
void AddText(const char *key, const char *value)
Adds a text chunk to the PNG.
static vtkPNGWriter * New()
static const char * DESCRIPTION
Definition: vtkPNGWriter.h:97
dynamic, self-adjusting array of unsigned char
@ key
Definition: vtkX3D.h:257
@ value
Definition: vtkX3D.h:220
@ data
Definition: vtkX3D.h:315
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.