nabu.reconstruction.projection module

class nabu.reconstruction.projection.Projector(slice_shape, angles, rot_center=None, detector_width=None, normalize=False, extra_options=None, cuda_options=None)[source]

Bases: object

A class for performing a tomographic projection (Radon Transform) using Cuda.

Initialize a Cuda tomography forward projector.

Parameters:
  • slice_shape (tuple) – Shape of the slice: (num_rows, num_columns).

  • angles (int or sequence) – Either an integer number of angles, or a list of custom angles values in radian.

  • rot_center (param) – Rotation axis position. Default is (shape[1]-1)/2.0.

  • detector_width (int, optional) – Detector width in pixels. If detector_width > slice_shape[1], the projection data will be surrounded with zeros. Using detector_width < slice_shape[1] might result in a local tomography setup.

  • normalize (bool, optional) – Whether to normalize projection. If set to True, sinograms are multiplied by the factor pi/(2*nprojs).

  • extra_options (dict, optional) –

    Current allowed options:

    offset_x, axis_corrections

  • cuda_options (dict, optional) – Cuda options passed to the CudaProcessing class.

set_image(image, check=True)[source]
projection(image, output=None, do_checks=True)[source]

Perform the projection of an image.

Parameters:
  • image (array) – Image to forward project

  • output (array, optional) – Output image