mantidimaging.core.reconstruct.astra_recon module

class mantidimaging.core.reconstruct.astra_recon.AstraRecon[source]

Bases: mantidimaging.core.reconstruct.base_recon.BaseRecon

static allowed_filters() List[str][source]
static find_cor(images: mantidimaging.core.data.imagestack.ImageStack, slice_idx: int, start_cor: float, recon_params: mantidimaging.core.utility.data_containers.ReconstructionParameters) float[source]

Find the best CoR for this slice by maximising the squared sum of the reconstructed slice.

Larger squared sum -> bigger deviance from the mean, i.e. larger distance between noise and data

static full(images: mantidimaging.core.data.imagestack.ImageStack, cors: List[mantidimaging.core.utility.data_containers.ScalarCoR], recon_params: mantidimaging.core.utility.data_containers.ReconstructionParameters, progress: Optional[mantidimaging.core.utility.progress_reporting.progress.Progress] = None) mantidimaging.core.data.imagestack.ImageStack[source]

Performs a volume reconstruction using sample data provided as sinograms.

Parameters
  • images – Array of sinogram images

  • cors – Array of centre of rotation values

  • proj_angles – Array of projection angles

  • recon_params – Reconstruction Parameters

  • progress – Optional progress reporter

Returns

3D image data for reconstructed volume

static single_sino(sino: numpy.ndarray, cor: mantidimaging.core.utility.data_containers.ScalarCoR, proj_angles: mantidimaging.core.utility.data_containers.ProjectionAngles, recon_params: mantidimaging.core.utility.data_containers.ReconstructionParameters, progress: Optional[mantidimaging.core.utility.progress_reporting.progress.Progress] = None) numpy.ndarray[source]

Reconstruct a single sinogram

Parameters
  • sino – The 2D sinogram as a numpy array

  • cor – Center of rotation for parallel geometry. It will be converted to vector geometry before reconstructing

  • proj_angles – Projection angles

  • recon_params – Reconstruction parameters to configure which algorithm/filter/etc is used

Returns

2D image data for reconstructed slice

mantidimaging.core.reconstruct.astra_recon.allowed_recon_kwargs() dict[source]
mantidimaging.core.reconstruct.astra_recon.rotation_matrix2d(theta: float)[source]
mantidimaging.core.reconstruct.astra_recon.vec_geom_init2d(angles_rad: mantidimaging.core.utility.data_containers.ProjectionAngles, detector_spacing_x: float, center_rot_offset: float)[source]