|
Wavelet and Image class library
1.3.2
|
#include <PyramidTree.hh>


Public Member Functions | |
| PyramidTree (PyramidTransform &t, int y, int x, int position=-1, PyramidTree *parent=NULL, int generations=1) | |
| ~PyramidTree (void) | |
| void | addGenerations (int depth) |
| void | moveTo (int y, int x, int position=-1, PyramidTree *parent=NULL) |
| int | depth (void) |
Protected Member Functions | |
| void | findChildPosition (int y, int x, int &resY, int &resX) |
| void | shiftBy (int shiftY, int shiftX) |
Private Attributes | |
| PyramidTransform * | m_transform |
A class for pyramid trees. Rather relaxed attitude towards position checking; crashes are avoided but errors not always flagged! Each node can have exactly 4 children. Child #0 is the upper left, the children are stored linewise from there.
Definition at line 26 of file PyramidTree.hh.
| PyramidTree::PyramidTree | ( | PyramidTransform & | t, |
| int | y, | ||
| int | x, | ||
| int | position = -1, |
||
| PyramidTree * | parent = NULL, |
||
| int | generations = 1 |
||
| ) |
Constructor, creates a tree from a transformed image at a given position and over a depth of a given number of generations
| t | the transform |
| y | the row in the image |
| x | the col in the image |
| position | the position in the parent node if applicable |
| parent | a pointer to the parent node or NULL if root |
| generations | the number of generations (including this node) |
| invalid_argument | if the transform levels are insufficient or the start position in the image's LL |
| PyramidTree::~PyramidTree | ( | void | ) |
Destructor, does nothing (destruction done by parent class)
| void PyramidTree::addGenerations | ( | int | depth | ) |
Create/replace a number of generations to this node according to position and subband.
| invalid_argument | if the subband depth is insufficient |
| depth | the depth to recurse into (not counting this node) |
| int PyramidTree::depth | ( | void | ) |
Return the current depth including this node
| void PyramidTree::findChildPosition | ( | int | y, |
| int | x, | ||
| int & | resY, | ||
| int & | resX | ||
| ) | [protected] |
Find the upper left of the position for a new child
| y | the row in the image |
| x | the col in the image |
| resY | the returned row |
| resX | the returned col |
| invalid_argument | if (y,x) is in subband 1 or in LL |
| void PyramidTree::moveTo | ( | int | y, |
| int | x, | ||
| int | position = -1, |
||
| PyramidTree * | parent = NULL |
||
| ) |
"Move" the tree to a different position in the image by replacing the positions stored in the leaves.
| y | the new row |
| x | the new column |
| position | the new position in the parent node (or -1 if no change) |
| parent | the new parent node (or NULL if no change) |
| void PyramidTree::shiftBy | ( | int | shiftY, |
| int | shiftX | ||
| ) | [protected] |
Shift the stored positions in the node and all children by a given amount.
| shiftY | the number of rows by which to shift |
| shiftX | the number of columns by which to shift |
PyramidTransform* PyramidTree::m_transform [private] |
The transform (contains a reference to the image)
Definition at line 76 of file PyramidTree.hh.
1.7.6.1