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

Image compressor/decompressor using SQUIRT. More...

#include <vtkSquirtCompressor.h>

Inheritance diagram for vtkSquirtCompressor:
Inheritance graph
[legend]
Collaboration diagram for vtkSquirtCompressor:
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 SetSquirtLevel (int)
 Set Squirt compression level. More...
 
virtual int GetSquirtLevel ()
 Set Squirt compression level. 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...
 
- 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 void SetLossLessMode (int)
 When set the implementation must use loss-less compression, otherwise implemnetation should user provided settings. 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 vtkSquirtCompressorNew ()
 
static int IsTypeOf (const char *type)
 
static vtkSquirtCompressorSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkImageCompressor
static int IsTypeOf (const char *type)
 
static vtkImageCompressorSafeDownCast (vtkObject *o)
 

Protected Member Functions

 vtkSquirtCompressor ()
 
virtual ~vtkSquirtCompressor ()
 
int DecompressRGB ()
 
int DecompressRGBA ()
 
- 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...
 

Protected Attributes

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

Detailed Description

Image compressor/decompressor using SQUIRT.

This class compresses Image data using SQUIRT a Run-Length-Encoded compression scheme. The Squirt Level controls the compression. 0 is lossless compression, 1 through 5 are lossy compression levels with 5 being maximum compression.

Squirt produces smaller compression ratio than some other popular compression algorithm. However, Squirt has a relatively high throughput compared to some other compression algorithm. Squirt's performance is optimized for RGBa images, however the class can also work with RGB images. There is no performance hit when applying the lossy comrpession levels.

Levels 1 through 5 apply a color reducing mask to the run computation, not to the pixel directly. This is clever in that no new colors are introduced to the image, and as a result one doesn't see drastic changes between the reduced color image and the original. However, when using the higher levels one may get runs that produce visual artifiacts. For example when a run starts in one actor whose reduced color matches the background the background is colored with the actor color.

The compressor uses a modified SQUIRT implementation where encode 4-bit opacity information as well. This is needed to improve background color blending for translucent renderings in ParaView.

Thanks:
Thanks to Sandia National Laboratories for this compression technique

Definition at line 59 of file vtkSquirtCompressor.h.

Member Typedef Documentation

§ Superclass

Definition at line 63 of file vtkSquirtCompressor.h.

Constructor & Destructor Documentation

§ vtkSquirtCompressor()

vtkSquirtCompressor::vtkSquirtCompressor ( )
protected

§ ~vtkSquirtCompressor()

virtual vtkSquirtCompressor::~vtkSquirtCompressor ( )
protectedvirtual

Member Function Documentation

§ New()

static vtkSquirtCompressor* vtkSquirtCompressor::New ( )
static

§ GetClassName()

virtual const char* vtkSquirtCompressor::GetClassName ( )
virtual

Reimplemented from vtkImageCompressor.

§ IsTypeOf()

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

§ IsA()

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

Reimplemented from vtkImageCompressor.

§ SafeDownCast()

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

§ PrintSelf()

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

§ SetSquirtLevel()

virtual void vtkSquirtCompressor::SetSquirtLevel ( int  )
virtual

Set Squirt compression level.

Level 0 is lossless compression, 1 through 5 are lossy compression levels with 5 being maximum compression.

§ GetSquirtLevel()

virtual int vtkSquirtCompressor::GetSquirtLevel ( )
virtual

Set Squirt compression level.

Level 0 is lossless compression, 1 through 5 are lossy compression levels with 5 being maximum compression.

§ Compress()

virtual int vtkSquirtCompressor::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 vtkSquirtCompressor::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 vtkSquirtCompressor::SaveConfiguration ( vtkMultiProcessStream *  stream)
virtual

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

Reimplemented from vtkImageCompressor.

§ RestoreConfiguration() [1/2]

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

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

Reimplemented from vtkImageCompressor.

§ SaveConfiguration() [2/2]

virtual const char* vtkSquirtCompressor::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* vtkSquirtCompressor::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.

§ DecompressRGB()

int vtkSquirtCompressor::DecompressRGB ( )
protected

§ DecompressRGBA()

int vtkSquirtCompressor::DecompressRGBA ( )
protected

Member Data Documentation

§ SquirtLevel

int vtkSquirtCompressor::SquirtLevel
protected

Definition at line 102 of file vtkSquirtCompressor.h.


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