Image compressor/decompressor using Zlib. More...
#include <vtkZlibImageCompressor.h>
Public Types | |
typedef vtkImageCompressor | Superclass |
Public Types inherited from vtkImageCompressor | |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) override |
const char * | SaveConfiguration () override |
Serialize compressor configuration (but not the data) into the stream. More... | |
const char * | RestoreConfiguration (const char *stream) override |
Restore state from the stream, The stream format for all image compressor is: [ClassName, LossLessMode, [Derived Class Stream]]. More... | |
void | SetLossLessMode (int mode) override |
When set the implementation must use loss-less compression, otherwise implemnetation should user provided settings. More... | |
int | Compress () override |
Compress/Decompress data array on the objects input with results in the objects output. More... | |
int | Decompress () override |
Compress/Decompress data array on the objects input with results in the objects output. More... | |
void | SaveConfiguration (vtkMultiProcessStream *stream) override |
Serialize/Restore compressor configuration (but not the data) into the stream. More... | |
bool | RestoreConfiguration (vtkMultiProcessStream *stream) override |
Serialize/Restore compressor configuration (but not the data) into the stream. More... | |
virtual void | SetCompressionLevel (int) |
Set compression level. More... | |
virtual int | GetCompressionLevel () |
Set compression level. More... | |
void | SetColorSpace (int csId) |
Set to an integer between 0 and 5. More... | |
int | GetColorSpace () |
Set to an integer between 0 and 5. More... | |
void | SetStripAlpha (int status) |
Set to boolean value indicating whether alpha values should be stripped prior to compression. More... | |
int | GetStripAlpha () |
Set to boolean value indicating whether alpha values should be stripped prior to compression. More... | |
Public Member Functions inherited from vtkImageCompressor | |
virtual void | SetImageResolution (int width, int height) |
Communicates the next expected image resolution. More... | |
void | SetInput (vtkUnsignedCharArray *input) |
Get/Set the input to this compressor. More... | |
virtual vtkUnsignedCharArray * | GetInput () |
Get/Set the input to this compressor. More... | |
virtual vtkUnsignedCharArray * | GetOutput () |
Get/Set the output of the compressor. More... | |
void | SetOutput (vtkUnsignedCharArray *) |
Get/Set the output of the compressor. More... | |
virtual int | GetLossLessMode () |
When set the implementation must use loss-less compression, otherwise implemnetation should user provided settings. More... | |
Public Member Functions inherited from vtkObject | |
vtkBaseTypeMacro (vtkObject, vtkObjectBase) | |
virtual void | DebugOn () |
virtual void | DebugOff () |
bool | GetDebug () |
void | SetDebug (bool debugFlag) |
virtual void | Modified () |
virtual vtkMTimeType | GetMTime () |
void | RemoveObserver (unsigned long tag) |
void | RemoveObservers (unsigned long event) |
void | RemoveObservers (const char *event) |
void | RemoveAllObservers () |
int | HasObserver (unsigned long event) |
int | HasObserver (const char *event) |
int | InvokeEvent (unsigned long event) |
int | InvokeEvent (const char *event) |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
vtkCommand * | GetCommand (unsigned long tag) |
void | RemoveObserver (vtkCommand *) |
void | RemoveObservers (unsigned long event, vtkCommand *) |
void | RemoveObservers (const char *event, vtkCommand *) |
int | HasObserver (unsigned long event, vtkCommand *) |
int | HasObserver (const char *event, vtkCommand *) |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
int | InvokeEvent (unsigned long event, void *callData) |
int | InvokeEvent (const char *event, void *callData) |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
vtkCommand * | GetCommand (unsigned long tag) |
void | RemoveObserver (vtkCommand *) |
void | RemoveObservers (unsigned long event, vtkCommand *) |
void | RemoveObservers (const char *event, vtkCommand *) |
int | HasObserver (unsigned long event, vtkCommand *) |
int | HasObserver (const char *event, vtkCommand *) |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
int | InvokeEvent (unsigned long event, void *callData) |
int | InvokeEvent (const char *event, void *callData) |
Public Member Functions inherited from vtkObjectBase | |
const char * | GetClassName () const |
virtual void | Delete () |
virtual void | FastDelete () |
void | Print (ostream &os) |
virtual void | Register (vtkObjectBase *o) |
virtual void | UnRegister (vtkObjectBase *o) |
void | SetReferenceCount (int) |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
int | GetReferenceCount () |
void | PrintRevisions (ostream &) |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
int | GetReferenceCount () |
void | PrintRevisions (ostream &) |
Static Public Member Functions | |
static vtkZlibImageCompressor * | New () |
static int | IsTypeOf (const char *type) |
static vtkZlibImageCompressor * | SafeDownCast (vtkObject *o) |
Static Public Member Functions inherited from vtkImageCompressor | |
static int | IsTypeOf (const char *type) |
static vtkImageCompressor * | SafeDownCast (vtkObject *o) |
Static Public Member Functions inherited from vtkObject | |
static vtkObject * | New () |
static void | BreakOnError () |
static void | SetGlobalWarningDisplay (int val) |
static void | GlobalWarningDisplayOn () |
static void | GlobalWarningDisplayOff () |
static int | GetGlobalWarningDisplay () |
static void | SetGlobalWarningDisplay (int val) |
static void | GlobalWarningDisplayOn () |
static void | GlobalWarningDisplayOff () |
static int | GetGlobalWarningDisplay () |
Static Public Member Functions inherited from vtkObjectBase | |
static vtkTypeBool | IsTypeOf (const char *name) |
static vtkObjectBase * | New () |
static vtkObjectBase * | New () |
Protected Member Functions | |
vtkZlibImageCompressor () | |
~vtkZlibImageCompressor () override | |
Protected Member Functions inherited from vtkImageCompressor | |
virtual void | SetConfiguration (const char *) |
vtkImageCompressor () | |
Construct with nullptr input array and empty but allocated output array. More... | |
~vtkImageCompressor () override | |
Construct with nullptr input array and empty but allocated output array. More... | |
Protected Member Functions inherited from vtkObject | |
vtkObject () | |
virtual | ~vtkObject () |
void | RegisterInternal (vtkObjectBase *, vtkTypeBool check) VTK_OVERRIDE |
void | UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) VTK_OVERRIDE |
void | InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL) |
void | InternalReleaseFocus () |
void | InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL) |
void | InternalReleaseFocus () |
Protected Member Functions inherited from vtkObjectBase | |
vtkObjectBase () | |
virtual | ~vtkObjectBase () |
virtual void | CollectRevisions (ostream &) |
virtual void | ReportReferences (vtkGarbageCollector *) |
vtkObjectBase (const vtkObjectBase &) | |
void | operator= (const vtkObjectBase &) |
Additional Inherited Members | |
Protected Attributes inherited from vtkImageCompressor | |
vtkUnsignedCharArray * | Output |
vtkUnsignedCharArray * | Input |
int | LossLessMode |
char * | Configuration |
Protected Attributes inherited from vtkObject | |
bool | Debug |
vtkTimeStamp | MTime |
vtkSubjectHelper * | SubjectHelper |
Protected Attributes inherited from vtkObjectBase | |
vtkAtomicInt32 | ReferenceCount |
vtkWeakPointerBase ** | WeakPointers |
Image compressor/decompressor using Zlib.
This class compresses Image data using Zlib. The compression level varies between 1 and 9, 1 being the fastest at the cost of the compression ratio, 9 producing the highest compression ratio at the cost of speed. Optionally color depth may be reduced and alpha stripped/restored.
Definition at line 27 of file vtkZlibImageCompressor.h.
Definition at line 31 of file vtkZlibImageCompressor.h.
|
protected |
|
overrideprotected |
|
static |
|
virtual |
Reimplemented from vtkImageCompressor.
Reimplemented from vtkImageCompressor.
|
static |
|
overridevirtual |
Reimplemented from vtkImageCompressor.
|
overridevirtual |
Compress/Decompress data array on the objects input with results in the objects output.
See also Set/GetInput/Output.
Implements vtkImageCompressor.
|
overridevirtual |
Compress/Decompress data array on the objects input with results in the objects output.
See also Set/GetInput/Output.
Implements vtkImageCompressor.
|
overridevirtual |
Serialize/Restore compressor configuration (but not the data) into the stream.
Reimplemented from vtkImageCompressor.
|
overridevirtual |
Serialize/Restore compressor configuration (but not the data) into the stream.
Reimplemented from vtkImageCompressor.
|
overridevirtual |
Serialize compressor configuration (but not the data) into the stream.
A pointer to the internally managed stream is returned (ie do not free it!).
Reimplemented from vtkImageCompressor.
Restore state from the stream, The stream format for all image compressor is: [ClassName, LossLessMode, [Derived Class Stream]].
Upon success the stream is returned otherwise 0 is returned indicating an error.
Reimplemented from vtkImageCompressor.
|
virtual |
Set compression level.
A setting of 1 is the fastest producing the smallest compression ratio while a setting of 9 is the slowest producing the highest compression ratio. Zlib is loss-less regardless of level however, setting SetColorSpaceReduction factor to a non zero value will cause internal pre-processor to reduce the color space prior to compression which can improve compression ratio realized.
|
virtual |
Set compression level.
A setting of 1 is the fastest producing the smallest compression ratio while a setting of 9 is the slowest producing the highest compression ratio. Zlib is loss-less regardless of level however, setting SetColorSpaceReduction factor to a non zero value will cause internal pre-processor to reduce the color space prior to compression which can improve compression ratio realized.
void vtkZlibImageCompressor::SetColorSpace | ( | int | csId | ) |
Set to an integer between 0 and 5.
This uses the same color space reduction as the squirt compressor. If set to 0 no colorspace reduction is performed.
int vtkZlibImageCompressor::GetColorSpace | ( | ) |
Set to an integer between 0 and 5.
This uses the same color space reduction as the squirt compressor. If set to 0 no colorspace reduction is performed.
void vtkZlibImageCompressor::SetStripAlpha | ( | int | status | ) |
Set to boolean value indicating whether alpha values should be stripped prior to compression.
Stripping alpha values will reduce input to compressor by 1/4 and results in speed up in compressor run time and of course reduced image size. Stripped alpha value are reinstated to 0xff during decompress.
int vtkZlibImageCompressor::GetStripAlpha | ( | ) |
Set to boolean value indicating whether alpha values should be stripped prior to compression.
Stripping alpha values will reduce input to compressor by 1/4 and results in speed up in compressor run time and of course reduced image size. Stripped alpha value are reinstated to 0xff during decompress.
|
overridevirtual |
When set the implementation must use loss-less compression, otherwise implemnetation should user provided settings.
Reimplemented from vtkImageCompressor.