ParaView
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
vtkZlibImageCompressor Class Reference

Image compressor/decompressor using Zlib. More...

#include <vtkZlibImageCompressor.h>

Inheritance diagram for vtkZlibImageCompressor:
Inheritance graph
[legend]
Collaboration diagram for vtkZlibImageCompressor:
Collaboration graph
[legend]

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)
 
virtual const char * SaveConfiguration ()
 Serialize compressor configuration (but not the data) into the stream. More...
 
virtual const char * RestoreConfiguration (const char *stream)
 Restore state from the stream, The stream format for all image compressor is: [ClassName, LossLessMode, [Derived Class Stream]]. More...
 
virtual void SetLossLessMode (int mode)
 When set the implementation must use loss-less compression, otherwise implemnetation should user provided settings. More...
 
virtual int Compress ()
 Compress/Decompress data array on the objects input with results in the objects output. More...
 
virtual int Decompress ()
 Compress/Decompress data array on the objects input with results in the objects output. More...
 
virtual void SaveConfiguration (vtkMultiProcessStream *stream)
 Serialize/Restore compressor configuration (but not the data) into the stream. More...
 
virtual bool RestoreConfiguration (vtkMultiProcessStream *stream)
 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
void PrintSelf (ostream &os, vtkIndent indent)
 
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...
 

Static Public Member Functions

static vtkZlibImageCompressorNew ()
 
static int IsTypeOf (const char *type)
 
static vtkZlibImageCompressorSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkImageCompressor
static int IsTypeOf (const char *type)
 
static vtkImageCompressorSafeDownCast (vtkObject *o)
 

Protected Member Functions

 vtkZlibImageCompressor ()
 
virtual ~vtkZlibImageCompressor ()
 
- Protected Member Functions inherited from vtkImageCompressor
virtual void SetConfiguration (const char *)
 
 vtkImageCompressor ()
 Construct with NULL input array and empty but allocated output array. More...
 
virtual ~vtkImageCompressor ()
 Construct with NULL input array and empty but allocated output array. More...
 

Additional Inherited Members

- Protected Attributes inherited from vtkImageCompressor
vtkUnsignedCharArray * Output
 
vtkUnsignedCharArray * Input
 
int LossLessMode
 
char * Configuration
 

Detailed Description

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.

Thanks:
SciberQuest Inc. contributed this class.

Definition at line 38 of file vtkZlibImageCompressor.h.

Member Typedef Documentation

§ Superclass

Definition at line 42 of file vtkZlibImageCompressor.h.

Constructor & Destructor Documentation

§ vtkZlibImageCompressor()

vtkZlibImageCompressor::vtkZlibImageCompressor ( )
protected

§ ~vtkZlibImageCompressor()

virtual vtkZlibImageCompressor::~vtkZlibImageCompressor ( )
protectedvirtual

Member Function Documentation

§ New()

static vtkZlibImageCompressor* vtkZlibImageCompressor::New ( )
static

§ GetClassName()

virtual const char* vtkZlibImageCompressor::GetClassName ( )
virtual

Reimplemented from vtkImageCompressor.

§ IsTypeOf()

static int vtkZlibImageCompressor::IsTypeOf ( const char *  type)
static

§ IsA()

virtual int vtkZlibImageCompressor::IsA ( const char *  type)
virtual

Reimplemented from vtkImageCompressor.

§ SafeDownCast()

static vtkZlibImageCompressor* vtkZlibImageCompressor::SafeDownCast ( vtkObject *  o)
static

§ PrintSelf()

void vtkZlibImageCompressor::PrintSelf ( ostream &  os,
vtkIndent  indent 
)

§ Compress()

virtual int vtkZlibImageCompressor::Compress ( )
virtual

Compress/Decompress data array on the objects input with results in the objects output.

See also Set/GetInput/Output.

Implements vtkImageCompressor.

§ Decompress()

virtual int vtkZlibImageCompressor::Decompress ( )
virtual

Compress/Decompress data array on the objects input with results in the objects output.

See also Set/GetInput/Output.

Implements vtkImageCompressor.

§ SaveConfiguration() [1/2]

virtual void vtkZlibImageCompressor::SaveConfiguration ( vtkMultiProcessStream *  stream)
virtual

Serialize/Restore compressor configuration (but not the data) into the stream.

Reimplemented from vtkImageCompressor.

§ RestoreConfiguration() [1/2]

virtual bool vtkZlibImageCompressor::RestoreConfiguration ( vtkMultiProcessStream *  stream)
virtual

Serialize/Restore compressor configuration (but not the data) into the stream.

Reimplemented from vtkImageCompressor.

§ SaveConfiguration() [2/2]

virtual const char* vtkZlibImageCompressor::SaveConfiguration ( )
virtual

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.

§ RestoreConfiguration() [2/2]

virtual const char* vtkZlibImageCompressor::RestoreConfiguration ( const char *  stream)
virtual

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.

§ SetCompressionLevel()

virtual void vtkZlibImageCompressor::SetCompressionLevel ( int  )
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.

§ GetCompressionLevel()

virtual int vtkZlibImageCompressor::GetCompressionLevel ( )
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.

§ SetColorSpace()

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.

§ GetColorSpace()

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.

§ SetStripAlpha()

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.

§ GetStripAlpha()

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.

§ SetLossLessMode()

virtual void vtkZlibImageCompressor::SetLossLessMode ( int  mode)
virtual

When set the implementation must use loss-less compression, otherwise implemnetation should user provided settings.

Reimplemented from vtkImageCompressor.


The documentation for this class was generated from the following file: