Desc. |
Function to carry out CDM Dual Energy Decomposition on the input
sinogram pair. The proper operation of the function depends heavily on
the input arguments provided during the initialization of
CDMDecomposer() and the function parameters solver, method, type. The
input sinograms sino_h, sino_l must correspond to the respective spectra
spctrm_l, spctrm_h and also to the repsective photon count. The choice
of the parameter, solver determines the operation of the
decomposition operation - CDM is performed elementwise on each pixel of
the sinogram hence using parallelizing option for solver is important.
Choosing solver=‘vec’ may cause long operation times for large sinograms
while multithreading by solver=‘cpu’ only speeds up the process by the
number of CPU on the machine. Using solver=‘gpu’ allows very high speeds
through use of GPUs but requires CUDA support and the Gpufit library -
see installation instructions. The choice of method decides the
optimization technique used for CDM - by default, ‘lsq’ is chosen which
uses the dogBox method in scip.optimze.least_squares for estimation
Compton, PE values while choosing method=‘lm’ makes use of the
Levenberg-Marquardt algorithm for optimization. Selecting type=‘mbd’
allows adjusting the operation for material basis decompostion as
descirbed in [1] - using this option requires calling the
self.set_basis_functions() functions to adjust for the material bases. |
Args. |
sino_h: ndarray of float - high energy sinogram (log projection) |
|
sino_lndarray of float - low energy sinogram (log projection) |
|
solver: {gpu, cpu, vec}, str - one of multi-threaded ‘cpu’, LM on ‘gpu’ or ‘vec’ |
|
method: {lsq, lm}, str - ‘lsq’ for using scipy’s bounded least squares optimizer; otherwise exactly follows the paper |
|
type: {cpd, mbd}, str - ‘cpd’ - Compton-PE basis
decomposition;‘mbd’ - Material Basis Decomposition (requires calling
set_basis_functions to change the bases from Compton-PE to the material
bases) |
Return |
sino_p, sino_c: ndarray of float - sinogram for Photoelectric/Compton image |