mantidimaging.core.reconstruct.astra_recon module#

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

Bases: BaseRecon

static allowed_filters() list[str][source]#
static find_cor(images: ImageStack, slice_idx: int, start_cor: float | ndarray, recon_params: 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: ImageStack, cors: list[ScalarCoR], recon_params: ReconstructionParameters, progress: Progress | None = None) 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: ndarray, cor: ScalarCoR, proj_angles: ProjectionAngles, recon_params: ReconstructionParameters, progress: Progress | None = None) 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) ndarray[source]#
mantidimaging.core.reconstruct.astra_recon.vec_geom_init2d(angles_rad: ProjectionAngles, detector_spacing_x: float, center_rot_offset: float) ndarray[source]#