Transformations#

The transformations that can be defined between elements and coordinate systems in SpatialData.

class spatialdata.transformations.BaseTransformation#

Bases: ABC

Base class for all transformations.

static validate_axes(axes)#

Validate the axes.

This function is to allow to call validate_axes() from this file in multiple places while avoiding circular imports.

Return type:

None

class spatialdata.transformations.Identity#

Bases: BaseTransformation

static validate_axes(axes)#

Validate the axes.

This function is to allow to call validate_axes() from this file in multiple places while avoiding circular imports.

Return type:

None

class spatialdata.transformations.MapAxis(map_axis)#

Bases: BaseTransformation

Transformation that maps input axes to output axes.

Parameters:

map_axis (dict[str, str]) – Dictionary with keys being the input axes and values the output axes.

static validate_axes(axes)#

Validate the axes.

This function is to allow to call validate_axes() from this file in multiple places while avoiding circular imports.

Return type:

None

class spatialdata.transformations.Translation(translation, axes)#

Bases: BaseTransformation

static validate_axes(axes)#

Validate the axes.

This function is to allow to call validate_axes() from this file in multiple places while avoiding circular imports.

Return type:

None

class spatialdata.transformations.Scale(scale, axes)#

Bases: BaseTransformation

static validate_axes(axes)#

Validate the axes.

This function is to allow to call validate_axes() from this file in multiple places while avoiding circular imports.

Return type:

None

class spatialdata.transformations.Affine(matrix, input_axes, output_axes)#

Bases: BaseTransformation

static validate_axes(axes)#

Validate the axes.

This function is to allow to call validate_axes() from this file in multiple places while avoiding circular imports.

Return type:

None

class spatialdata.transformations.Sequence(transformations)#

Bases: BaseTransformation

static validate_axes(axes)#

Validate the axes.

This function is to allow to call validate_axes() from this file in multiple places while avoiding circular imports.

Return type:

None