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 
83  vtkGetObjectMacro(Result, vtkUnsignedCharArray);
85 
86 protected:
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 
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 JPEG files.
Definition: vtkJPEGWriter.h:40
static vtkJPEGWriter * New()
virtual void Write()
The main interface which triggers the writer to start.
virtual void SetResult(vtkUnsignedCharArray *)
When writing to memory this is the result, it will be NULL until the data is written the first time.
void WriteSlice(vtkImageData *data, int *uExtent)
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
dynamic, self-adjusting array of unsigned char
@ data
Definition: vtkX3D.h:315
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.