VTK
dox
Web
Core
vtkDataEncoder.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkDataEncoder.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
=========================================================================*/
33
#ifndef vtkDataEncoder_h
34
#define vtkDataEncoder_h
35
36
#include "
vtkObject.h
"
37
#include "vtkWebCoreModule.h"
// needed for exports
38
#include "
vtkSmartPointer.h
"
// needed for vtkSmartPointer
39
40
class
vtkUnsignedCharArray
;
41
class
vtkImageData
;
42
43
class
VTKWEBCORE_EXPORT
vtkDataEncoder
:
public
vtkObject
44
{
45
public
:
46
static
vtkDataEncoder
*
New
();
47
vtkTypeMacro(
vtkDataEncoder
,
vtkObject
);
48
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
49
54
void
SetMaxThreads(vtkTypeUInt32);
55
vtkGetMacro(MaxThreads, vtkTypeUInt32);
56
61
void
Initialize();
62
72
void
PushAndTakeReference(vtkTypeUInt32
key
,
vtkImageData
* &
data
,
int
quality,
int
encoding = 1);
73
81
bool
GetLatestOutput(vtkTypeUInt32
key
,
vtkSmartPointer<vtkUnsignedCharArray>
&
data
);
82
89
void
Flush(vtkTypeUInt32
key
);
90
94
const
char
* EncodeAsBase64Png(
vtkImageData
* img,
int
compressionLevel=5);
95
99
const
char
* EncodeAsBase64Jpg(
vtkImageData
* img,
int
quality=50);
100
104
void
Finalize();
105
106
protected
:
107
vtkDataEncoder
();
108
~
vtkDataEncoder
()
override
;
109
110
vtkTypeUInt32
MaxThreads
;
111
112
private
:
113
vtkDataEncoder
(
const
vtkDataEncoder
&) =
delete
;
114
void
operator=(
const
vtkDataEncoder
&) =
delete
;
115
116
class
vtkInternals;
117
vtkInternals* Internals;
118
119
};
120
121
#endif
vtkX3D::data
Definition:
vtkX3D.h:315
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkX3D::key
Definition:
vtkX3D.h:257
vtkUnsignedCharArray
dynamic, self-adjusting array of unsigned char
Definition:
vtkUnsignedCharArray.h:35
vtkSmartPointer< vtkUnsignedCharArray >
vtkObject
abstract base class for most VTK objects
Definition:
vtkObject.h:53
vtkDataEncoder
class used to compress/encode images using threads.
Definition:
vtkDataEncoder.h:43
vtkImageData
topologically and geometrically regular array of data
Definition:
vtkImageData.h:39
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:33
vtkSmartPointer.h
vtkObject::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkObject.h
vtkDataEncoder::MaxThreads
vtkTypeUInt32 MaxThreads
Definition:
vtkDataEncoder.h:110
Generated by
1.8.16