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 "vtkPVVTKExtensionsFiltersRenderingModule.h" // needed for export macro
34 
35 class vtkZlibCompressorImageConditioner;
37 
39 {
40 public:
41  static vtkZlibImageCompressor* New();
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
46 
50  int Compress() override;
51  int Decompress() override;
53 
55 
58  void SaveConfiguration(vtkMultiProcessStream* stream) override;
59  bool RestoreConfiguration(vtkMultiProcessStream* stream) override;
61 
62  const char* SaveConfiguration() override;
63  const char* RestoreConfiguration(const char* stream) override;
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  void SetLossLessMode(int mode) override;
104 
105 protected:
107  ~vtkZlibImageCompressor() override;
108 
109 private:
110  vtkZlibCompressorImageConditioner* Conditioner; // manages color space reduction and strip alpha
111  int CompressionLevel; // zlib compression level
112 
113 private:
115  void operator=(const vtkZlibImageCompressor&) = delete;
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.
#define VTKPVVTKEXTENSIONSFILTERSRENDERING_EXPORT
virtual int Compress()=0
Call this method to compress the input and generate the compressed data.
static vtkObject * New()
void PrintSelf(ostream &os, vtkIndent indent) override