C# 클래스 CSJ2K.j2k.wavelet.Subband

This abstract class represents a subband in a bidirectional tree structure that describes the subband decomposition for a wavelet transform. This class is implemented by the SubbandAn and SubbandSyn classes, which are for the analysis and synthesis sides respectively.

The element can be either a node or a leaf of the tree. If it is a node, it has 4 descendants (LL, HL, LH and HH). If it is a leaf, it has no descendant.

The tree is bidirectional. Each element in the tree structure has a "parent", which is the subband from which the element was obtained by decomposition. The only exception is the root element which, for obvious reasons, has no parent (i.e. it is null).

파일 보기 프로젝트 열기: cureos/csj2k 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
anGainExp int
h int
isNode bool
level int
nomCBlkH int
nomCBlkW int
numCb Coord
orientation int
resLvl int
sbandIdx int
ulcx int
ulcy int
ulx int
uly int
w int

공개 메소드들

메소드 설명
Subband ( ) : System

Creates a Subband element with all the default values. The dimensions are (0,0), the upper left corner is (0,0) and the upper-left corner with respect to the canvas is (0,0) too.

Subband ( int w, int h, int ulcx, int ulcy, int lvls, WaveletFilter hfilters, WaveletFilter vfilters ) : System

Creates the top-level node and the entire subband tree, with the top-level dimensions, the number of decompositions, and the decomposition tree as specified.

For the analysis subband gain calculation it is assumed that analysis filters are normalized with a DC gain of 1 and a Nyquist gain of 2.

This constructor does not initialize the value of the magBits member variable. This variable is normally initialized by the quantizer, on the encoder side, or the bit stream reader, on the decoder side.

ToString ( ) : System.String

Returns subband informations in a string.

getSubband ( int x, int y ) : Subband

Returns a reference to the Subband element to which the specified point belongs. The specified point must be inside this (i.e. the one defined by this object) subband. This method searches through the tree.

getSubbandByIdx ( int rl, int sbi ) : Subband

Returns a subband element in the tree, given its resolution level and subband index. This method searches through the tree.

nextSubband ( ) : Subband

Returns the next subband in the same resolution level, following the subband index order. If already at the last subband then null is returned. If this subband is not a leaf an IllegalArgumentException is thrown.

보호된 메소드들

메소드 설명
initChilds ( ) : void

Initializes the childs of this node with the correct values. The sizes of the child subbands are calculated by taking into account the position of the subband in the canvas.

For the analysis subband gain calculation it is assumed that analysis filters are normalized with a DC gain of 1 and a Nyquist gain of 2.

split ( WaveletFilter hfilter, WaveletFilter vfilter ) : Subband

Splits the current subband in its four subbands. This creates the four childs (LL, HL, LH and HH) and converts the leaf in a node.

메소드 상세

Subband() 공개 메소드

Creates a Subband element with all the default values. The dimensions are (0,0), the upper left corner is (0,0) and the upper-left corner with respect to the canvas is (0,0) too.
public Subband ( ) : System
리턴 System

Subband() 공개 메소드

Creates the top-level node and the entire subband tree, with the top-level dimensions, the number of decompositions, and the decomposition tree as specified.

For the analysis subband gain calculation it is assumed that analysis filters are normalized with a DC gain of 1 and a Nyquist gain of 2.

This constructor does not initialize the value of the magBits member variable. This variable is normally initialized by the quantizer, on the encoder side, or the bit stream reader, on the decoder side.

public Subband ( int w, int h, int ulcx, int ulcy, int lvls, WaveletFilter hfilters, WaveletFilter vfilters ) : System
w int The top-level width /// ///
h int The top-level height /// ///
ulcx int The horizontal coordinate of the upper-left corner with /// respect to the canvas origin, in the component grid. /// ///
ulcy int The vertical coordinate of the upper-left corner with /// respect to the canvas origin, in the component grid. /// ///
lvls int The number of levels (or LL decompositions) in the tree. /// ///
hfilters WaveletFilter The horizontal wavelet filters (analysis or synthesis) /// for each resolution level, starting at resolution level 0. If there are /// less elements in the array than there are resolution levels, the last /// element is used for the remaining resolution levels. /// ///
vfilters WaveletFilter The vertical wavelet filters (analysis or synthesis) /// for each resolution level, starting at resolution level 0. If there are /// less elements in the array than there are resolution levels, the last /// element is used for the remaining resolution levels. /// ///
리턴 System

ToString() 공개 메소드

Returns subband informations in a string.
public ToString ( ) : System.String
리턴 System.String

getSubband() 공개 메소드

Returns a reference to the Subband element to which the specified point belongs. The specified point must be inside this (i.e. the one defined by this object) subband. This method searches through the tree.
public getSubband ( int x, int y ) : Subband
x int horizontal coordinate of the specified point. /// ///
y int horizontal coordinate of the specified point. /// ///
리턴 Subband

