vtkZlibImageCompressor.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
3 // SPDX-License-Identifier: BSD-3-Clause
4 
18 #ifndef vtkZlibImageCompressor_h
19 #define vtkZlibImageCompressor_h
20 
21 #include "vtkImageCompressor.h"
22 #include "vtkPVVTKExtensionsFiltersRenderingModule.h" // needed for export macro
23 
24 class vtkZlibCompressorImageConditioner;
26 
28 {
29 public:
30  static vtkZlibImageCompressor* New();
32  void PrintSelf(ostream& os, vtkIndent indent) override;
33 
35 
39  int Compress() override;
40  int Decompress() override;
42 
44 
47  void SaveConfiguration(vtkMultiProcessStream* stream) override;
48  bool RestoreConfiguration(vtkMultiProcessStream* stream) override;
50 
51  const char* SaveConfiguration() override;
52  const char* RestoreConfiguration(const char* stream) override;
53 
55 
63  vtkSetClampMacro(CompressionLevel, int, 1, 9);
64  vtkGetMacro(CompressionLevel, int);
66 
68 
72  void SetColorSpace(int csId);
73  int GetColorSpace();
75 
77 
84  void SetStripAlpha(int status);
85  int GetStripAlpha();
87 
92  void SetLossLessMode(int mode) override;
93 
94 protected:
96  ~vtkZlibImageCompressor() override;
97 
98 private:
99  vtkZlibCompressorImageConditioner* Conditioner; // manages color space reduction and strip alpha
100  int CompressionLevel; // zlib compression level
101 
103  void operator=(const vtkZlibImageCompressor&) = delete;
104 };
105 
106 #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