darsia.RotationCorrection#

class RotationCorrection(anchor, **kwargs)[source]#

Bases: BaseCorrection

Rotation correction.

Rotations are defined as combination of multiple basic rotations. In 2d, a single basic rotation is sufficient. In 3d, although three are available, two are sufficient.

Attributes:
dimint

Ambient dimension.

anchorarray or list

Voxel coordinates of anchor.

rotationarray

Rotation matrix.

rotation_invarray

Inverted rotation matrix.

Methods

correct_array(img)

Main routine: Application of inherent rotation to provided image.

correct_metadata([metadata])

Correction routine on metadata level.

load(path)

save(path)

correct_array(img)[source]#

Main routine: Application of inherent rotation to provided image.

Parameters:
imgarray

Image.

Returns:
array

Rotated image.