Package jj2000.j2k.wavelet.synthesis
Class SubbandSyn
- java.lang.Object
-
- jj2000.j2k.wavelet.Subband
-
- jj2000.j2k.wavelet.synthesis.SubbandSyn
-
public class SubbandSyn extends Subband
This class represents a subband in a tree structure that describes the subband decomposition for a wavelet transform, specifically for the syhthesis side.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.
-
-
Field Summary
Fields Modifier and Type Field Description SynWTFilter
hFilter
The horizontal analysis filter used to recompose this subband, from its childs.int
magbits
The number of magnitude bitsSubbandSyn
parent
The reference to the parent of this subband.SubbandSyn
subb_HH
The reference to the HH subband resulting from the decomposition of this subband.SubbandSyn
subb_HL
The reference to the HL subband (horizontal high-pass) resulting from the decomposition of this subband.SubbandSyn
subb_LH
The reference to the LH subband (vertical high-pass) resulting from the decomposition of this subband.SubbandSyn
subb_LL
The reference to the LL subband resulting from the decomposition of this subband.SynWTFilter
vFilter
The vertical analysis filter used to decompose this subband, from its childs.-
Fields inherited from class jj2000.j2k.wavelet.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 Summary
Constructors Constructor Description SubbandSyn()
Creates a SubbandSyn element with all the default values.SubbandSyn(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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 subbandSubband
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 subbandprotected Subband
split(WaveletFilter hfilter, WaveletFilter vfilter)
Splits the current subband in its four subbands.-
Methods inherited from class jj2000.j2k.wavelet.Subband
getNextResLevel, getSubband, getSubbandByIdx, initChilds, nextSubband, toString
-
-
-
-
Field Detail
-
parent
public SubbandSyn parent
The reference to the parent of this subband. It is null for the root element. It is null by default.
-
subb_LL
public SubbandSyn subb_LL
The reference to the LL subband resulting from the decomposition of this subband. It is null by default.
-
subb_HL
public SubbandSyn subb_HL
The reference to the HL subband (horizontal high-pass) resulting from the decomposition of this subband. It is null by default.
-
subb_LH
public SubbandSyn subb_LH
The reference to the LH subband (vertical high-pass) resulting from the decomposition of this subband. It is null by default.
-
subb_HH
public SubbandSyn subb_HH
The reference to the HH subband resulting from the decomposition of this subband. It is null by default.
-
hFilter
public SynWTFilter hFilter
The horizontal analysis filter used to recompose this subband, from its childs. This is applicable to "node" elements only. The default value is null.
-
vFilter
public SynWTFilter vFilter
The vertical analysis filter used to decompose this subband, from its childs. This is applicable to "node" elements only. The default value is null.
-
magbits
public int magbits
The number of magnitude bits
-
-
Constructor Detail
-
SubbandSyn
public SubbandSyn()
Creates a SubbandSyn element with all the default values. The dimensions are (0,0) and the upper left corner is (0,0).
-
SubbandSyn
public SubbandSyn(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.This constructor just calls the same constructor of the super class.
- Parameters:
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 synthesis filters for each resolution level, starting at resolution level 0.vfilters
- The vertical wavelet synthesis filters for each resolution level, starting at resolution level 0.- See Also:
Subband(int,int,int,int,int, WaveletFilter[],WaveletFilter[])
-
-
Method Detail
-
getParent
public Subband getParent()
Returns the parent of this subband. The parent of a subband is the subband from which this one was obtained by decomposition. The root element has no parent subband (null).
-
getLL
public Subband getLL()
Returns the LL child subband of this subband.
-
getHL
public Subband getHL()
Returns the HL (horizontal high-pass) child subband of this subband.
-
getLH
public Subband getLH()
Returns the LH (vertical high-pass) child subband of this subband.
-
getHH
public Subband getHH()
Returns the HH child subband of this subband.
-
split
protected Subband split(WaveletFilter hfilter, WaveletFilter vfilter)
Splits the current subband in its four subbands. It changes the status of this element (from a leaf to a node, and sets the filters), creates the childs and initializes them. An IllegalArgumentException is thrown if this subband is not a leaf.It uses the initChilds() method to initialize the childs.
- Specified by:
split
in classSubband
- Parameters:
hfilter
- The horizontal wavelet filter used to decompose this subband. It has to be a SynWTFilter object.vfilter
- The vertical wavelet filter used to decompose this subband. It has to be a SynWTFilter object.- Returns:
- A reference to the LL leaf (subb_LL).
- See Also:
Subband.initChilds()
-
getHorWFilter
public WaveletFilter getHorWFilter()
This function returns the horizontal wavelet filter relevant to this subband- Specified by:
getHorWFilter
in classSubband
- Returns:
- The horizontal wavelet filter
-
getVerWFilter
public WaveletFilter getVerWFilter()
This function returns the vertical wavelet filter relevant to this subband- Specified by:
getVerWFilter
in classSubband
- Returns:
- The vertical wavelet filter
-
-