tomostream.solver

Functions:

tomostream.solver

class tomostream.solver.Solver(ntheta, n, nz, center, idx, idy, idz, rotx, roty, rotz, fbpfilter, dezinger, data_type)[source]

Bases: object

Class for tomography reconstruction of ortho-slices through direct discreatization of circular integrals in the Radon transform.

Parameters
  • ntheta (int) – The number of projections in the buffer (for simultaneous reconstruction)

  • n, nz (int) – The pixel width and height of the projection.

backprojection(data, theta)[source]

Compute backprojection to orthogonal slices

darkflat_correction(data)[source]

Dark-flat field correction

fbp_filter(data)[source]

FBP filtering of projections

free()[source]

Free GPU memory

minus_log(data)[source]

Taking negative logarithm

recon(data, theta)[source]

Reconstruction with the standard processing pipeline on GPU

recon_optimized(data, theta, ids, center, idx, idy, idz, rotx, roty, rotz, fbpfilter, dezinger, dbg=False)[source]

Optimized reconstruction of the object from the whole set of projections in the interval of size pi. Resulting reconstruction is obtained by replacing the reconstruction part corresponding to incoming projections, objnew = objold + recon(datanew) - recon(dataold) whenever the number of incoming projections is less than half of the buffer size. Reconstruction is done with using the whole buffer only when: the number of incoming projections is greater than half of the buffer size, idx/idy/idz, center, fbpfilter are changed, or new dark/flat fields are acquired.

Parameters
  • data (np.array(nproj,nz,n)) – Projection data

  • theta (np.array(nproj)) – Angles corresponding to the projection data

  • ids (np.array(nproj)) – Ids of the data in the circular buffer array

  • center (float) – Rotation center for reconstruction

  • idx, idy, idz (int) – X-Y-Z ortho slices for reconstruction

  • rotx, roty, rotz (float) – Rotation angles for X-Y-Z slices

  • fbpfilter (str) – Reconstruction filter

  • dezinger (str) – None or radius for removing outliers

Returns

obj (np.array(n,3*n)) – Concatenated reconstructions for X-Y-Z orthoslices

remove_outliers(data)[source]

Remove outliers

set_dark(data)[source]

Copy dark field (already averaged) to GPU

set_flat(data)[source]

Copy flat field (already averaged) to GPU