XrayTransform#
- class deepinv.physics.functional.XrayTransform(projection_geometry, object_geometry, is_2d=False)[source]#
Bases:
object
X-ray Transform operator with
astra-toolbox
backend.Uses the astra-toolbox to implement a ray-driven forward projector and a pixel-driven backprojector (
XrayTransform.T
). This class leverages the GPULink functionality ofastra
to share the underlying CUDA memory between torch Tensors and CUDA-based arrays use inastra
. The functionality is only implemented for 3D arrays, thus the underlying transforms are all 3D operators. For 2D transforms, the object is set to a flat volume with only 1 voxel depth.Note
This transform does not handle batched and multi-channel inputs. It is handled by a custom
torch.autograd.Function
that wraps theXrayTransform
. To handle standard PyTorch pipelines,XrayTransform
is instanciated inside adeepinv.physics.TomographyWithAstra
operator.- Parameters:
projection_geometry (dict[str, Any]) – Dictionnary containing the parameters of the projection geometry. It is passed to the
astra.create_projector()
function to instanciate the projector.object_geometry (dict[str, Any]) – Dictionnary containing the parameters of the object geometry. It is passed to the
astra.create_projector()
function to instanciate the projector.is_2d (bool) – Specifies if the geometry is flat (2D) or describe a real 3D reconstruction setup.
- property T#
Implements and returns the adjoint of the transform operator.