Radon#
- class deepinv.physics.functional.Radon(in_size=None, theta=None, circle=False, parallel_computation=True, fan_beam=False, fan_parameters=None, dtype=torch.float, device=torch.device('cpu'))[source]#
Bases:
Module
Sparse Radon transform operator.
- Parameters:
in_size (int) – the size of the input image. If None, the size is inferred from the input image.
theta (torch.Tensor) – the angles at which the Radon transform is computed. Default is
torch.arange(180)
.circle (bool) – if
True
, the input image is assumed to be a circle. Default isFalse
.parallel_computation (bool) – if
True
, all projections are performed in parallel. Requires more memory but is faster on GPUs.fan_beam (bool) – If
True
, use fan beam geometry, ifFalse
use parallel beamfan_parameters (dict) –
Only used if fan_beam is
True
. Contains the parameters defining the scanning geometry. The dict should contain the keys:”pixel_spacing” defining the distance between two pixels in the image, default: 0.5 / (in_size)
”source_radius” distance between the x-ray source and the rotation axis (middle of the image), default: 57.5
”detector_radius” distance between the x-ray detector and the rotation axis (middle of the image), default: 57.5
”n_detector_pixels” number of pixels of the detector, default: 258
”detector_spacing” distance between two pixels on the detector, default: 0.077
The default values are adapted from the geometry in https://doi.org/10.5281/zenodo.8307932, where pixel spacing, source and detector radius and detector spacing are given in cm. Note that a to small value of n_detector_pixels*detector_spacing can lead to severe circular artifacts in any reconstruction.
dtype (torch.dtype) – the data type of the output. Default is torch.float.
device (str, torch.device) – the device of the output. Default is torch.device(‘cpu’).
- forward(x)[source]#
- Parameters:
x (torch.Tensor) – the input image.