darsia.MultiscaleDiffeomorphicImageRegistration#
- class MultiscaleDiffeomorphicImageRegistration(img_dst, config, mask_dst=None, total_config=None, **kwargs)[source]#
Bases:
objectMultiscale diffeomorphic image registration, for larger deformations.
Set up the multiscale registration.
- Parameters:
- img_dst
darsia.Image Reference image, held fixed in the analysis (the destination).
- config
dictorlistofdict Hierarchy of per-level configuration dictionaries.
- mask_dst
numpy.ndarray,optional Active mask.
- total_config
dict,optional Parameters for the final, overall registration.
- img_dst
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:
- img
np.ndarrayordarsia.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.
- img
- Returns:
np.ndarray,optionalTransformed 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:
- scaling
float Scaling parameter to controll the length of the arrows.
- mask
np.ndarray Active mask.
- scaling