darsia.DeformationCorrection#

class DeformationCorrection(base, config)[source]#

Bases: BaseCorrection

Patch-wise defined deformation correction defined through image registration.

Attributes:
basedarsia.Image

Reference (baseline) image.

Constructor.

Parameters:
basedarsia.Image

Baseline image.

configdict, optional

Contains all tuning parameters.

Methods

correct_array(img)

Main routine for aligning image with baseline image.

correct_metadata([metadata])

Correction routine on metadata level.

load(path)

Load the correction from a file.

save(path)

Save the correction to a file.

correct_array(img)[source]#

Main routine for aligning image with baseline image.

Parameters:
imgnp.ndarray

Input image, to be aligned.

Returns:
np.ndarray

Aligned image array.