scico.linop.xray.astra¶
X-ray transform LinearOperators wrapping the ASTRA toolbox.
X-ray transform LinearOperator
wrapping the parallel beam
projections in the
ASTRA toolbox.
This package provides both C and CUDA implementations of core
functionality, but note that use of the CUDA/GPU implementation is
expected to result in GPU-host-GPU memory copies when transferring
JAX arrays. Other JAX features such as automatic differentiation are
not available.
Functions
|
Convert det_spacing and angles to vector geometry specification. |
|
Set the index/indices of GPU(s) to be used by astra. |
Classes
|
2D parallel beam X-ray transform based on the ASTRA toolbox. |
|
3D parallel beam X-ray transform based on the ASTRA toolbox. |
- scico.linop.xray.astra.set_astra_gpu_index(idx)[source]¶
Set the index/indices of GPU(s) to be used by astra.
- class scico.linop.xray.astra.XRayTransform2D(input_shape, det_count, det_spacing, angles, volume_geometry=None, device='auto')[source]¶
Bases:
LinearOperator
2D parallel beam X-ray transform based on the ASTRA toolbox.
Perform tomographic projection (also called X-ray projection) of an image at specified angles, using the ASTRA toolbox.
- Parameters:
det_spacing (
float
) – Spacing between detector elements. See the astra documentation for more information..det_count (
int
) – Number of detector elements. See the astra documentation for more information.angles (
ndarray
) – Array of projection angles in radians.volume_geometry (
Optional
[List
[float
]]) – Specification of the shape of the discretized reconstruction volume. Must eitherNone
, in which case it is inferred from input_shape, or follow the syntax described in the astra documentation.device (
str
) – Specifies device for projection operation. One of [“auto”, “gpu”, “cpu”]. If “auto”, a GPU is used if available, otherwise, the CPU is used.
- fbp(sino, filter_type='Ram-Lak')[source]¶
Filtered back projection (FBP) reconstruction.
Perform tomographic reconstruction using the filtered back projection (FBP) algorithm.
- Parameters:
sino (
Array
) – Sinogram to reconstruct.filter_type (
str
) – Select the filter to use. For a list of options see cfg.FilterType in the ASTRA documentation.
- Return type:
- class scico.linop.xray.astra.XRayTransform3D(input_shape, det_count, det_spacing=None, angles=None, vectors=None)[source]¶
Bases:
LinearOperator
3D parallel beam X-ray transform based on the ASTRA toolbox.
Perform tomographic projection (also called X-ray projection) of a volume at specified angles, using the ASTRA toolbox.
This class supports both “parallel3d” and “parallel3d_vec” astra projection geometries. Keyword arguments det_spacing and angles should be specified to use the former, and keyword argument vectors should be specified to use the latter. These options are mutually exclusive.
- Parameters:
det_count (
Tuple
[int
,int
]) – Number of detector elements. See the astra documentation for more information.det_spacing (
Optional
[Tuple
[float
,float
]]) – Spacing between detector elements. See the astra documentation for more information.angles (
Optional
[ndarray
]) – Array of projection angles in radians.vectors (
Optional
[ndarray
]) – Array of geometry specification vectors.