Transformable

class menpo.transform.base.Transformable[source]

Bases: object

Interface for objects that know how be transformed by the Transform interface.

When apply_inplace is called on an object, the _transform_inplace() method is called, passing in the transforms’ _apply function.

This allows for the object to define how it should transform itself.

_transform_inplace(transform)[source]

Apply the given transform function to self inplace.

Parameters:

transform : function

Function that applies a transformation to the transformable object.

Returns:

transformed : type(self)

The transformed object, having been transformed in place.