nipype.interfaces.niftyfit.dwi module

The dwi module of niftyfit, which wraps the fitting methods in NiftyFit.

DwiTool

Link to code

Bases: NiftyFitCommand

Wrapped executable: dwi_tool.

Interface for executable dwi_tool from Niftyfit platform.

Use DwiTool.

Diffusion-Weighted MR Prediction. Predicts DWI from previously fitted models and calculates model derived maps.

Source code

Examples

>>> from nipype.interfaces import niftyfit
>>> dwi_tool = niftyfit.DwiTool(dti_flag=True)
>>> dwi_tool.inputs.source_file = 'dwi.nii.gz'
>>> dwi_tool.inputs.bvec_file = 'bvecs'
>>> dwi_tool.inputs.bval_file = 'bvals'
>>> dwi_tool.inputs.mask_file = 'mask.nii.gz'
>>> dwi_tool.inputs.b0_file = 'b0.nii.gz'
>>> dwi_tool.inputs.rgbmap_file = 'rgb_map.nii.gz'
>>> dwi_tool.cmdline
'dwi_tool -source dwi.nii.gz -bval bvals -bvec bvecs -b0 b0.nii.gz -mask mask.nii.gz -dti -famap dwi_famap.nii.gz -logdti2 dwi_logdti2.nii.gz -mcmap dwi_mcmap.nii.gz -mdmap dwi_mdmap.nii.gz -rgbmap rgb_map.nii.gz -syn dwi_syn.nii.gz -v1map dwi_v1map.nii.gz'
bval_filea pathlike object or string representing an existing file

The file containing the bvalues of the source DWI. Maps to a command-line argument: -bval %s (position: 2).

source_filea pathlike object or string representing an existing file

The source image containing the fitted model. Maps to a command-line argument: -source %s (position: 1).

argsa string

Additional parameters to the command. Maps to a command-line argument: %s.

b0_filea pathlike object or string representing an existing file

The B0 image corresponding to the source DWI. Maps to a command-line argument: -b0 %s (position: 4).

ball_flaga boolean

Input is a ball and stick model. Maps to a command-line argument: -ball (position: 6). Mutually exclusive with inputs: mono_flag, ivim_flag, dti_flag, dti_flag2, ballv_flag, nod_flag, nodv_flag.

ballv_flaga boolean

Input is a ball and stick model with optimised PDD. Maps to a command-line argument: -ballv (position: 6). Mutually exclusive with inputs: mono_flag, ivim_flag, dti_flag, dti_flag2, ball_flag, nod_flag, nodv_flag.

bvec_filea pathlike object or string representing an existing file

The file containing the bvectors of the source DWI. Maps to a command-line argument: -bvec %s (position: 3).

diso_vala float

Isotropic diffusivity for -nod [3e-3]. Maps to a command-line argument: -diso %f.

dpr_vala float

Parallel diffusivity for -nod [1.7e-3]. Maps to a command-line argument: -dpr %f.

dti_flaga boolean

Input is a tensor model diag/off-diag. Maps to a command-line argument: -dti (position: 6). Mutually exclusive with inputs: mono_flag, ivim_flag, dti_flag2, ball_flag, ballv_flag, nod_flag, nodv_flag.

dti_flag2a boolean

Input is a tensor model lower triangular. Maps to a command-line argument: -dti2 (position: 6). Mutually exclusive with inputs: mono_flag, ivim_flag, dti_flag, ball_flag, ballv_flag, nod_flag, nodv_flag.

environa dictionary with keys which are a bytes or None or a value of class ‘str’ and with values which are a bytes or None or a value of class ‘str’

Environment variables. (Nipype default value: {})

famap_filea pathlike object or string representing a file

Filename of FA map. Maps to a command-line argument: -famap %s.

ivim_flaga boolean

Inputs is an IVIM model to non-directional data. Maps to a command-line argument: -ivim (position: 6). Mutually exclusive with inputs: mono_flag, dti_flag, dti_flag2, ball_flag, ballv_flag, nod_flag, nodv_flag.

