ParaView
vtkZlibImageCompressor.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkZlibImageCompressor.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 =========================================================================*/
15 
29 #ifndef vtkZlibImageCompressor_h
30 #define vtkZlibImageCompressor_h
31 
32 #include "vtkImageCompressor.h"
33 #include "vtkPVVTKExtensionsRenderingModule.h" // needed for export macro
34 
35 class vtkZlibCompressorImageConditioner;
36 class vtkMultiProcessStream;
37 
38 class VTKPVVTKEXTENSIONSRENDERING_EXPORT vtkZlibImageCompressor : public vtkImageCompressor
39 {
40 public:
41  static vtkZlibImageCompressor* New();
43  void PrintSelf(ostream& os, vtkIndent indent);
44 
46 
50  virtual int Compress();
51  virtual int Decompress();
53 
55 
58  virtual void SaveConfiguration(vtkMultiProcessStream* stream);
59  virtual bool RestoreConfiguration(vtkMultiProcessStream* stream);
61 
62  virtual const char* SaveConfiguration();
63  virtual const char* RestoreConfiguration(const char* stream);
64 
66 
74  vtkSetClampMacro(CompressionLevel, int, 1, 9);
75  vtkGetMacro(CompressionLevel, int);
77 
79 
83  void SetColorSpace(int csId);
84  int GetColorSpace();
86 
88 
95  void SetStripAlpha(int status);
96  int GetStripAlpha();
98 
103  virtual void SetLossLessMode(int mode);
104 
105 protected:
107  virtual ~vtkZlibImageCompressor();
108 
109 private:
110  vtkZlibCompressorImageConditioner* Conditioner; // manages color space reduction and strip alpha
111  int CompressionLevel; // zlib compression level
112 
113 private:
114  vtkZlibImageCompressor(const vtkZlibImageCompressor&) VTK_DELETE_FUNCTION;
115  void operator=(const vtkZlibImageCompressor&) VTK_DELETE_FUNCTION;
116 };
117 
118 #endif
virtual void SetLossLessMode(int)
When set the implementation must use loss-less compression, otherwise implemnetation should user prov...
virtual int Decompress()=0
Decompresses and geenartes the decompressed data as output.
virtual const char * SaveConfiguration()
Serialize compressor configuration (but not the data) into the stream.
Superclass for image compressor/decompressor used by Composite Managers.
virtual bool RestoreConfiguration(vtkMultiProcessStream *stream)
Restore state from the stream.
Image compressor/decompressor using Zlib.
virtual int Compress()=0
Call this method to compress the input and generate the compressed data.
void PrintSelf(ostream &os, vtkIndent indent)