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
18#ifndef vtkJPEGWriter_h
19#define vtkJPEGWriter_h
20
21#include "vtkIOImageModule.h" // For export macro
22#include "vtkImageWriter.h"
23
24VTK_ABI_NAMESPACE_BEGIN
26class vtkImageData;
27
28class VTKIOIMAGE_EXPORT vtkJPEGWriter : public vtkImageWriter
29{
30public:
31 static vtkJPEGWriter* New();
33 void PrintSelf(ostream& os, vtkIndent indent) override;
34
38 void Write() override;
39
41
44 vtkSetClampMacro(Quality, int, 0, 100);
45 vtkGetMacro(Quality, int);
47
49
52 vtkSetMacro(Progressive, vtkTypeUBool);
53 vtkGetMacro(Progressive, vtkTypeUBool);
54 vtkBooleanMacro(Progressive, vtkTypeUBool);
56
58
61 vtkSetMacro(WriteToMemory, vtkTypeUBool);
62 vtkGetMacro(WriteToMemory, vtkTypeUBool);
63 vtkBooleanMacro(WriteToMemory, vtkTypeUBool);
65
67
72 vtkGetObjectMacro(Result, vtkUnsignedCharArray);
74
75protected:
77 ~vtkJPEGWriter() override;
78
79 void WriteSlice(vtkImageData* data, int* uExtent);
80
81private:
82 int Quality;
83 vtkTypeUBool Progressive;
85 FILE* TempFP;
86
87 vtkJPEGWriter(const vtkJPEGWriter&) = delete;
88 void operator=(const vtkJPEGWriter&) = delete;
89};
90
91VTK_ABI_NAMESPACE_END
92#endif
topologically and geometrically regular array of data
Writes images to files.
a simple class to control print indentation
Definition vtkIndent.h:29
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