darsia.TranslationCorrection#
- class TranslationCorrection(translation=None)[source]#
Bases:
BaseCorrectionTranslation correction based on user-input global translation.
Translation is provided as array or path to numpy array.
Contructor.
- Parameters:
- translation
strorPath Path to predefined translation.
- translation
Methods
correct_array(img)Main routine.
correct_metadata([metadata])Correction routine on metadata level.
load(path)save(path)Attributes
Translation map/array.
Flag controlling whether the correction is active.
- correct_array(img)[source]#
Main routine. Perform translation.
- Parameters:
- img
np.ndarray Image to be corrected.
- img
- Returns:
arrayCorrected image.
- active#
Flag controlling whether the correction is active.
- translation#
Translation map/array.