logdti_filea pathlike object or string representing a file

Filename of output logdti map. Maps to a command-line argument: -logdti2 %s.

mask_filea pathlike object or string representing an existing file

The image mask. Maps to a command-line argument: -mask %s (position: 5).

mcmap_filea pathlike object or string representing a file

Filename of multi-compartment model parameter map (-ivim,-ball,-nod). Maps to a command-line argument: -mcmap %s.

mdmap_filea pathlike object or string representing a file

Filename of MD map/ADC. Maps to a command-line argument: -mdmap %s.

mono_flaga boolean

Input is a single exponential to non-directional data [default with no b-vectors]. Maps to a command-line argument: -mono (position: 6). Mutually exclusive with inputs: ivim_flag, dti_flag, dti_flag2, ball_flag, ballv_flag, nod_flag, nodv_flag.

nod_flaga boolean

Input is a NODDI model. Maps to a command-line argument: -nod (position: 6). Mutually exclusive with inputs: mono_flag, ivim_flag, dti_flag, dti_flag2, ball_flag, ballv_flag, nodv_flag.

nodv_flaga boolean

Input is a NODDI model with optimised PDD. Maps to a command-line argument: -nodv (position: 6). Mutually exclusive with inputs: mono_flag, ivim_flag, dti_flag, dti_flag2, ball_flag, ballv_flag, nod_flag.

rgbmap_filea pathlike object or string representing a file

Filename of colour FA map. Maps to a command-line argument: -rgbmap %s.

syn_filea pathlike object or string representing a file

Filename of synthetic image. Requires: bvec_file/b0_file. Maps to a command-line argument: -syn %s. Requires inputs: bvec_file, b0_file.

v1map_filea pathlike object or string representing a file

Filename of PDD map [x,y,z]. Maps to a command-line argument: -v1map %s.

famap_filea pathlike object or string representing a file

Filename of FA map.

logdti_filea pathlike object or string representing a file

Filename of output logdti map.

mcmap_filea pathlike object or string representing a file

Filename of multi-compartment model parameter map (-ivim,-ball,-nod).

mdmap_filea pathlike object or string representing a file

Filename of MD map/ADC.

rgbmap_filea pathlike object or string representing a file

Filename of colour FA map.

syn_filea pathlike object or string representing a file

Filename of synthetic image.

v1map_filea pathlike object or string representing a file

Filename of PDD map [x,y,z].

FitDwi

Link to code

Bases: NiftyFitCommand

Wrapped executable: fit_dwi.

Interface for executable fit_dwi from Niftyfit platform.

Use NiftyFit to perform diffusion model fitting.

Diffusion-weighted MR Fitting. Fits DWI parameter maps to multi-shell, multi-directional data.

Source code

Examples

>>> from nipype.interfaces import niftyfit
>>> fit_dwi = niftyfit.FitDwi(dti_flag=True)
>>> fit_dwi.inputs.source_file = 'dwi.nii.gz'
>>> fit_dwi.inputs.bvec_file = 'bvecs'
>>> fit_dwi.inputs.bval_file = 'bvals'
>>> fit_dwi.inputs.rgbmap_file = 'rgb.nii.gz'
>>> fit_dwi.cmdline
'fit_dwi -source dwi.nii.gz -bval bvals -bvec bvecs -dti -error dwi_error.nii.gz -famap dwi_famap.nii.gz -mcout dwi_mcout.txt -mdmap dwi_mdmap.nii.gz -nodiff dwi_no_diff.nii.gz -res dwi_resmap.nii.gz -rgbmap rgb.nii.gz -syn dwi_syn.nii.gz -tenmap2 dwi_tenmap2.nii.gz -v1map dwi_v1map.nii.gz'
bval_filea pathlike object or string representing an existing file

The file containing the bvalues of the source DWI. Maps to a command-line argument: -bval %s (position: 2).

bvec_filea pathlike object or string representing an existing file

The file containing the bvectors of the source DWI. Maps to a command-line argument: -bvec %s (position: 3).

