A general purpose (compression) Quadtree class. More...
Classes | |
class | Node |
Represents a node of this Quadtree. More... | |
Public Member Functions | |
def | __init__ |
Constructs a new Quadtree from a grid. | |
def | __getitem__ |
Alows access to the tree's pixel data using the notation tree[x, y]. | |
def | count |
Count the nodes in this tree. | |
Public Attributes | |
measure | |
threshold | |
root | |
dims | |
height |
A general purpose (compression) Quadtree class.
Definition at line 29 of file quadtree.py.
def quadtree.Quadtree.__getitem__ | ( | self, | ||
p | ||||
) |
Alows access to the tree's pixel data using the notation tree[x, y].
Definition at line 467 of file quadtree.py.
def quadtree.Quadtree.__init__ | ( | self, | ||
grid, | ||||
measure, | ||||
threshold | ||||
) |
Constructs a new Quadtree from a grid.
Measure is a class that implements two methods, as in the example below. Threshold is a value between 0 and 1; a node is not split when the detail of that tree section is less than the threshold.
Definition at line 459 of file quadtree.py.
def quadtree.Quadtree.count | ( | self, | ||
count_self | ||||
) |
Count the nodes in this tree.
If count_self is False, only leaf nodes are counted.
Definition at line 472 of file quadtree.py.
Reimplemented from enhanced_grid.Container.
Definition at line 463 of file quadtree.py.
Reimplemented from enhanced_grid.Container2D.
Definition at line 464 of file quadtree.py.
Definition at line 460 of file quadtree.py.
Definition at line 462 of file quadtree.py.
Definition at line 461 of file quadtree.py.