getSubbandByIdx() 공개 메소드

Returns a subband element in the tree, given its resolution level and subband index. This method searches through the tree.
public getSubbandByIdx ( int rl, int sbi ) : Subband
rl int The resolution level. /// ///
sbi int The subband index, within the resolution level. /// ///
리턴 Subband

initChilds() 보호된 메소드

Initializes the childs of this node with the correct values. The sizes of the child subbands are calculated by taking into account the position of the subband in the canvas.

For the analysis subband gain calculation it is assumed that analysis filters are normalized with a DC gain of 1 and a Nyquist gain of 2.

protected initChilds ( ) : void
리턴 void

nextSubband() 공개 메소드

Returns the next subband in the same resolution level, following the subband index order. If already at the last subband then null is returned. If this subband is not a leaf an IllegalArgumentException is thrown.
public nextSubband ( ) : Subband
리턴 Subband

split() 보호된 추상적인 메소드

Splits the current subband in its four subbands. This creates the four childs (LL, HL, LH and HH) and converts the leaf in a node.
protected abstract split ( WaveletFilter hfilter, WaveletFilter vfilter ) : Subband
hfilter WaveletFilter The horizontal wavelet filter used to decompose this /// subband. /// ///
vfilter WaveletFilter The vertical wavelet filter used to decompose this /// subband. /// ///
리턴 Subband

프로퍼티 상세

anGainExp 공개적으로 프로퍼티

The base 2 exponent of the analysis gain of the subband. The analysis gain of a subband is defined as the gain of the previous subband (i.e. the one from which this one was obtained) multiplied by the line gain and by the column gain. The line (column) gain is the gain of the line (column) filter that was used to obtain it, which is the DC gain for a low-pass filter and the Nyquist gain for a high-pass filter. It is 0 by default.

Using the base 2 exponent of the value contrains the possible gains to powers of 2. However this is perfectly compatible to the filter normalization policy assumed here. See the split() method for more details.

public int anGainExp
리턴 int

h 공개적으로 프로퍼티

The height of the subband
public int h
리턴 int

isNode 공개적으로 프로퍼티

True if it is a node in the tree, false if it is a leaf.
public bool isNode
리턴 bool

level 공개적으로 프로퍼티

The level in the tree to which this subband belongs, which is the number of performed wavelet decompositions to get this subband. It is 0 for the top-level (i.e. root) node.
public int level
리턴 int

nomCBlkH 공개적으로 프로퍼티

The nominal code-block height
public int nomCBlkH
리턴 int

nomCBlkW 공개적으로 프로퍼티

The nominal code-block width
public int nomCBlkW
리턴 int

numCb 공개적으로 프로퍼티

The number of code-blocks (in both directions) contained in this subband.
public Coord numCb
리턴 Coord

orientation 공개적으로 프로퍼티

The orientation of this subband (WT_ORIENT_LL, WT_ORIENT_HL, WT_ORIENT_LH, WT_ORIENT_HH).
public int orientation
리턴 int

resLvl 공개적으로 프로퍼티

The resolution level to which this subband contributes. 0 is the smallest resolution level (the one with the lowest frequency LL subband).
public int resLvl
리턴 int

sbandIdx 공개적으로 프로퍼티

The subband index within its resolution level. This value uniquely identifies a subband within a resolution level and a decomposition level within it. Note that only leaf elements represent "real" subbands, while node elements represent only intermediate stages.

It is defined recursively. The root node gets a value of 0. For a given node, with a subband index 'b', its LL descendant gets 4*b, its HL descendant 4*b+1, its LH descendant 4*b+2, and its HH descendant 4*b+3, for their subband indexes.

public int sbandIdx
리턴 int

ulcx 공개적으로 프로퍼티

The horizontal coordinate of the upper-left corner of the subband, with respect to the canvas origin, in the component's grid and subband's decomposition level. This is the real horizontal index of the first column of this subband. If even the horizontal decomposition of this subband should be done with the low-pass-first convention. If odd it should be done with the high-pass-first convention.
public int ulcx
리턴 int

ulcy 공개적으로 프로퍼티

The vertical coordinate of the upper-left corner of the subband, with respect to the canvas origin, in the component's grid and subband's decomposition level. This is the real vertical index of the first column of this subband. If even the vertical decomposition of this subband should be done with the low-pass-first convention. If odd it should be done with the high-pass-first convention.
public int ulcy
리턴 int

ulx 공개적으로 프로퍼티

The horizontal coordinate of the upper-left corner of the subband
public int ulx
리턴 int

uly 공개적으로 프로퍼티

The vertical coordinate of the upper-left corner of the subband
public int uly
리턴 int

w 공개적으로 프로퍼티

The width of the subband
public int w
리턴 int