quadtree.AbstractMeasure Class Reference

This class shows which methods a Measure class must implement if it is to be used for a Quadtree. More...

Inheritance diagram for quadtree.AbstractMeasure:

quadtree.Measure quadtree_image.ChannelMeasure quadtree_image.ImageMeasure

List of all members.

Public Member Functions

def detail
 Measures the detail of the region of the grid between the points corner and corner+dims.
def aproximate
 Aproximates the region of the grid between corner and corner+dims.
def blend
 Blends two node values.
def blend3
 Blends three node values.


Detailed Description

This class shows which methods a Measure class must implement if it is to be used for a Quadtree.

Definition at line 477 of file quadtree.py.


Member Function Documentation

def quadtree.AbstractMeasure.aproximate (   self,
  grid,
  corner,
  dims 
)

Aproximates the region of the grid between corner and corner+dims.

The return type must be the same as the data content type of the tree's node in which this AbstractMeasure is used.

Reimplemented in quadtree.Measure, quadtree_image.ChannelMeasure, and quadtree_image.ImageMeasure.

Definition at line 490 of file quadtree.py.

def quadtree.AbstractMeasure.blend (   self,
  col1,
  col2,
  ratio 
)

Blends two node values.

Ratio is a value between 0 and 1. If it is 0, the second value is returned. If it is 1, the first value is returned.

Reimplemented in quadtree.Measure, quadtree_image.ChannelMeasure, and quadtree_image.ImageMeasure.

Definition at line 496 of file quadtree.py.

def quadtree.AbstractMeasure.blend3 (   self,
  col1,
  col2,
  col3,
  ratio1,
  ratio2,
  ratio3 
)

Blends three node values.

The three ratios must add up to 1. If the three ratios are 0 1 0, the result is the same as the second value.

Reimplemented in quadtree.Measure, quadtree_image.ChannelMeasure, and quadtree_image.ImageMeasure.

Definition at line 502 of file quadtree.py.

def quadtree.AbstractMeasure.detail (   self,
  grid,
  corner,
  dims,
  bias 
)

Measures the detail of the region of the grid between the points corner and corner+dims.

Returns a value between 0 and 1. (0 is no detail, 1 is full detail). The bias can be ignored - it is the ratio of cells to the entire grid represented by the piece of node.

Todo:
Remove bias: can be calculated from grid.dims and dims!

Reimplemented in quadtree.Measure, quadtree_image.ChannelMeasure, and quadtree_image.ImageMeasure.

Definition at line 484 of file quadtree.py.


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

Generated on Sun May 24 21:48:22 2009 by  doxygen 1.5.8