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=========================================================================*/
30#ifndef vtkJPEGWriter_h
31#define vtkJPEGWriter_h
32
33#include "vtkIOImageModule.h" // For export macro
34#include "vtkImageWriter.h"
35
37class vtkImageData;
38
39class VTKIOIMAGE_EXPORT vtkJPEGWriter : public vtkImageWriter
40{
41public:
42 static vtkJPEGWriter* New();
44 void PrintSelf(ostream& os, vtkIndent indent) override;
45
49 void Write() override;
50
52
55 vtkSetClampMacro(Quality, int, 0, 100);
56 vtkGetMacro(Quality, int);
58
60
63 vtkSetMacro(Progressive, vtkTypeUBool);
64 vtkGetMacro(Progressive, vtkTypeUBool);
65 vtkBooleanMacro(Progressive, vtkTypeUBool);
67
69
72 vtkSetMacro(WriteToMemory, vtkTypeUBool);
73 vtkGetMacro(WriteToMemory, vtkTypeUBool);
74 vtkBooleanMacro(WriteToMemory, vtkTypeUBool);
76
78
83 vtkGetObjectMacro(Result, vtkUnsignedCharArray);
85
86protected:
88 ~vtkJPEGWriter() override;
89
90 void WriteSlice(vtkImageData* data, int* uExtent);
91
92private:
93 int Quality;
94 vtkTypeUBool Progressive;
96 FILE* TempFP;
97
98private:
99 vtkJPEGWriter(const vtkJPEGWriter&) = delete;
100 void operator=(const vtkJPEGWriter&) = delete;
101};
102
103#endif
topologically and geometrically regular array of data
Writes images to files.
a simple class to control print indentation
Definition vtkIndent.h:40
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:70