source_filea pathlike object or string representing an existing file

The source image containing the dwi data. Maps to a command-line argument: -source %s (position: 1).

acceptancea float

Fraction of iterations to accept [0.23]. Maps to a command-line argument: -accpetance %f.

argsa string

Additional parameters to the command. Maps to a command-line argument: %s.

ball_flaga boolean

Fit the ball and stick model. Maps to a command-line argument: -ball (position: 4). Mutually exclusive with inputs: mono_flag, ivim_flag, dti_flag, ballv_flag, nod_flag, nodv_flag.

ballv_flaga boolean

Fit the ball and stick model with optimised PDD. Maps to a command-line argument: -ballv (position: 4). Mutually exclusive with inputs: mono_flag, ivim_flag, dti_flag, ball_flag, nod_flag, nodv_flag.

cov_filea pathlike object or string representing an existing file

Filename of ithe nc*nc covariance matrix [I]. Maps to a command-line argument: -cov %s.

csf_t2_vala float

CSF T2 value [400ms]. Maps to a command-line argument: -csfT2 %f.

diso_vala float

Isotropic diffusivity for -nod [3e-3]. Maps to a command-line argument: -diso %f.

dpr_vala float

Parallel diffusivity for -nod [1.7e-3]. Maps to a command-line argument: -dpr %f.

dti_flaga boolean

Fit the tensor model [default with b-vectors]. Maps to a command-line argument: -dti (position: 4). Mutually exclusive with inputs: mono_flag, ivim_flag, ball_flag, ballv_flag, nod_flag, nodv_flag.

environa dictionary with keys which are a bytes or None or a value of class ‘str’ and with values which are a bytes or None or a value of class ‘str’

Environment variables. (Nipype default value: {})

error_filea pathlike object or string representing a file

Filename of parameter error maps. Maps to a command-line argument: -error %s.

famap_filea pathlike object or string representing a file

Filename of FA map. Maps to a command-line argument: -famap %s.

gn_flaga boolean

Use Gauss-Newton algorithm [Levenberg-Marquardt]. Maps to a command-line argument: -gn. Mutually exclusive with inputs: wls_flag.

ivim_flaga boolean

Fit IVIM model to non-directional data. Maps to a command-line argument: -ivim (position: 4). Mutually exclusive with inputs: mono_flag, dti_flag, ball_flag, ballv_flag, nod_flag, nodv_flag.

lm_valsa tuple of the form: (a float, a float)

LM parameters (initial value, decrease rate) [100,1.2]. Maps to a command-line argument: -lm %f %f. Requires inputs: gn_flag.

mask_filea pathlike object or string representing an existing file

The image mask. Maps to a command-line argument: -mask %s.

maxit_valan integer

Maximum number of non-linear LSQR iterations [100x2 passes]). Maps to a command-line argument: -maxit %d. Requires inputs: gn_flag.

mcmap_filea pathlike object or string representing a file

Filename of multi-compartment model parameter map (-ivim,-ball,-nod). Maps to a command-line argument: -mcmap %s. Requires inputs: nodv_flag.

mcmaxitan integer

Number of iterations to run [10,000]. Maps to a command-line argument: -mcmaxit %d.

mcouta pathlike object or string representing a file

Filename of mc samples (ascii text file). Maps to a command-line argument: -mcout %s.

mcsamplesan integer

Number of samples to keep [100]. Maps to a command-line argument: -mcsamples %d.

mdmap_filea pathlike object or string representing a file

Filename of MD map/ADC. Maps to a command-line argument: -mdmap %s.

mono_flaga boolean

Fit single exponential to non-directional data [default with no b-vectors]. Maps to a command-line argument: -mono (position: 4). Mutually exclusive with inputs: ivim_flag, dti_flag, ball_flag, ballv_flag, nod_flag, nodv_flag.

nod_flaga boolean

Fit the NODDI model. Maps to a command-line argument: -nod (position: 4). Mutually exclusive with inputs: mono_flag, ivim_flag, dti_flag, ball_flag, ballv_flag, nodv_flag.

