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=========================================================================*/
27#ifndef vtkJPEGWriter_h
28#define vtkJPEGWriter_h
29
30#include "vtkIOImageModule.h" // For export macro
31#include "vtkImageWriter.h"
32
34class vtkImageData;
35
36class VTKIOIMAGE_EXPORT vtkJPEGWriter : public vtkImageWriter
37{
38public:
39 static vtkJPEGWriter* New();
41 void PrintSelf(ostream& os, vtkIndent indent) override;
42
46 void Write() override;
47
49
52 vtkSetClampMacro(Quality, int, 0, 100);
53 vtkGetMacro(Quality, int);
55
57
60 vtkSetMacro(Progressive, vtkTypeUBool);
61 vtkGetMacro(Progressive, vtkTypeUBool);
62 vtkBooleanMacro(Progressive, vtkTypeUBool);
64
66
69 vtkSetMacro(WriteToMemory, vtkTypeUBool);
70 vtkGetMacro(WriteToMemory, vtkTypeUBool);
71 vtkBooleanMacro(WriteToMemory, vtkTypeUBool);
73
75
80 vtkGetObjectMacro(Result, vtkUnsignedCharArray);
82
83protected:
85 ~vtkJPEGWriter() override;
86
87 void WriteSlice(vtkImageData* data, int* uExtent);
88
89private:
90 int Quality;
91 vtkTypeUBool Progressive;
93 FILE* TempFP;
94
95private:
96 vtkJPEGWriter(const vtkJPEGWriter&) = delete;
97 void operator=(const vtkJPEGWriter&) = delete;
98};
99
100#endif
topologically and geometrically regular array of data
Definition: vtkImageData.h:48
Writes images to files.
a simple class to control print indentation
Definition: vtkIndent.h:34
Writes JPEG files.
Definition: vtkJPEGWriter.h:37
~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