MIR.models.registration_utilsΒΆ

Model-level registration utilities (transformers and geometry).

Functions

ensemble_average(fields, field_types[, ...])

Ensemble average of displacement fields or SVFs in the log (velocity) domain.

ensure_svf(field, field_type[, nb_steps, iters])

Return a stationary velocity field, fitting one if the input is a displacement.

fit_warp_to_svf(warp_t[, nb_steps, iters, ...])

Fit a stationary velocity field v so that exp(v) approximates a given displacement field.

fit_warp_to_svf_fast(warp_t[, nb_steps, ...])

Fast approximation to fit_warp_to_svf() using coarse-to-fine fitting.

invert_warp_via_velocity(warp[, nb_steps, iters])

Approximate the inverse of a displacement field by fitting v and integrating -v.

jacobian_determinant(disp)

Compute the determinant of the spatial gradient of a displacement field.

Classes

AffineTransformer(*args, **kwargs)

3-D affine transformer built on affine_grid/grid_sample (align_corners=False).

SpatialTransformer(*args, **kwargs)

N-D spatial transformer that warps an image with a voxel displacement field.

VecInt(*args, **kwargs)

Integrates a stationary velocity field via scaling and squaring.