dipy logo

Site Navigation

NIPY Community

Next topic

dipy.reconst.dti

dipy.reconst.dsi

dipy.reconst.dsi.LR_deconv(prop, psf, numit=5, acc_factor=1)

Perform Lucy-Richardson deconvolution algorithm on a 3D array.

Parameters :

prop : 3-D ndarray of dtype float

The 3D volume to be deconvolve

psf : 3-D ndarray of dtype float

The filter that will be used for the deconvolution.

numit : int

Number of Lucy-Richardson iteration to perform.

acc_factor : float

Exponential acceleration factor as in [R5].

References

[R5](1, 2) Biggs David S.C. et. al, “Acceleration of Iterative Image Restoration Algorithms”, Applied Optics, vol. 36, No. 8, p. 1766-1775, 1997.
dipy.reconst.dsi.create_qspace(gtab, origin)

create the 3D grid which holds the signal values (q-space)

Parameters :

gtab : GradientTable

origin : (3,) ndarray

center of the qspace

Returns :

qgrid : ndarray

qspace coordinates

dipy.reconst.dsi.create_qtable(gtab)

create a normalized version of gradients

dipy.reconst.dsi.gen_PSF(qgrid_sampling, siz_x, siz_y, siz_z)

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.

dipy.reconst.dsi.half_to_full_qspace(data, gtab)

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)

where (X, Y, Z) volume size and W number of gradient directions

gtab : GradientTable

container for b-values and b-vectors (gradient directions)

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.

dipy.reconst.dsi.hanning_filter(gtab, filter_width)

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

where N is the number of non-b0 gradient directions

dipy.reconst.dsi.pdf_interp_coords(sphere, rradius, origin)

Precompute coordinates for ODF calculation from the PDF

Parameters :

sphere : object,

Sphere

rradius : array, shape (N,)

line interpolation points

origin : array, shape (3,)

center of the grid

dipy.reconst.dsi.pdf_odf(Pr, rradius, interp_coords)

Calculates the real ODF from the diffusion propagator(PDF) Pr

Parameters :

Pr : array, shape (X, X, X)

probability density function

rradius : array, shape (N,)

interpolation range on the radius

interp_coords : array, shape (3, M, N)

coordinates in the pdf for interpolating the odf

dipy.reconst.dsi.project_hemisph_bvecs(gtab)

Project any near identical bvecs to the other hemisphere

Parameters :

gtab : object,

GradientTable

Notes

Useful only when working with some types of dsi data.

dipy.reconst.dsi.threshold_propagator(P, estimated_snr=15.0)

Applies hard threshold on the propagator to remove background noise for the deconvolution.