quadtree_image.ImageMeasure Class Reference

A Measure class that works on a RGB image. More...

Inheritance diagram for quadtree_image.ImageMeasure:

quadtree.AbstractMeasure

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.
def outline_color
 Returns a colour that is used to draw the edges of a quadtree.


Detailed Description

A Measure class that works on a RGB image.

Definition at line 99 of file quadtree_image.py.


Member Function Documentation

def quadtree_image.ImageMeasure.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 from quadtree.AbstractMeasure.

Definition at line 120 of file quadtree_image.py.

def quadtree_image.ImageMeasure.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 from quadtree.AbstractMeasure.

Definition at line 140 of file quadtree_image.py.

def quadtree_image.ImageMeasure.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 from quadtree.AbstractMeasure.

Definition at line 153 of file quadtree_image.py.

def quadtree_image.ImageMeasure.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 from quadtree.AbstractMeasure.

Definition at line 100 of file quadtree_image.py.

def quadtree_image.ImageMeasure.outline_color (   self  ) 

Returns a colour that is used to draw the edges of a quadtree.

Definition at line 166 of file quadtree_image.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