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) override;
45 
49  void Write() override;
50 
52 
55  vtkSetClampMacro(Quality, int, 0, 100);
56  vtkGetMacro(Quality, int);
58 
60 
63  vtkSetMacro(Progressive, vtkTypeUBool);
64  vtkGetMacro(Progressive, vtkTypeUBool);
65  vtkBooleanMacro(Progressive, vtkTypeUBool);
67 
69 
72  vtkSetMacro(WriteToMemory, vtkTypeUBool);
73  vtkGetMacro(WriteToMemory, vtkTypeUBool);
74  vtkBooleanMacro(WriteToMemory, vtkTypeUBool);
76 
78 
82  virtual void SetResult(vtkUnsignedCharArray*);
83  vtkGetObjectMacro(Result, vtkUnsignedCharArray);
85 
86 protected:
87  vtkJPEGWriter();
88  ~vtkJPEGWriter() override;
89 
90  void WriteSlice(vtkImageData *data, int* uExtent);
91 
92 private:
93  int Quality;
94  vtkTypeUBool Progressive;
95  vtkUnsignedCharArray *Result;
96  FILE *TempFP;
97 
98 private:
99  vtkJPEGWriter(const vtkJPEGWriter&) = delete;
100  void operator=(const vtkJPEGWriter&) = delete;
101 };
102 
103 #endif
104 
105 
Writes JPEG files.
Definition: vtkJPEGWriter.h:39
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:39
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
virtual void Write()
The main interface which triggers the writer to start.
unsigned int vtkTypeUBool
Definition: vtkABI.h:70
Writes images to files.
static vtkImageWriter * New()
dynamic, self-adjusting array of unsigned char