VTK
vtkJPEGWriter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkJPEGWriter.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 =========================================================================*/
30 #ifndef vtkJPEGWriter_h
31 #define vtkJPEGWriter_h
32 
33 #include "vtkIOImageModule.h" // For export macro
34 #include "vtkImageWriter.h"
35 
37 class vtkImageData;
38 
39 class VTKIOIMAGE_EXPORT vtkJPEGWriter : public vtkImageWriter
40 {
41 public:
42  static vtkJPEGWriter *New();
44  void PrintSelf(ostream& os, vtkIndent indent);
45 
49  virtual void Write();
50 
52 
55  vtkSetClampMacro(Quality, int, 0, 100);
56  vtkGetMacro(Quality, int);
58 
60 
63  vtkSetMacro(Progressive, unsigned int);
64  vtkGetMacro(Progressive, unsigned int);
65  vtkBooleanMacro(Progressive, unsigned int);
67 
69 
72  vtkSetMacro(WriteToMemory, unsigned int);
73  vtkGetMacro(WriteToMemory, unsigned int);
74  vtkBooleanMacro(WriteToMemory, unsigned int);
76 
78 
82  virtual void SetResult(vtkUnsignedCharArray*);
83  vtkGetObjectMacro(Result, vtkUnsignedCharArray);
85 
86 protected:
87  vtkJPEGWriter();
88  ~vtkJPEGWriter();
89 
90  void WriteSlice(vtkImageData *data, int* uExtent);
91 
92 private:
93  int Quality;
94  unsigned int Progressive;
95  unsigned int WriteToMemory;
96  vtkUnsignedCharArray *Result;
97  FILE *TempFP;
98 
99 private:
100  vtkJPEGWriter(const vtkJPEGWriter&) VTK_DELETE_FUNCTION;
101  void operator=(const vtkJPEGWriter&) VTK_DELETE_FUNCTION;
102 };
103 
104 #endif
105 
106 
Writes JPEG files.
Definition: vtkJPEGWriter.h:39
a simple class to control print indentation
Definition: vtkIndent.h:39
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
virtual void Write()
The main interface which triggers the writer to start.
Writes images to files.
static vtkImageWriter * New()
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
dynamic, self-adjusting array of unsigned char
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.