#include <StationaryWaveletPacketTree.h>
Public Member Functions | |
StationaryWaveletPacketTree (size_t height, const Wavelet *wavelet, PaddingMode padding_mode=PaddingMode::Zeroes) | |
void | Decompose () override |
void | Reconstruct (size_t level) override |
![]() | |
WaveletPacketTreeTemplateBase (size_t height, const Wavelet *wavelet) | |
void | SetRootSignal (const std::vector< double > *signal) override |
const std::vector< double > * | GetRootSignal () override |
size_t | GetWaveletLevelCount () const override |
![]() | |
Tree (size_t height) | |
![]() | |
WaveletPacketTreeBase (const WaveletPacketTreeBase &)=delete | |
WaveletPacketTreeBase (const WaveletPacketTreeBase &&)=delete | |
WaveletPacketTreeBase & | operator= (const WaveletPacketTreeBase &)=delete |
WaveletPacketTreeBase & | operator= (const WaveletPacketTreeBase &&)=delete |
virtual size_t | GetWaveletLevelCount () const =0 |
Protected Member Functions | |
void | DecomposeNode (size_t node) |
void | ReconstructNode (size_t node) |
void | ReconstructAccumulate (size_t leaf_node, std::vector< double > *accumulated_signal) |
![]() | |
size_t | GetLeafCount () const |
size_t | GetFirstLeaf () const |
size_t | GetLastLeaf () const |
bool | IsLeaf (size_t node) const |
size_t | GetChild (size_t parent, size_t child_index) const |
size_t | GetParent (size_t child) const |
WaveletPacketTreeBase::WaveletPacketTreeNodeData & | GetNodeData (size_t index) |
bool | IsMarked (size_t node) const |
void | SetMark (size_t node) |
void | Unmark () |
size_t | GetHeight () const |
Additional Inherited Members | |
![]() | |
const Wavelet * | wavelet_ |
A wavelet packet tree which tries to keep the reconstructed signals stationary in time. This has the effect of producing smoother reconstructed signals compared to a conventional wavelet packet tree decomposition.
This is implemented as a quad tree where the signal of each node is decomposed into four children signals. The four signals produced are the details and approximate coefficients downsampled dyadically in both even and odd dyadic modes.
panwave::StationaryWaveletPacketTree::StationaryWaveletPacketTree | ( | size_t | height, |
const Wavelet * | wavelet, | ||
PaddingMode | padding_mode = PaddingMode::Zeroes |
||
) |
Construct a StationaryWaveletPacketTree instance.
Root signal is initially unset. Set it before calling Decompose.
height | Height of the tree. A tree with only one root node has height of 1. |
wavelet | Wavelet object used during decomposition / reconstruction. |
padding_mode | How we should pad the signal data during decomposition / reconstruction. (default: Zeroes) |
|
overridevirtual |
Perform a wavelet packet tree decomposition.
Starting with the root node, decomposes recursively every node in the tree stopping at the leaf nodes.
This is not a sparse decomposition, all nodes will have decomposed signal data after executing.
Implements panwave::WaveletPacketTreeBase.
|
overridevirtual |
Reconstruct an isolated wavelet level.
Beginning at the leaf nodes, recursively reconstruct up all levels of the tree stopping at the root node.
Upon completion, the root signal will contain the reconstructed signal.
level | The wavelet level we should isolate and reconstruct. |
Implements panwave::WaveletPacketTreeBase.
|
protected |
Isolates one leaf and reconstructs the root signal. The root signal is accumulated into accumulated_signal.
leaf_node | The leaf node we want to isolate. |
accumulated_signal | Vector in which we will add the root signal after isolating the leaf and reconstructing the signal. |