nodiff_filea pathlike object or string representing a file

Filename of average no diffusion image. Maps to a command-line argument: -nodiff %s.

nodv_flaga boolean

Fit the NODDI model with optimised PDD. Maps to a command-line argument: -nodv (position: 4). Mutually exclusive with inputs: mono_flag, ivim_flag, dti_flag, ball_flag, ballv_flag, nod_flag.

perf_thra float

Threshold for perfusion/diffsuion effects [100]. Maps to a command-line argument: -perfthreshold %f.

prior_filea pathlike object or string representing an existing file

Filename of parameter priors for -ball and -nod. Maps to a command-line argument: -prior %s.

res_filea pathlike object or string representing a file

Filename of model residual map. Maps to a command-line argument: -res %s.

rgbmap_filea pathlike object or string representing a file

Filename of colour-coded FA map. Maps to a command-line argument: -rgbmap %s. Requires inputs: dti_flag.

rot_sform_flagan integer

Rotate the output tensors according to the q/s form of the image (resulting tensors will be in mm coordinates, default: 0). Maps to a command-line argument: -rotsform %d.

slice_noan integer

Fit to single slice number. Maps to a command-line argument: -slice %d.

swls_vala float

Use location-weighted least squares for DTI fitting [3x3 Gaussian]. Maps to a command-line argument: -swls %f.

syn_filea pathlike object or string representing a file

Filename of synthetic image. Maps to a command-line argument: -syn %s.

te_filea pathlike object or string representing an existing file

Filename of TEs (ms). Maps to a command-line argument: -TE %s. Mutually exclusive with inputs: te_file.

te_valuea pathlike object or string representing an existing file

Value of TEs (ms). Maps to a command-line argument: -TE %s. Mutually exclusive with inputs: te_file.

ten_type‘lower-tri’ or ‘diag-off-diag’

Use lower triangular (tenmap2) or diagonal, off-diagonal tensor format. (Nipype default value: lower-tri)

tenmap2_filea pathlike object or string representing a file

Filename of tensor map [lower tri]. Maps to a command-line argument: -tenmap2 %s. Requires inputs: dti_flag.

tenmap_filea pathlike object or string representing a file

Filename of tensor map [diag,offdiag]. Maps to a command-line argument: -tenmap %s. Requires inputs: dti_flag.

v1map_filea pathlike object or string representing a file

Filename of PDD map [x,y,z]. Maps to a command-line argument: -v1map %s.

vb_flaga boolean

Use Variational Bayes fitting with known prior (currently identity covariance…). Maps to a command-line argument: -vb.

voxela tuple of the form: (an integer, an integer, an integer)

Fit to single voxel only. Maps to a command-line argument: -voxel %d %d %d.

wls_flaga boolean

Use Variational Bayes fitting with known prior (currently identity covariance…). Maps to a command-line argument: -wls. Mutually exclusive with inputs: gn_flag.

wm_t2_vala float

White matter T2 value [80ms]. Maps to a command-line argument: -wmT2 %f.

error_filea pathlike object or string representing a file

Filename of parameter error maps.

famap_filea pathlike object or string representing a file

Filename of FA map.

mcmap_filea pathlike object or string representing a file

Filename of multi-compartment model parameter map (-ivim,-ball,-nod).

mcouta pathlike object or string representing a file

Filename of mc samples (ascii text file).

mdmap_filea pathlike object or string representing a file

Filename of MD map/ADC.

nodiff_filea pathlike object or string representing a file

Filename of average no diffusion image.

res_filea pathlike object or string representing a file

Filename of model residual map.

rgbmap_filea pathlike object or string representing a file

Filename of colour FA map.

syn_filea pathlike object or string representing a file

Filename of synthetic image.

tenmap2_filea pathlike object or string representing a file

Filename of tensor map [lower tri].

tenmap_filea pathlike object or string representing a file

Filename of tensor map.

v1map_filea pathlike object or string representing a file

Filename of PDD map [x,y,z].