Wavelet Toolbox Previous page   Next Page

Example 1: Building a Wavelet Tree Object (WTREE)

This example creates a new class of objects: WTREE.

Starting from the class DTREE and overloading the methods split and merge, we define a wavelet tree class.

To plot a WTREE, the DTREE plot method is used.

You can have a look at a one-dimensional example in the ex1_wt M-file and at a two-dimensional example in the ex2_wt M-file located in the toolbox/wavelet/wavedemo directory. These examples can be used directly, but they are also useful to learn how to build new object-oriented programming functions.

The definition of the new class is described below.

Class WTREE (parent class: DTREE)

Fields

dtree
Parent object
dwtMode
DWT extension mode
wavInfo
Structure (wavelet information)

wavInfo Structure information

wavName
Wavelet Name
Lo_D
Low Decomposition filter
Hi_D
High Decomposition filter
Lo_R
Low Reconstruction filter
Hi_R
High Reconstruction filter

Methods

wtree
Constructor for the class WTREE.
merge
Merge (recompose) the data of a node.
split
Split (decompose) the data of a terminal node.


Previous page  Advanced Use of Objects Example 2: Building a Right Wavelet Tree Object (RWVTREE) Next page

© 1994-2005 The MathWorks, Inc.