labs.datasets.transforms.affine_transform

Module: labs.datasets.transforms.affine_transform

Inheritance diagram for nipy.labs.datasets.transforms.affine_transform:

digraph inheritance9f44365024 { rankdir=LR; size="8.0, 12.0"; "transforms.affine_transform.AffineTransform" [URL="#nipy.labs.datasets.transforms.affine_transform.AffineTransform",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="A transformation from an input 3D space to an output 3D space defined"]; "transforms.transform.Transform" -> "transforms.affine_transform.AffineTransform" [arrowsize=0.5,style="setlinewidth(0.5)"]; "transforms.transform.Transform" [URL="nipy.labs.datasets.transforms.transform.html#nipy.labs.datasets.transforms.transform.Transform",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="A transform is a representation of a transformation from one 3D space to"]; }

The AffineTransform class

AffineTransform

class nipy.labs.datasets.transforms.affine_transform.AffineTransform(input_space, output_space, affine)[source]

Bases: nipy.labs.datasets.transforms.transform.Transform

A transformation from an input 3D space to an output 3D space defined by an affine matrix.

It is defined by the affine matrix , and the name of the input and output spaces.

__init__(input_space, output_space, affine)[source]

Create a new affine transform object.

Parameters

input_space: string

Name of the input space

output_space: string

Name of the output space

affine: 4x4 ndarray

Affine matrix giving the coordinate mapping between the input and output space.

affine = None
input_space = ''
output_space = ''
composed_with(transform)[source]

Returns a new transform obtained by composing this transform with the one provided.

Parameters

transform: nipy.core.transforms.transform object

The transform to compose with.

get_inverse()[source]

Return the inverse transform.

inverse_mapping(x, y, z)[source]

Transform the given coordinate from output space to input space.

Parameters

x: number or ndarray

The x coordinates

y: number or ndarray

The y coordinates

z: number or ndarray

The z coordinates

mapping(x, y, z)[source]

Transform the given coordinate from input space to output space.

Parameters

x: number or ndarray

The x coordinates

y: number or ndarray

The y coordinates

z: number or ndarray

The z coordinates