VTK  9.3.0
vtkJPEGWriter.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
27#ifndef vtkJPEGWriter_h
28#define vtkJPEGWriter_h
29
30#include "vtkIOImageModule.h" // For export macro
31#include "vtkImageWriter.h"
32
33VTK_ABI_NAMESPACE_BEGIN
35class vtkImageData;
36
37class VTKIOIMAGE_EXPORT vtkJPEGWriter : public vtkImageWriter
38{
39public:
40 static vtkJPEGWriter* New();
42 void PrintSelf(ostream& os, vtkIndent indent) override;
43
47 void Write() override;
48
50
53 vtkSetClampMacro(Quality, int, 0, 100);
54 vtkGetMacro(Quality, int);
56
58
61 vtkSetMacro(Progressive, vtkTypeUBool);
62 vtkGetMacro(Progressive, vtkTypeUBool);
63 vtkBooleanMacro(Progressive, vtkTypeUBool);
65
67
70 vtkSetMacro(WriteToMemory, vtkTypeUBool);
71 vtkGetMacro(WriteToMemory, vtkTypeUBool);
72 vtkBooleanMacro(WriteToMemory, vtkTypeUBool);
74
76
81 vtkGetObjectMacro(Result, vtkUnsignedCharArray);
83
84protected:
86 ~vtkJPEGWriter() override;
87
88 void WriteSlice(vtkImageData* data, int* uExtent);
89
90private:
91 int Quality;
92 vtkTypeUBool Progressive;
94 FILE* TempFP;
95
96 vtkJPEGWriter(const vtkJPEGWriter&) = delete;
97 void operator=(const vtkJPEGWriter&) = delete;
98};
99
100VTK_ABI_NAMESPACE_END
101#endif
topologically and geometrically regular array of data
Writes images to files.
a simple class to control print indentation
Definition vtkIndent.h:38
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
unsigned int vtkTypeUBool
Definition vtkABI.h:65