nipype.interfaces.dipy.reconstruction module

Interfaces to the reconstruction algorithms in dipy

CSD

Link to code

Bases: DipyDiffusionInterface

Uses CSD [Tournier2007] to generate the fODF of DWIs. The interface uses dipy, as explained in dipy’s CSD example.

Tournier2007

Tournier, J.D., et al. NeuroImage 2007. Robust determination of the fibre orientation distribution in diffusion MRI: Non-negativity constrained super-resolved spherical deconvolution

Example

>>> from nipype.interfaces import dipy as ndp
>>> csd = ndp.CSD()
>>> csd.inputs.in_file = '4d_dwi.nii'
>>> csd.inputs.in_bval = 'bvals'
>>> csd.inputs.in_bvec = 'bvecs'
>>> res = csd.run() 
Mandatory Inputs
  • in_bval (a pathlike object or string representing an existing file) – Input b-values table.

  • in_bvec (a pathlike object or string representing an existing file) – Input b-vectors table.

  • in_file (a pathlike object or string representing an existing file) – Input diffusion data.

Optional Inputs
  • b0_thres (an integer) – B0 threshold. (Nipype default value: 700)

  • in_mask (a pathlike object or string representing an existing file) – Input mask in which compute tensors.

  • out_fods (a pathlike object or string representing a file) – FODFs output file name.

  • out_prefix (a string) – Output prefix for file names.

  • response (a pathlike object or string representing an existing file) – Single fiber estimated response.

  • save_fods (a boolean) – Save fODFs in file. (Nipype default value: True)

  • sh_order (an integer) – Maximal shperical harmonics order. (Nipype default value: 8)

Outputs
  • model (a pathlike object or string representing a file) – Python pickled object of the CSD model fitted.

  • out_fods (a pathlike object or string representing a file) – FODFs output file name.

EstimateResponseSH

Link to code

Bases: DipyDiffusionInterface

Uses dipy to compute the single fiber response to be used in spherical deconvolution methods, in a similar way to MRTrix’s command estimate_response.

Example

>>> from nipype.interfaces import dipy as ndp
>>> dti = ndp.EstimateResponseSH()
>>> dti.inputs.in_file = '4d_dwi.nii'
>>> dti.inputs.in_bval = 'bvals'
>>> dti.inputs.in_bvec = 'bvecs'
>>> dti.inputs.in_evals = 'dwi_evals.nii'
>>> res = dti.run() 
Mandatory Inputs
  • in_bval (a pathlike object or string representing an existing file) – Input b-values table.

  • in_bvec (a pathlike object or string representing an existing file) – Input b-vectors table.

  • in_evals (a pathlike object or string representing an existing file) – Input eigenvalues file.

  • in_file (a pathlike object or string representing an existing file) – Input diffusion data.

Optional Inputs
  • auto (a boolean) – Use the auto_response estimator from dipy. Mutually exclusive with inputs: recursive.

  • b0_thres (an integer) – B0 threshold. (Nipype default value: 700)

  • fa_thresh (a float) – FA threshold. (Nipype default value: 0.7)

  • in_mask (a pathlike object or string representing an existing file) – Input mask in which we find single fibers.

  • out_mask (a pathlike object or string representing a file) – Computed wm mask. (Nipype default value: wm_mask.nii.gz)

  • out_prefix (a string) – Output prefix for file names.

  • recursive (a boolean) – Use the recursive response estimator from dipy. Mutually exclusive with inputs: auto.

  • response (a pathlike object or string representing a file) – The output response file. (Nipype default value: response.txt)

  • roi_radius (an integer) – ROI radius to be used in auto_response. (Nipype default value: 10)

Outputs
  • out_mask (a pathlike object or string representing an existing file) – Output wm mask.

  • response (a pathlike object or string representing an existing file) – The response file.

RESTORE

Link to code

Bases: DipyDiffusionInterface

Uses RESTORE [Chang2005] to perform DTI fitting with outlier detection. The interface uses dipy, as explained in dipy’s documentation.

Chang2005

Chang, LC, Jones, DK and Pierpaoli, C. RESTORE: robust estimation of tensors by outlier rejection. MRM, 53:1088-95, (2005).

Example

>>> from nipype.interfaces import dipy as ndp
>>> dti = ndp.RESTORE()
>>> dti.inputs.in_file = '4d_dwi.nii'
>>> dti.inputs.in_bval = 'bvals'
>>> dti.inputs.in_bvec = 'bvecs'
>>> res = dti.run() 
Mandatory Inputs
  • in_bval (a pathlike object or string representing an existing file) – Input b-values table.

  • in_bvec (a pathlike object or string representing an existing file) – Input b-vectors table.

  • in_file (a pathlike object or string representing an existing file) – Input diffusion data.

Optional Inputs
  • b0_thres (an integer) – B0 threshold. (Nipype default value: 700)

  • in_mask (a pathlike object or string representing an existing file) – Input mask in which compute tensors.

  • noise_mask (a pathlike object or string representing an existing file) – Input mask in which compute noise variance.

  • out_prefix (a string) – Output prefix for file names.

Outputs
  • evals (a pathlike object or string representing a file) – Output the eigenvalues of the fitted DTI.

  • evecs (a pathlike object or string representing a file) – Output the eigenvectors of the fitted DTI.

  • fa (a pathlike object or string representing a file) – Output fractional anisotropy (FA) map computed from the fitted DTI.

  • md (a pathlike object or string representing a file) – Output mean diffusivity (MD) map computed from the fitted DTI.

  • mode (a pathlike object or string representing a file) – Output mode (MO) map computed from the fitted DTI.

  • rd (a pathlike object or string representing a file) – Output radial diffusivity (RD) map computed from the fitted DTI.

  • trace (a pathlike object or string representing a file) – Output the tensor trace map computed from the fitted DTI.