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 =========================================================================*/
27 #ifndef vtkJPEGWriter_h
28 #define vtkJPEGWriter_h
29 
30 #include "vtkIOImageModule.h" // For export macro
31 #include "vtkImageWriter.h"
32 
34 class vtkImageData;
35 
36 class VTKIOIMAGE_EXPORT vtkJPEGWriter : public vtkImageWriter
37 {
38 public:
39  static vtkJPEGWriter *New();
41  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
42 
46  void Write() VTK_OVERRIDE;
47 
49 
52  vtkSetClampMacro(Quality, int, 0, 100);
53  vtkGetMacro(Quality, int);
55 
57 
60  vtkSetMacro(Progressive, unsigned int);
61  vtkGetMacro(Progressive, unsigned int);
62  vtkBooleanMacro(Progressive, unsigned int);
64 
66 
69  vtkSetMacro(WriteToMemory, unsigned int);
70  vtkGetMacro(WriteToMemory, unsigned int);
71  vtkBooleanMacro(WriteToMemory, unsigned int);
73 
75 
79  virtual void SetResult(vtkUnsignedCharArray*);
80  vtkGetObjectMacro(Result, vtkUnsignedCharArray);
82 
83 protected:
84  vtkJPEGWriter();
85  ~vtkJPEGWriter() VTK_OVERRIDE;
86 
87  void WriteSlice(vtkImageData *data, int* uExtent);
88 
89 private:
90  int Quality;
91  unsigned int Progressive;
92  vtkUnsignedCharArray *Result;
93  FILE *TempFP;
94 
95 private:
96  vtkJPEGWriter(const vtkJPEGWriter&) VTK_DELETE_FUNCTION;
97  void operator=(const vtkJPEGWriter&) VTK_DELETE_FUNCTION;
98 };
99 
100 #endif
101 
102 
Writes JPEG files.
Definition: vtkJPEGWriter.h:36
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:33
topologically and geometrically regular array of data
Definition: vtkImageData.h:39
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
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.