VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
IO
vtkDataCompressor.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkDataCompressor.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
=========================================================================*/
24
#ifndef __vtkDataCompressor_h
25
#define __vtkDataCompressor_h
26
27
#include "
vtkObject.h
"
28
29
class
vtkUnsignedCharArray
;
30
31
class
VTK_IO_EXPORT
vtkDataCompressor
:
public
vtkObject
32
{
33
public
:
34
vtkTypeMacro(
vtkDataCompressor
,
vtkObject
);
35
void
PrintSelf
(ostream& os,
vtkIndent
indent);
36
41
virtual
unsigned
long
GetMaximumCompressionSpace(
unsigned
long
size
)=0;
42
44
47
unsigned
long
Compress(
const
unsigned
char
* uncompressedData,
48
unsigned
long
uncompressedSize,
49
unsigned
char
* compressedData,
50
unsigned
long
compressionSpace);
52
54
57
unsigned
long
Uncompress(
const
unsigned
char
* compressedData,
58
unsigned
long
compressedSize,
59
unsigned
char
* uncompressedData,
60
unsigned
long
uncompressedSize);
62
64
66
vtkUnsignedCharArray
* Compress(
const
unsigned
char
* uncompressedData,
67
unsigned
long
uncompressedSize);
69
71
75
vtkUnsignedCharArray
* Uncompress(
const
unsigned
char
* compressedData,
76
unsigned
long
compressedSize,
77
unsigned
long
uncompressedSize);
78
protected
:
79
vtkDataCompressor
();
80
~
vtkDataCompressor
();
82
83
// Actual compression method. This must be provided by a subclass.
84
// Must return the size of the compressed data, or zero on error.
85
virtual
unsigned
long
CompressBuffer(
const
unsigned
char
* uncompressedData,
86
unsigned
long
uncompressedSize,
87
unsigned
char
* compressedData,
88
unsigned
long
compressionSpace)=0;
89
// Actual decompression method. This must be provided by a subclass.
90
// Must return the size of the uncompressed data, or zero on error.
91
virtual
unsigned
long
UncompressBuffer(
const
unsigned
char
* compressedData,
92
unsigned
long
compressedSize,
93
unsigned
char
* uncompressedData,
94
unsigned
long
uncompressedSize)=0;
95
private
:
96
vtkDataCompressor
(
const
vtkDataCompressor
&);
// Not implemented.
97
void
operator=(
const
vtkDataCompressor
&);
// Not implemented.
98
};
99
100
#endif
Generated on Thu Mar 13 2014 08:10:20 for VTK by
1.8.1.2