spatialTransformInverse edit page

the inverse of a transform that has no closed form one

A polynomial, a spline or a scattered field maps position to position perfectly well but cannot be solved backwards in closed form. Since the displacement is smooth by construction - it was fitted through a smooth basis - the inverse is reached by iterating

q <- p - u(q),   u(q) = eval(T,q) - q

which converges geometrically as long as the displacement gradient is below one, i.e. as long as the field does not fold. A field that does fold has no inverse to find and the iteration is refused rather than returning a wrong answer.

inv of this returns the original transform, so a round trip costs nothing.

Syntax

Tinv = inv(T)                          % how one is normally made
Tinv = spatialTransformInverse(T)
Tinv = spatialTransformInverse(T,'tol',1e-10,'iterMax',100)

Input

T spatialTransform, the forward map

Output

Tinv spatialTransformInverse

Class Properties

T the forward transform
tol convergence tolerance, relative to the coordinate scale
iterMax iteration budget

See also

spatialTransform spatialTransformField spatialTransform