VTK  9.4.20241218
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
77#ifndef vtkJPEGWriter_h
78#define vtkJPEGWriter_h
79
80#include "vtkIOImageModule.h" // For export macro
81#include "vtkImageWriter.h"
82
83VTK_ABI_NAMESPACE_BEGIN
85class vtkImageData;
86
87class VTKIOIMAGE_EXPORT vtkJPEGWriter : public vtkImageWriter
88{
89public:
90 static vtkJPEGWriter* New();
92 void PrintSelf(ostream& os, vtkIndent indent) override;
93
97 void Write() override;
98
100
103 vtkSetClampMacro(Quality, int, 0, 100);
104 vtkGetMacro(Quality, int);
106
108
111 vtkSetMacro(Progressive, vtkTypeUBool);
112 vtkGetMacro(Progressive, vtkTypeUBool);
113 vtkBooleanMacro(Progressive, vtkTypeUBool);
115
117
120 vtkSetMacro(WriteToMemory, vtkTypeUBool);
121 vtkGetMacro(WriteToMemory, vtkTypeUBool);
122 vtkBooleanMacro(WriteToMemory, vtkTypeUBool);
124
126
131 vtkGetObjectMacro(Result, vtkUnsignedCharArray);
133
134protected:
136 ~vtkJPEGWriter() override;
137
138 void WriteSlice(vtkImageData* data, int* uExtent);
139
140private:
141 int Quality;
142 vtkTypeUBool Progressive;
143 vtkUnsignedCharArray* Result;
144 FILE* TempFP;
145
146 vtkJPEGWriter(const vtkJPEGWriter&) = delete;
147 void operator=(const vtkJPEGWriter&) = delete;
148};
149
150VTK_ABI_NAMESPACE_END
151#endif
topologically and geometrically regular array of data
Writes images to files.
a simple class to control print indentation
Definition vtkIndent.h:108
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