darsia.MultiscaleDiffeomorphicImageRegistration#

class MultiscaleDiffeomorphicImageRegistration(img_dst, config, mask_dst=None, total_config=None, **kwargs)[source]#

Bases: object

Multiscale diffeomorphic image registration, for larger deformations.

Set up the multiscale registration.

Parameters:
img_dstdarsia.Image

Reference image, held fixed in the analysis (the destination).

configdict or list of dict

Hierarchy of per-level configuration dictionaries.

mask_dstnumpy.ndarray, optional

Active mask.

total_configdict, optional

Parameters for the final, overall registration.

Methods

apply(img[, reverse])

Apply computed transformation onto arbitrary image.

evaluate(coords[, reverse, units])

See evaluate in DiffeomorphicImageRegistration.

plot(scaling[, mask])

Plot the dislacement stored in the current image registration.

apply(img, reverse=False)[source]#

Apply computed transformation onto arbitrary image.

Parameters:
imgnp.ndarray or darsia.Image

Image.

reversebool

Flag whether the translation is understood as from the test image to the baseline image, or reversed. The default is the latter.

Returns:
np.ndarray, optional

Transformed image, if input is array; no output otherwise.

evaluate(coords, reverse=False, units='metric')[source]#

See evaluate in DiffeomorphicImageRegistration.

plot(scaling, mask=None)[source]#

Plot the dislacement stored in the current image registration.

Parameters:
scalingfloat

Scaling parameter to controll the length of the arrows.

masknp.ndarray

Active mask.