cmtklib.interfaces.dipy module¶
The Dipy module provides Nipype interfaces to the algorithms in dipy.
CSD¶
Bases: nipype.interfaces.dipy.base.DipyDiffusionInterface
Uses CSD [Tournier2007] to generate the fODF of DWIs.
The interface uses
dipy
, as explained in dipy’s CSD example.References
- 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 cmtklib.interfaces.dipy import CSD >>> csd = CSD() >>> csd.inputs.in_file = '4d_dwi.nii' >>> csd.inputs.in_bval = 'bvals' >>> csd.inputs.in_bvec = 'bvecs' >>> res = csd.run()
- in_bvala pathlike object or string representing an existing file
Input b-values table.
- in_bveca pathlike object or string representing an existing file
Input b-vectors table.
- in_filea pathlike object or string representing an existing file
Input diffusion data.
- b0_thresan integer
B0 threshold. (Nipype default value:
700
)- fa_thresha float
FA threshold used for response estimation. (Nipype default value:
0.7
)- in_maska pathlike object or string representing an existing file
Input mask in which compute tensors.
- out_fodsa pathlike object or string representing a file
FODFs output file name.
- out_prefixa string
Output prefix for file names.
- out_shm_coeffa pathlike object or string representing a file
Spherical Harmonics Coefficients output file name.
- responsea pathlike object or string representing an existing file
Single fiber estimated response.
- save_fodsa boolean
Save fODFs in file. (Nipype default value:
True
)- save_shm_coeffa boolean
Save Spherical Harmonics Coefficients in file. (Nipype default value:
True
)- sh_orderan integer
Maximal shperical harmonics order. (Nipype default value:
8
)tracking_processing_tool : ‘mrtrix’ or ‘dipy’
- modela pathlike object or string representing a file
Python pickled object of the CSD model fitted.
- out_fodsa pathlike object or string representing a file
FODFs output file name.
- out_shm_coeffa pathlike object or string representing a file
Spherical Harmonics Coefficients output file name.
DTIEstimateResponseSH¶
Bases: nipype.interfaces.dipy.base.DipyDiffusionInterface
Uses dipy to compute the single fiber response to be used by spherical deconvolution methods.
The single fiber response is computed in a similar way to MRTrix’s command
estimate_response
.Example
>>> from cmtklib.interfaces.dipy import DTIEstimateResponseSH >>> dti = DTIEstimateResponseSH() >>> dti.inputs.in_file = '4d_dwi.nii' >>> dti.inputs.in_bval = 'bvals' >>> dti.inputs.in_bvec = 'bvecs' >>> res = dti.run()
- in_bvala pathlike object or string representing an existing file
Input b-values table.
- in_bveca pathlike object or string representing an existing file
Input b-vectors table.
- in_filea pathlike object or string representing an existing file
Input diffusion data.
- autoa boolean
Use the auto_response estimator from dipy. Mutually exclusive with inputs:
recursive
.- b0_thresan integer
B0 threshold. (Nipype default value:
700
)- fa_thresha float
FA threshold. (Nipype default value:
0.7
)- in_maska pathlike object or string representing an existing file
Input mask in which we find single fibers.
- out_maska pathlike object or string representing a file
Computed wm mask. (Nipype default value:
wm_mask.nii.gz
)- out_prefixa string
Output prefix for file names.
- recursivea boolean
Use the recursive response estimator from dipy. Mutually exclusive with inputs:
auto
.- responsea pathlike object or string representing a file
The output response file. (Nipype default value:
response.txt
)- roi_radiusan integer
ROI radius to be used in auto_response. (Nipype default value:
10
)ad_file : a pathlike object or string representing an existing file dti_model : a pathlike object or string representing an existing file
DTI model object.
fa_file : a pathlike object or string representing an existing file md_file : a pathlike object or string representing an existing file out_mask : a pathlike object or string representing an existing file
Output wm mask.
rd_file : a pathlike object or string representing an existing file response : a pathlike object or string representing an existing file
The response file.
DirectionGetterTractography¶
Bases: nipype.interfaces.dipy.base.DipyBaseInterface
Streamline tractography using Dipy Deterministic Maximum Direction Getter.
Example
>>> from cmtklib.interfaces import dipy as ndp >>> track = ndp.DirectionGetterTractography() >>> track.inputs.in_file = '4d_dwi.nii' >>> track.inputs.in_model = 'model.pklz' >>> track.inputs.tracking_mask = 'dilated_wm_mask.nii' >>> res = track.run()
- fa_thresha float
FA threshold to build the tissue classifier. (Nipype default value:
0.2
)- in_faa pathlike object or string representing an existing file
Input FA.
- in_filea pathlike object or string representing an existing file
Input diffusion data.
- in_modela pathlike object or string representing an existing file
Input f/d-ODF model extracted from.
- max_anglea float
Maximum angle. (Nipype default value:
25.0
)- multiprocessa boolean
Use multiprocessing. (Nipype default value:
True
)- num_seedsan integer
Desired number of tracks in tractography. (Nipype default value:
10000
)- save_seedsa boolean
Save seeding voxels coordinates. (Nipype default value:
False
)- seed_maska list of items which are a pathlike object or string representing an existing file
ROI files registered to diffusion space.
- step_sizea float
Step size. (Nipype default value:
0.5
)- tracking_maska pathlike object or string representing an existing file
Input mask within which perform tracking.
- algo‘deterministic’ or ‘probabilistic’
Use either deterministic maximum (default) or probabilistic direction getter tractography. (Nipype default value:
deterministic
)- fod_filea pathlike object or string representing an existing file
Input fod file (if SHORE).
- gmwmi_filea pathlike object or string representing an existing file
Input Gray Matter / White Matter interface image.
- in_partial_volume_filesa list of items which are a pathlike object or string representing an existing file
Partial volume estimation result files (required if performing ACT).
- out_prefixa string
Output prefix for file names.
- recon_model‘CSD’ or ‘SHORE’
Use either fODFs from CSD (default) or SHORE models. (Nipype default value:
CSD
)- recon_orderan integer
Spherical harmonics order.
- seed_densitya float
Density of seeds. (Nipype default value:
1
)- seed_from_gmwmia boolean
Seed from the Gray Matter / White Matter interface.
- use_acta boolean
Use FAST for partial volume estimation and Anatomically-Constrained Tractography (ACT) tissue classifier.
- out_seedsa pathlike object or string representing a file
File containing the (N,3) voxel coordinates used in seeding.
- streamlinesa pathlike object or string representing a file
Numpy array of streamlines.
- tracksa pathlike object or string representing a file
TrackVis file containing extracted streamlines.
- tracks2a pathlike object or string representing a file
TrackVis file containing extracted streamlines.
- tracks3a pathlike object or string representing a file
TrackVis file containing extracted streamlines.
MAPMRI¶
Bases: nipype.interfaces.dipy.base.DipyDiffusionInterface
Computes the MAP MRI model.
for reference on the settings
Example
>>> from cmtklib.interfaces.dipy import MAPMRI >>> mapmri = MAPMRI() >>> mapmri.inputs.in_file = '4d_dwi.nii' >>> mapmri.inputs.in_bval = 'bvals' >>> mapmri.inputs.in_bvec = 'bvecs' >>> res = mapmri.run()
- big_deltaa float
Small data for gradient table.
- in_bvala pathlike object or string representing an existing file
Input b-values table.
- in_bveca pathlike object or string representing an existing file
Input b-vectors table.
- in_filea pathlike object or string representing an existing file
Input diffusion data.
- small_deltaa float
Small data for gradient table.
- b0_thresan integer
B0 threshold. (Nipype default value:
700
)- laplacian_regularizationa boolean
Apply laplacian regularization. (Nipype default value:
True
)- laplacian_weightinga float
Regularization weight. (Nipype default value:
0.05
)- out_prefixa string
Output prefix for file names.
- positivity_constrainta boolean
Apply positivity constraint. (Nipype default value:
True
)- radial_orderan integer
Maximal shperical harmonics order. (Nipype default value:
8
)
- modela pathlike object or string representing a file
Python pickled object of the MAP-MRI model fitted.
- msd_filea pathlike object or string representing a file
Msd output file name.
- ng_filea pathlike object or string representing a file
Ng output file name.
- ng_para_filea pathlike object or string representing a file
Ng parallel output file name.
- ng_perp_filea pathlike object or string representing a file
Ng perpendicular output file name.
- qiv_filea pathlike object or string representing a file
Qiv output file name.
- rtap_filea pathlike object or string representing a file
Rtap output file name.
- rtop_filea pathlike object or string representing a file
Rtop output file name.
- rtpp_filea pathlike object or string representing a file
Rtpp output file name.
SHORE¶
Bases: nipype.interfaces.dipy.base.DipyDiffusionInterface
Uses SHORE [Merlet13] to generate the fODF of DWIs.
The interface uses
dipy
, as explained in dipy’s SHORE example.References
- Merlet2013
Merlet S. et. al, Medical Image Analysis, 2013.
“Continuous diffusion signal, EAP and ODF estimation via Compressive Sensing in diffusion MRI”
Example
>>> from cmtklib.interfaces.dipy import SHORE >>> asm = SHORE(radial_order=6,zeta=700, lambda_n=1e-8, lambda_l=1e-8) >>> asm.inputs.in_file = '4d_dwi.nii' >>> asm.inputs.in_bval = 'bvals' >>> asm.inputs.in_bvec = 'bvecs' >>> res = asm.run()
- in_bvala pathlike object or string representing an existing file
Input b-values table.
- in_bveca pathlike object or string representing an existing file
Input b-vectors table.
- in_filea pathlike object or string representing an existing file
Input diffusion data.
- b0_thresan integer
B0 threshold. (Nipype default value:
700
)- constrain_e0a boolean
Constrain the optimization such that E(0) = 1. (Nipype default value:
False
)- in_maska pathlike object or string representing an existing file
Input mask in which compute SHORE solution.
- lambda_la float
Angular regularisation constant. (Nipype default value:
1e-08
)- lambda_na float
Radial regularisation constant. (Nipype default value:
1e-08
)- out_prefixa string
Output prefix for file names.
- positive_constrainta boolean
Constrain the optimization such that E(0) = 1. (Nipype default value:
False
)- radial_orderan integer
Even number that represents the order of the basis. (Nipype default value:
6
)- responsea pathlike object or string representing an existing file
Single fiber estimated response.
- taua float
Diffusion time. By default the value that makes q equal to the square root of the b-value.
tracking_processing_tool : ‘mrtrix’ or ‘dipy’ zeta : an integer
Scale factor. (Nipype default value:
700
)
- GFAa pathlike object or string representing a file
Generalized Fractional Anisotropy output file name.
- MSDa pathlike object or string representing a file
Mean Square Displacement output file name.
- RTOPa pathlike object or string representing a file
Return To Origin Probability output file name.
- dodfa pathlike object or string representing a file
Fiber Orientation Distribution Function output file name.
- fodfa pathlike object or string representing a file
Fiber Orientation Distribution Function output file name.
- modela pathlike object or string representing a file
Python pickled object of the SHORE model fitted.
TensorInformedEudXTractography¶
Bases: nipype.interfaces.dipy.base.DipyBaseInterface
Streamline tractography using Dipy Deterministic Maximum Direction Getter.
Example
>>> from cmtklib.interfaces import dipy as ndp >>> track = ndp.TensorInformedEudXTractography() >>> track.inputs.in_file = '4d_dwi.nii' >>> track.inputs.in_model = 'model.pklz' >>> track.inputs.tracking_mask = 'dilated_wm_mask.nii' >>> res = track.run()
- fa_thresha float
FA threshold to build the tissue classifier. (Nipype default value:
0.2
)- in_faa pathlike object or string representing an existing file
Input FA.
- in_filea pathlike object or string representing an existing file
Input diffusion data.
- in_modela pathlike object or string representing an existing file
Input Tensor model extracted from.
- max_anglea float
Maximum angle. (Nipype default value:
25.0
)- multiprocessa boolean
Use multiprocessing. (Nipype default value:
True
)- num_seedsan integer
Desired number of tracks in tractography. (Nipype default value:
10000
)- save_seedsa boolean
Save seeding voxels coordinates. (Nipype default value:
False
)- seed_maska list of items which are a pathlike object or string representing an existing file
ROI files registered to diffusion space.
- step_sizea float
Step size. (Nipype default value:
0.5
)- tracking_maska pathlike object or string representing an existing file
Input mask within which perform tracking.
- out_prefixa string
Output prefix for file names.
- out_seedsa pathlike object or string representing a file
File containing the (N,3) voxel coordinates used in seeding.
- tracksa pathlike object or string representing a file
TrackVis file containing extracted streamlines.