Image compressor/decompressor using SQUIRT. More...
#include <vtkSquirtCompressor.h>
Public Types | |
typedef vtkImageCompressor | Superclass |
![]() | |
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... | |
virtual void | SetSquirtLevel (int) |
Set Squirt compression level. More... | |
virtual int | GetSquirtLevel () |
Set Squirt compression level. 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 | 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 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... | |
![]() | |
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) |
![]() | |
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 vtkSquirtCompressor * | New () |
static int | IsTypeOf (const char *type) |
static vtkSquirtCompressor * | SafeDownCast (vtkObject *o) |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkImageCompressor * | SafeDownCast (vtkObject *o) |
![]() | |
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 vtkTypeBool | IsTypeOf (const char *name) |
static vtkObjectBase * | New () |
static vtkObjectBase * | New () |
Protected Member Functions | |
vtkSquirtCompressor () | |
~vtkSquirtCompressor () override | |
int | DecompressRGB () |
int | DecompressRGBA () |
![]() | |
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... | |
![]() | |
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 () |
![]() | |
vtkObjectBase () | |
virtual | ~vtkObjectBase () |
virtual void | CollectRevisions (ostream &) |
virtual void | ReportReferences (vtkGarbageCollector *) |
vtkObjectBase (const vtkObjectBase &) | |
void | operator= (const vtkObjectBase &) |
Protected Attributes | |
int | SquirtLevel |
![]() | |
vtkUnsignedCharArray * | Output |
vtkUnsignedCharArray * | Input |
int | LossLessMode |
char * | Configuration |
![]() | |
bool | Debug |
vtkTimeStamp | MTime |
vtkSubjectHelper * | SubjectHelper |
![]() | |
vtkAtomicInt32 | ReferenceCount |
vtkWeakPointerBase ** | WeakPointers |
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.
Definition at line 44 of file vtkSquirtCompressor.h.
Definition at line 48 of file vtkSquirtCompressor.h.
|
protected |
|
overrideprotected |
|
static |
|
virtual |
Reimplemented from vtkImageCompressor.
Reimplemented from vtkImageCompressor.
|
static |
|
overridevirtual |
Reimplemented from vtkImageCompressor.
|
virtual |
Set Squirt compression level.
Level 0 is lossless compression, 1 through 5 are lossy compression levels with 5 being maximum compression.
|
virtual |
Set Squirt compression level.
Level 0 is lossless compression, 1 through 5 are lossy compression levels with 5 being maximum compression.
|
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.
|
protected |
|
protected |
|
protected |
Definition at line 87 of file vtkSquirtCompressor.h.