backprojection: (Filtered) Back-Projection

Module for (filtered) backprojection on the GPU

class silx.opencl.backprojection.Backprojection(sino_shape, slice_shape=None, axis_position=None, angles=None, filter_name=None, ctx=None, devicetype='all', platformid=None, deviceid=None, profile=False)[source]

Bases: silx.opencl.processing.OpenclProcessing

A class for performing the backprojection using OpenCL

kernel_files = ['backproj.cl', 'array_utils.cl']
compute_angles()[source]
allocate_textures()[source]

Allocate the texture for the sinogram.

compute_fft_plans()[source]

If pyfft is installed, prepare a batched 1D FFT plan for the filtering of FBP

compute_filter()[source]

Compute the filter for FBP

cpy2d_to_slice(dst)[source]
transfer_to_texture(sino)[source]
transfer_device_to_texture(d_sino)[source]
backprojection(sino=None, dst=None)[source]

Perform the backprojection on an input sinogram

Parameters:
  • sino – sinogram. If provided, it returns the plain backprojection.
  • dst – destination (pyopencl.Array). If provided, the result will be written in this array.
Returns:

backprojection of sinogram

filter_projections(sino, rescale=True)[source]

Performs the FBP on a given sinogram.

Parameters:
  • sinogram – sinogram to (filter-)backproject
  • rescale – if True (default), the sinogram is multiplied with (pi/n_projs)
filtered_backprojection(sino)[source]

Compute the filtered backprojection (FBP) on a sinogram.

Parameters:sino – sinogram (numpy.ndarray) in the format (projections, bins)