Package topo :: Package coordmapper :: Module basic :: Class AffineTransform
[hide private]
[frames] | no frames]

Class AffineTransform

source code


Remaps the input with an affine transform.

This mapper allows the specification of an arbitrary combination of translation, rotation and scaling via a transform matrix. Single translations, etc, can be specified more simply with the subclasses Translate2d, Rotate2d, and Scale2d.

Nested Classes [hide private]

Inherited from param.parameterized.Parameterized: __metaclass__

Instance Methods [hide private]
 
__init__(self, **kw)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__call__(self, x, y)
Apply the coordinate mapping function; must be implemented by subclasses.
source code

Inherited from param.parameterized.Parameterized: __getstate__, __repr__, __setstate__, __str__, debug, defaults, force_new_dynamic_value, get_param_values, get_value_generator, inspect_value, message, print_param_values, script_repr, set_default, set_dynamic_time_fn, set_param, state_pop, state_push, verbose, warning

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Methods [hide private]

Inherited from param.parameterized.Parameterized: params, print_param_defaults

Class Variables [hide private]
  matrix = param.Parameter(default= ones((3, 3)), doc= ...
The affine transformation matrix.
  name = <param.parameterized.String object at 0xb287bec>
String identifier for this object.

Inherited from param.parameterized.Parameterized: print_level

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, **kw)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

__call__(self, x, y)
(Call operator)

source code 
Apply the coordinate mapping function; must be implemented by subclasses.
Overrides: base.functionfamily.CoordinateMapperFn.__call__
(inherited documentation)

Class Variable Details [hide private]

matrix

The affine transformation matrix. The functions Translate2dMat, Rotate2dMat, and Scale2dMat generate affine transform matrices that can be multiplied together to create combination transforms. E.g. the matrix:

Translate2dMat(3,0)*Rotate2d(pi/2)

will shift points to the right by 3 units and rotate them around the origin by 90 degrees.

Value:
param.Parameter(default= ones((3, 3)), doc= """
       The affine transformation matrix.  The functions
       Translate2dMat, Rotate2dMat, and Scale2dMat generate affine
       transform matrices that can be multiplied together to create
       combination transforms.  E.g. the matrix::

         Translate2dMat(3,0)*Rotate2d(pi/2)

...