Perform Lucy-Richardson deconvolution algorithm on a 3D array.
Parameters: | prop : 3-D ndarray of dtype float
psf : 3-D ndarray of dtype float
numit : int
acc_factor : float
|
---|
References
[R6] | (1, 2) Biggs David S.C. et. al, “Acceleration of Iterative Image Restoration Algorithms”, Applied Optics, vol. 36, No. 8, p. 1766-1775, 1997. |
create the 3D grid which holds the signal values (q-space)
Parameters: | gtab : GradientTable origin : (3,) ndarray
|
---|---|
Returns: | qgrid : ndarray
|
create a normalized version of gradients
Generate a PSF for DSI Deconvolution by taking the ifft of the binary q-space sampling mask and truncating it to keep only the center.
Half to full Cartesian grid mapping
Useful when dMRI data are provided in one qspace hemisphere as DiffusionSpectrum expects data to be in full qspace.
Parameters: | data : array, shape (X, Y, Z, W)
gtab : GradientTable
|
---|---|
Returns: | new_data : array, shape (X, Y, Z, 2 * W -1) new_gtab : GradientTable |
Notes
We assume here that only on b0 is provided with the initial data. If that is not the case then you will need to write your own preparation function before providing the gradients and the data to the DiffusionSpectrumModel class.
create a hanning window
The signal is premultiplied by a Hanning window before Fourier transform in order to ensure a smooth attenuation of the signal at high q values.
Parameters: | gtab : GradientTable filter_width : int |
---|---|
Returns: | filter : (N,) ndarray
|
Precompute coordinates for ODF calculation from the PDF
Parameters: | sphere : object,
rradius : array, shape (N,)
origin : array, shape (3,)
|
---|
Calculates the real ODF from the diffusion propagator(PDF) Pr
Parameters: | Pr : array, shape (X, X, X)
rradius : array, shape (N,)
interp_coords : array, shape (3, M, N)
|
---|
Project any near identical bvecs to the other hemisphere
Parameters: | gtab : object,
|
---|
Notes
Useful only when working with some types of dsi data.
Applies hard threshold on the propagator to remove background noise for the deconvolution.