MQuadTree Class Reference
[Module implementations]

Module dividing range blocks with a quad-tree. More...

#include <quadTree.h>

Inheritance diagram for MQuadTree:

Inheritance graph
[legend]
Collaboration diagram for MQuadTree:

Collaboration graph
[legend]

List of all members.

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 RangeListgetRangeList () 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

Noderoot
 Quad-tree's root node.
std::vector< RangeNode * > fringe
 List of quad-tree's leaves.
int zoom
 The zoom.


Detailed Description

Module dividing range blocks with a quad-tree.

It can use heuristic dividing, minimum and maximum block level can be specified.

Definition at line 13 of file quadTree.h.


Member Function Documentation

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.

Exceptions:
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.

Here is the call graph for this function:

void MQuadTree::readData_buildRanges ( std::istream &  file,
const PlaneBlock &  block 
) [virtual]

Reads data from a stream and reconstructs the positions of range blocks.

Parameters:
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.

Here is the call graph for this function:


The documentation for this class was generated from the following files:

Generated on Thu Aug 6 22:33:15 2009 for Fractal Image Compressor by  doxygen 1.5.8