Skip to main content
`Ctrl`+`K`

# `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)

  Bases: `OpenclProcessing`

  A class for performing the backprojection using OpenCL

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

    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)

    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.