backprojection: (Filtered) Back-Projection

Module for (filtered) backprojection on the GPU

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

Bases: OpenclProcessing

A class for performing the backprojection using OpenCL

kernel_files = ['backproj.cl', 'array_utils.cl']
backprojection(sino, output=None)[source]

Perform the backprojection on an input sinogram

Parameters
  • sino – sinogram.

  • output – optional, output slice. If provided, the result will be written in this array.

Returns

backprojection of sinogram

filtered_backprojection(sino, output=None)[source]

Compute the filtered backprojection (FBP) on a sinogram.

Parameters
  • sino – sinogram (np.ndarray or pyopencl.array.Array) with the shape (n_projections, n_bins)

  • output – output (np.ndarray or pyopencl.array.Array). If nothing is provided, a new numpy array is returned.

filter_projections(sino, rescale=True)[source]