Scribus
Open source desktop publishing at your fingertips
CSubband Class Reference

Wavelet channel class. More...

#include <Subband.h>

Public Member Functions

 CSubband ()
 Standard constructor.
 
 ~CSubband ()
 Destructor.
 
bool AllocMemory ()
 
void FreeMemory ()
 Delete the memory buffer of this subband.
 
void ExtractTile (CEncoder &encoder, bool tile=false, UINT32 tileX=0, UINT32 tileY=0) THROW_
 
void PlaceTile (CDecoder &decoder, int quantParam, bool tile=false, UINT32 tileX=0, UINT32 tileY=0) THROW_
 
void Quantize (int quantParam)
 
void Dequantize (int quantParam)
 
void SetData (UINT32 pos, DataT v)
 
DataT * GetBuffer ()
 
DataT GetData (UINT32 pos) const
 
int GetLevel () const
 
int GetHeight () const
 
int GetWidth () const
 
Orientation GetOrientation () const
 
void IncBuffRow (UINT32 pos)
 

Friends

class CWaveletTransform
 

Detailed Description

Wavelet channel class.

PGF wavelet channel subband class.

Author
C. Stamm, R. Spuler

Member Function Documentation

bool CSubband::AllocMemory ( )

Allocate a memory buffer to store all wavelet coefficients of this subband.

Returns
True if the allocation did work without any problems
void CSubband::Dequantize ( int  quantParam)

Perform subband dequantization with given quantization parameter. A scalar quantization (with dead-zone) is used. A large quantization value results in strong quantization and therefore in big quality loss.

Parameters
quantParamA quantization parameter (larger or equal to 0)
void CSubband::ExtractTile ( CEncoder encoder,
bool  tile = false,
UINT32  tileX = 0,
UINT32  tileY = 0 
)

Extracts a rectangular subregion of this subband. Write wavelet coefficients into buffer. It might throw an IOException.

Parameters
encoderAn encoder instance
tileTrue if just a rectangular region is extracted, false if the entire subband is extracted.
tileXTile index in x-direction
tileYTile index in y-direction
DataT* CSubband::GetBuffer ( )
inline

Get a pointer to an array of all wavelet coefficients of this subband.

Returns
Pointer to array of wavelet coefficients
DataT CSubband::GetData ( UINT32  pos) const
inline

Return wavelet coefficient at given position.

Parameters
posA subband position (>= 0)
Returns
Wavelet coefficient
int CSubband::GetHeight ( ) const
inline

Return height of this subband.

Returns
Height of this subband (in pixels)
int CSubband::GetLevel ( ) const
inline

Return level of this subband.

Returns
Level of this subband
Orientation CSubband::GetOrientation ( ) const
inline

Return orientation of this subband. LL LH HL HH

Returns
Orientation of this subband (LL, HL, LH, HH)
int CSubband::GetWidth ( ) const
inline

Return width of this subband.

Returns
Width of this subband (in pixels)
void CSubband::IncBuffRow ( UINT32  pos)
inline

Set data buffer position to given position + one row.

Parameters
posGiven position
void CSubband::PlaceTile ( CDecoder decoder,
int  quantParam,
bool  tile = false,
UINT32  tileX = 0,
UINT32  tileY = 0 
)

Decoding and dequantization of this subband. It might throw an IOException.

Parameters
decoderA decoder instance
quantParamDequantization value
tileTrue if just a rectangular region is placed, false if the entire subband is placed.
tileXTile index in x-direction
tileYTile index in y-direction
void CSubband::Quantize ( int  quantParam)

Perform subband quantization with given quantization parameter. A scalar quantization (with dead-zone) is used. A large quantization value results in strong quantization and therefore in big quality loss.

Parameters
quantParamA quantization parameter (larger or equal to 0)
void CSubband::SetData ( UINT32  pos,
DataT  v 
)
inline

Store wavelet coefficient in subband at given position.

Parameters
posA subband position (>= 0)
vA wavelet coefficient

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