public class SubbandAn extends Subband
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 there 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.
Modifier and Type | Field and Description |
---|---|
AnWTFilter |
hFilter
The horizontal analysis filter used to decompose this
subband.
|
float |
l2Norm
The L2-norm of the synthesis basis waveform of this subband,
applicable to "leafs" only.
|
SubbandAn |
parent
The reference to the parent of this subband.
|
float |
stepWMSE
The contribution to the MSE or WMSE error that would result in the
image if there was an error of exactly one quantization step size in
the sample of the subband.
|
SubbandAn |
subb_HH
The reference to the HH subband resulting from the
decomposition of this subband.
|
SubbandAn |
subb_HL
The reference to the HL subband (horizontal high-pass)
resulting from the decomposition of this subband.
|
SubbandAn |
subb_LH
The reference to the LH subband (vertical high-pass) resulting
from the decomposition of this subband.
|
SubbandAn |
subb_LL
The reference to the LL subband resulting from the
decomposition of this subband.
|
AnWTFilter |
vFilter
The vertical analysis filter used to decompose this
subband.
|
anGainExp, h, isNode, level, nomCBlkH, nomCBlkW, numCb, orientation, resLvl, sbandIdx, ulcx, ulcy, ulx, uly, w, WT_ORIENT_HH, WT_ORIENT_HL, WT_ORIENT_LH, WT_ORIENT_LL
Constructor and Description |
---|
SubbandAn()
Creates a SubbandAn element with all the default values.
|
SubbandAn(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 |
---|---|
private void |
assignL2Norm(float l2n)
Assigns the given L2-norm to the first leaf that does not have
an L2-norm value yet (i.e.
|
private void |
calcBasisWaveForms(float[][] wfs)
Calculates the basis waveform of the first leaf for which the
L2-norm has not been calculated yet.
|
private void |
calcL2Norms()
Calculates the L2-norm of the sythesis waveforms of every leaf
in the tree.
|
Subband |
getHH()
Returns the HH child subband of this subband.
|
Subband |
getHL()
Returns the HL (horizontal high-pass) child subband of this
subband.
|
WaveletFilter |
getHorWFilter()
This function returns the horizontal wavelet filter relevant to this
subband
|
Subband |
getLH()
Returns the LH (vertical high-pass) child subband of this
subband.
|
Subband |
getLL()
Returns the LL child subband of this subband.
|
Subband |
getParent()
Returns the parent of this subband.
|
WaveletFilter |
getVerWFilter()
This function returns the vertical wavelet filter relevant to this
subband
|
protected Subband |
split(WaveletFilter hfilter,
WaveletFilter vfilter)
Splits the current subband in its four subbands.
|
getNextResLevel, getSubband, getSubbandByIdx, initChilds, nextSubband, toString
public SubbandAn parent
public SubbandAn subb_LL
public SubbandAn subb_HL
public SubbandAn subb_LH
public SubbandAn subb_HH
public AnWTFilter hFilter
public AnWTFilter vFilter
public float l2Norm
public float stepWMSE
Quantizer
public SubbandAn()
public SubbandAn(int w, int h, int ulcx, int ulcy, int lvls, WaveletFilter[] hfilters, WaveletFilter[] vfilters)
This constructor just calls the same constructor of the super class, and then calculates the L2-norm (or energy weight) of each leaf.
This constructor does not initialize the value of the magBits or stepWMSE member variables. This variables are normally initialized by the quantizer (see Quantizer).
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 analysis filters for each
resolution level, starting at resolution level 0.vfilters
- The vertical wavelet analysis filters for each
resolution level, starting at resolution level 0.Subband.Subband(int,int,int,int,int,
WaveletFilter[],WaveletFilter[])
,
Quantizer
public Subband getParent()
public Subband getLL()
public Subband getHL()
public Subband getLH()
public Subband getHH()
protected Subband split(WaveletFilter hfilter, WaveletFilter vfilter)
It uses the initChilds() method to initialize the childs.
split
in class Subband
hfilter
- The horizontal wavelet filter used to decompose
this subband. It has to be a AnWTFilter object.vfilter
- The vertical wavelet filter used to decompose this
subband. It has to be a AnWTFilter object.Subband.initChilds()
private void calcBasisWaveForms(float[][] wfs)
The wfs argument should be a size 2 array of float arrays (i.e. 2D array) and it must be of length 2 (or more). When returning, wfs[0] will contain the line waveform, and wfs[1] will contain the column waveform.
This method can not be called on an element that ahs a non-negative value in l2Norm, since that means that we are done.
wfs
- An size 2 array where the line and column waveforms
will be returned.private void assignL2Norm(float l2n)
This method can not be called on an element that ahs a non-negative value in l2Norm, since that means that we are done.
l2n
- The L2-norm to assign.private void calcL2Norms()
public WaveletFilter getHorWFilter()
getHorWFilter
in class Subband
public WaveletFilter getVerWFilter()
getVerWFilter
in class Subband
Copyright © 2015 Open Microscopy Environment