VTK  9.2.6
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=========================================================================*/
99#ifndef vtkJPEGWriter_h
100#define vtkJPEGWriter_h
101
102#include "vtkIOImageModule.h" // For export macro
103#include "vtkImageWriter.h"
104
106class vtkImageData;
107
108class VTKIOIMAGE_EXPORT vtkJPEGWriter : public vtkImageWriter
109{
110public:
113 void PrintSelf(ostream& os, vtkIndent indent) override;
114
118 void Write() override;
119
121
124 vtkSetClampMacro(Quality, int, 0, 100);
125 vtkGetMacro(Quality, int);
127
129
132 vtkSetMacro(Progressive, vtkTypeUBool);
133 vtkGetMacro(Progressive, vtkTypeUBool);
134 vtkBooleanMacro(Progressive, vtkTypeUBool);
136
138
141 vtkSetMacro(WriteToMemory, vtkTypeUBool);
142 vtkGetMacro(WriteToMemory, vtkTypeUBool);
143 vtkBooleanMacro(WriteToMemory, vtkTypeUBool);
145
147
152 vtkGetObjectMacro(Result, vtkUnsignedCharArray);
154
155protected:
157 ~vtkJPEGWriter() override;
158
159 void WriteSlice(vtkImageData* data, int* uExtent);
160
161private:
162 int Quality;
163 vtkTypeUBool Progressive;
164 vtkUnsignedCharArray* Result;
165 FILE* TempFP;
166
167private:
168 vtkJPEGWriter(const vtkJPEGWriter&) = delete;
169 void operator=(const vtkJPEGWriter&) = delete;
170};
171
172#endif
topologically and geometrically regular array of data
Definition: vtkImageData.h:163
Writes images to files.
a simple class to control print indentation
Definition: vtkIndent.h:119
Writes JPEG files.
~vtkJPEGWriter() override
static vtkJPEGWriter * New()
virtual void SetResult(vtkUnsignedCharArray *)
When writing to memory this is the result, it will be nullptr until the data is written the first tim...
void WriteSlice(vtkImageData *data, int *uExtent)
void Write() override
The main interface which triggers the writer to start.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
dynamic, self-adjusting array of unsigned char
@ data
Definition: vtkX3D.h:321
unsigned int vtkTypeUBool
Definition: vtkABI.h:70