pytomography.transforms.shared.motion
#
Module Contents#
Classes#
The parent class for all transforms used in reconstruction (obj2obj, im2im, obj2im). Subclasses must implement the |
- class pytomography.transforms.shared.motion.DVFMotionTransform(dvf_forward=None, dvf_backward=None)[source]#
Bases:
pytomography.transforms.Transform
The parent class for all transforms used in reconstruction (obj2obj, im2im, obj2im). Subclasses must implement the
__call__
method.- Parameters:
device (str) – Pytorch device used for computation
dvf_forward (torch.Tensor | None) –
dvf_backward (torch.Tensor | None) –
- _get_old_coordinates()[source]#
Obtain meshgrid of coordinates corresponding to the object
- Returns:
Tensor of coordinates corresponding to input object
- Return type:
torch.Tensor
- _get_new_coordinates(old_coordinates, DVF)[source]#
Obtain the new coordinates of each voxel based on the DVF.
- Parameters:
old_coordinates (torch.Tensor) – Old coordinates of each voxel
DVF (torch.Tensor) – Deformation vector field.
- Returns:
_description_
- Return type:
_type_
- _apply_dvf(DVF, vol_ratio, object_i)[source]#
Applies the deformation vector field to the object
- Parameters:
DVF (torch.Tensor) – Deformation vector field
object_i (torch.Tensor) – Old object.
- Returns:
Deformed object.
- Return type:
torch.Tensor