transformation¶
Pairwise Transformation¶
-
class
airlab.transformation.pairwise.
AffineTransformation
(moving_image, opt_cm=False)[source]¶ Affine centred transformation for 2D and 3D.
Parameters: - moving_image (Image) – moving image for the registration
- opt_cm (bool) – using center of as parameter for the optimisation
-
set_parameters
(t, phi, scale, shear, rotation_center=None)[source]¶ Set parameters manually
t (array): 2 or 3 dimensional array specifying the spatial translation phi (array): 1 or 3 dimensional array specifying the rotation angles scale (array): 2 or 3 dimensional array specifying the scale in each dimension shear (array): 2 or 6 dimensional array specifying the shear in each dimension: yx, xy, zx, zy, xz, yz rotation_center (array): 2 or 3 dimensional array specifying the rotation center (default is zeros)
-
class
airlab.transformation.pairwise.
BsplineTransformation
(image_size, sigma, diffeomorphic=False, order=2, dtype=torch.float32, device='cpu')[source]¶
-
class
airlab.transformation.pairwise.
NonParametricTransformation
(image_size, diffeomorphic=False, dtype=torch.float32, device='cpu')[source]¶ None parametric transformation
-
class
airlab.transformation.pairwise.
RigidTransformation
(moving_image, opt_cm=False)[source]¶ Rigid centred transformation for 2D and 3D.
Parameters: - moving_image (Image) – moving image for the registration
- opt_cm (bool) – using center of as parameter for the optimisation
-
init_translation
(fixed_image)[source]¶ Initialize the translation parameters with the difference between the center of mass of the fixed and the moving image
Parameters: fixed_image (Image) – Fixed image for the registration
-
set_parameters
(t, phi, rotation_center=None)[source]¶ Set parameters manually
t (array): 2 or 3 dimensional array specifying the spatial translation phi (array): 1 or 3 dimensional array specifying the rotation angles rotation_center (array): 2 or 3 dimensional array specifying the rotation center (default is zeros)
-
transformation_matrix
¶
-
class
airlab.transformation.pairwise.
SimilarityTransformation
(moving_image, opt_cm=False)[source]¶ Similarity centred transformation for 2D and 3D. :param moving_image: moving image for the registration :type moving_image: Image :param opt_cm: using center of as parameter for the optimisation :type opt_cm: bool
-
set_parameters
(t, phi, scale, rotation_center=None)[source]¶ Set parameters manually
t (array): 2 or 3 dimensional array specifying the spatial translation phi (array): 1 or 3 dimensional array specifying the rotation angles scale (array): 2 or 3 dimensional array specifying the scale in each dimension rotation_center (array): 2 or 3 dimensional array specifying the rotation center (default is zeros)
-
-
class
airlab.transformation.pairwise.
WendlandKernelTransformation
(image_size, sigma, cp_scale=2, diffeomorphic=False, ktype='C4', dtype=torch.float32, device='cpu')[source]¶ Wendland Kernel Transform:
Implements the kernel transform with the Wendland basis
Parameters: - sigma – specifies how many control points are used (each sigma pixels)
- cp_scale – specifies the extent of the kernel. how many control points are in the support of the kernel
Transformation Utils¶
-
class
airlab.transformation.utils.
Diffeomorphic
(image_size=None, scaling=10, dtype=torch.float32, device='cpu')[source]¶ Diffeomorphic transformation. This class computes the matrix exponential of a given flow field using the scaling and squaring algorithm according to:
Unsupervised Learning for Fast Probabilistic Diffeomorphic Registration Adrian V. Dalca, Guha Balakrishnan, John Guttag, Mert R. Sabuncu MICCAI 2018 and Diffeomorphic Demons: Efficient Non-parametric Image Registration Tom Vercauterena et al., 2008
-
airlab.transformation.utils.
rotation_matrix
(phi_x, phi_y, phi_z, dtype=torch.float32, device='cpu', homogene=False)[source]¶