interfaces.dipy.tracks

StreamlineTractography

Link to code

Streamline tractography using EuDX [Garyfallidis12].

[Garyfallidis12]Garyfallidis E., “Towards an accurate brain tractography”, PhD thesis, University of Cambridge, 2012

Example

>>> from nipype.interfaces import dipy as ndp
>>> track = ndp.StreamlineTractography()
>>> track.inputs.in_file = '4d_dwi.nii'
>>> track.inputs.in_model = 'model.pklz'
>>> track.inputs.tracking_mask = 'dilated_wm_mask.nii'
>>> res = track.run() 

Inputs:

[Mandatory]
in_file: (an existing file name)
        input diffusion data
gfa_thresh: (a float, nipype default value: 0.2)
        GFA threshold to compute tracking mask
peak_threshold: (a float, nipype default value: 0.5)
        threshold to consider peaks from model
min_angle: (a float, nipype default value: 25.0)
        minimum separation angle
multiprocess: (a boolean, nipype default value: True)
        use multiprocessing
save_seeds: (a boolean, nipype default value: False)
        save seeding voxels coordinates
num_seeds: (an integer (int or long), nipype default value: 10000)
        desired number of tracks in tractography

[Optional]
in_model: (an existing file name)
        input f/d-ODF model extracted from.
tracking_mask: (an existing file name)
        input mask within which perform tracking
seed_mask: (an existing file name)
        input mask within which perform seeding
in_peaks: (an existing file name)
        peaks computed from the odf
seed_coord: (an existing file name)
        file containing the list of seed voxel coordinates (N,3)
out_prefix: (a unicode string)
        output prefix for file names

Outputs:

tracks: (a file name)
        TrackVis file containing extracted streamlines
gfa: (a file name)
        The resulting GFA (generalized FA) computed using the peaks of the
        ODF
odf_peaks: (a file name)
        peaks computed from the odf
out_seeds: (a file name)
        file containing the (N,3) *voxel* coordinates used in seeding.

TrackDensityMap

Link to code

Creates a tract density image from a TrackVis track file using functions from dipy

Example

>>> import nipype.interfaces.dipy as dipy
>>> trk2tdi = dipy.TrackDensityMap()
>>> trk2tdi.inputs.in_file = 'converted.trk'
>>> trk2tdi.run()                                   

Inputs:

[Mandatory]
in_file: (an existing file name)
        The input TrackVis track file

[Optional]
reference: (an existing file name)
        A reference file to define RAS coordinates space
points_space: ('rasmm' or 'voxel' or None, nipype default value:
          rasmm)
        coordinates of trk file
voxel_dims: (a list of from 3 to 3 items which are a float)
        The size of each voxel in mm.
data_dims: (a list of from 3 to 3 items which are an integer (int or
          long))
        The size of the image in voxels.
out_filename: (a file name, nipype default value: tdi.nii)
        The output filename for the tracks in TrackVis (.trk) format

Outputs:

out_file: (an existing file name)