public abstract class Subband extends Object
The element can be either a node or a leaf of the tree. If it is a node then ther are 4 descendants (LL, HL, LH and HH). If it is a leaf ther are no descendants.
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 has no parent (i.e.it's null), for obvious reasons.
SubbandAn
,
SubbandSyn
Modifier and Type | Field and Description |
---|---|
int |
anGainExp
The base 2 exponent of the analysis gain of the subband.
|
int |
h
The height of the subband
|
boolean |
isNode
True if it is a node in the tree, false if it is a leaf.
|
int |
level
The level in the tree to which this subband belongs, which is the
number of wavelet decompositions performed to produce this subband.
|
int |
nomCBlkH
The nominal code-block height
|
int |
nomCBlkW
The nominal code-block width
|
Point |
numCb
The number of code-blocks (in both directions) contained in this
subband.
|
int |
orientation
The orientation of this subband (WT_ORIENT_LL, WT_ORIENT_HL,
WT_ORIENT_LH, WT_ORIENT_HH).
|
int |
resLvl
The resolution level to which this subband contributes.
|
int |
sbandIdx
The subband index within its resolution level.
|
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.
|
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.
|
int |
ulx
The horizontal coordinate of the upper-left corner of the subband
|
int |
uly
The vertical coordinate of the upper-left corner of the subband
|
int |
w
The width of the subband
|
static int |
WT_ORIENT_HH
The ID for the HH orientation
|
static int |
WT_ORIENT_HL
The ID for the HL (horizontal high-pass) orientation
|
static int |
WT_ORIENT_LH
The ID for the LH (vertical high-pass) orientation
|
static int |
WT_ORIENT_LL
The ID for the LL orientation
|
Constructor and Description |
---|
Subband()
Creates a Subband element with all the default values.
|
Subband(int w,
int h,
int ulcx,
int ulcy,
int lvls,
WaveletFilter[] hfilters,
WaveletFilter[] vfilters)
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.
|
Modifier and Type | Method and Description |
---|---|
abstract Subband |
getHH()
Returns the HH child subband of this subband.
|
abstract Subband |
getHL()
Returns the HL (horizontal high-pass) child subband of this subband.
|
abstract WaveletFilter |
getHorWFilter()
This function returns the horizontal wavelet filter relevant to this
subband
|
abstract Subband |
getLH()
Returns the LH (vertical high-pass) child subband of this subband.
|
abstract Subband |
getLL()
Returns the LL child subband of this subband.
|
Subband |
getNextResLevel()
Returns the first leaf subband element in the next higher resolution
level.
|
abstract Subband |
getParent()
Returns the parent of this subband.
|
Subband |
getSubband(int x,
int y)
Returns a reference to the Subband element to which the specified point
belongs.
|
Subband |
getSubbandByIdx(int rl,
int sbi)
Returns a subband element in the tree, given its resolution level and
subband index.
|
abstract WaveletFilter |
getVerWFilter()
This function returns the vertical wavelet filter relevant to this
subband
|
protected void |
initChilds()
Initializes the childs of this node with the correct values.
|
Subband |
nextSubband()
Returns the next subband in the same resolution level, following the
subband index order.
|
protected abstract Subband |
split(WaveletFilter hfilter,
WaveletFilter vfilter)
Splits the current subband in its four subbands.
|
String |
toString()
Returns subband informations in a string.
|
public static final int WT_ORIENT_LL
public static final int WT_ORIENT_HL
public static final int WT_ORIENT_LH
public static final int WT_ORIENT_HH
public boolean isNode
public int orientation
public int level
public int resLvl
public Point numCb
public int anGainExp
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 sbandIdx
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 ulcx
public int ulcy
public int ulx
public int uly
public int w
public int h
public int nomCBlkW
public int nomCBlkH
public Subband()
public Subband(int w, int h, int ulcx, int ulcy, int lvls, WaveletFilter[] hfilters, WaveletFilter[] vfilters)
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.
w
- The top-level widthh
- The top-level heightulcx
- The horizontal coordinate of the upper-left corner with
respect to the canvas origin, in the component grid.ulcy
- The vertical coordinate of the upper-left corner with
respect to the canvas origin, in the component grid.lvls
- The number of levels (or LL decompositions) in the tree.hfilters
- 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
- 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.WaveletTransform
public abstract Subband getParent()
public abstract Subband getLL()
public abstract Subband getHL()
public abstract Subband getLH()
public abstract Subband getHH()
protected abstract Subband split(WaveletFilter hfilter, WaveletFilter vfilter)
hfilter
- The horizontal wavelet filter used to decompose this
subband.vfilter
- The vertical wavelet filter used to decompose this
subband.protected void initChilds()
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.
public Subband nextSubband()
public Subband getNextResLevel()
public Subband getSubbandByIdx(int rl, int sbi)
rl
- The resolution level.sbi
- The subband index, within the resolution level.public Subband getSubband(int x, int y)
x
- horizontal coordinate of the specified point.y
- horizontal coordinate of the specified point.public String toString()
public abstract WaveletFilter getHorWFilter()
public abstract WaveletFilter getVerWFilter()
Copyright © 2017 Open Microscopy Environment