#include <quadTree.h>
Classes | |
class | Node |
Class used for tree nodes in the quad-tree structure. More... | |
struct | NodeExtremes |
Struct for computing (acts as a functor) and storing max. and min. More... | |
Public Member Functions | |
ISquareRanges interface | |
void | encode (const PlaneBlock &toEncode) |
Starts encoding, calls modules in the passed structure. | |
const RangeList & | getRangeList () const |
Returns a reference to the current range-block list. | |
void | writeSettings (std::ostream &) |
Write all settings needed for reconstruction. | |
void | readSettings (std::istream &) |
Read all settings needed for reconstruction. | |
void | writeData (std::ostream &file) |
Writes data needed for reconstruction (except for settings). | |
void | readData_buildRanges (std::istream &file, const PlaneBlock &block) |
Reads data from a stream and reconstructs the positions of range blocks. | |
Protected Types | |
enum | Settings |
Indices for settings. | |
Protected Member Functions | |
MQuadTree () | |
Only zeroes root. | |
~MQuadTree () | |
Only deletes root. | |
Protected Attributes | |
Node * | root |
Quad-tree's root node. | |
std::vector< RangeNode * > | fringe |
List of quad-tree's leaves. | |
int | zoom |
The zoom. |
It can use heuristic dividing, minimum and maximum block level can be specified.
Definition at line 13 of file quadTree.h.
void MQuadTree::encode | ( | const PlaneBlock & | toEncode | ) | [virtual] |
Starts encoding, calls modules in the passed structure.
It should update UpdateInfo continually by the count of encoded pixels.
std::exception | when cancelled via UpdateInfo or on other errors |
Implements ISquareRanges.
Definition at line 23 of file quadTree.cpp.
References MQuadTree::MQuadTree::Node::encode(), fringe, MQuadTree::MQuadTree::Node::getHilbertList(), root, and zoom.
void MQuadTree::readData_buildRanges | ( | std::istream & | file, | |
const PlaneBlock & | block | |||
) | [virtual] |
Reads data from a stream and reconstructs the positions of range blocks.
file | the stream to read from | |
block | contains the properties of the block to be reconstructed |
Implements ISquareRanges.
Definition at line 49 of file quadTree.cpp.
References fringe, MQuadTree::MQuadTree::Node::fromFile(), MQuadTree::MQuadTree::Node::getHilbertList(), root, and zoom.