VTK  9.1.0
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=========================================================================*/
36#ifndef vtkJPEGWriter_h
37#define vtkJPEGWriter_h
38
39#include "vtkIOImageModule.h" // For export macro
40#include "vtkImageWriter.h"
41
43class vtkImageData;
44
45class VTKIOIMAGE_EXPORT vtkJPEGWriter : public vtkImageWriter
46{
47public:
48 static vtkJPEGWriter* New();
50 void PrintSelf(ostream& os, vtkIndent indent) override;
51
55 void Write() override;
56
58
61 vtkSetClampMacro(Quality, int, 0, 100);
62 vtkGetMacro(Quality, int);
64
66
69 vtkSetMacro(Progressive, vtkTypeUBool);
70 vtkGetMacro(Progressive, vtkTypeUBool);
71 vtkBooleanMacro(Progressive, vtkTypeUBool);
73
75
78 vtkSetMacro(WriteToMemory, vtkTypeUBool);
79 vtkGetMacro(WriteToMemory, vtkTypeUBool);
80 vtkBooleanMacro(WriteToMemory, vtkTypeUBool);
82
84
89 vtkGetObjectMacro(Result, vtkUnsignedCharArray);
91
92protected:
94 ~vtkJPEGWriter() override;
95
96 void WriteSlice(vtkImageData* data, int* uExtent);
97
98private:
99 int Quality;
100 vtkTypeUBool Progressive;
101 vtkUnsignedCharArray* Result;
102 FILE* TempFP;
103
104private:
105 vtkJPEGWriter(const vtkJPEGWriter&) = delete;
106 void operator=(const vtkJPEGWriter&) = delete;
107};
108
109#endif
topologically and geometrically regular array of data
Definition: vtkImageData.h:57
Writes images to files.
a simple class to control print indentation
Definition: vtkIndent.h:43
Writes JPEG files.
Definition: vtkJPEGWriter.h:46
~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