nipype.interfaces.dipy.tracks module

StreamlineTractography

Link to code

Bases: DipyBaseInterface

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() 
Mandatory Inputs:
  • gfa_thresh (a float) – GFA threshold to compute tracking mask. (Nipype default value: 0.2)

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

  • min_angle (a float) – Minimum separation angle. (Nipype default value: 25.0)

  • multiprocess (a boolean) – Use multiprocessing. (Nipype default value: True)

  • num_seeds (an integer) – Desired number of tracks in tractography. (Nipype default value: 10000)

  • peak_threshold (a float) – Threshold to consider peaks from model. (Nipype default value: 0.5)

  • save_seeds (a boolean) – Save seeding voxels coordinates. (Nipype default value: False)

Optional Inputs:
  • in_model (a pathlike object or string representing an existing file) – Input f/d-ODF model extracted from.

  • in_peaks (a pathlike object or string representing an existing file) – Peaks computed from the odf.

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

  • seed_coord (a pathlike object or string representing an existing file) – File containing the list of seed voxel coordinates (N,3).

  • seed_mask (a pathlike object or string representing an existing file) – Input mask within which perform seeding.

  • tracking_mask (a pathlike object or string representing an existing file) – Input mask within which perform tracking.

Outputs:
  • gfa (a pathlike object or string representing a file) – The resulting GFA (generalized FA) computed using the peaks of the ODF.

  • odf_peaks (a pathlike object or string representing a file) – Peaks computed from the odf.

  • out_seeds (a pathlike object or string representing a file) – File containing the (N,3) voxel coordinates used in seeding.

  • tracks (a pathlike object or string representing a file) – TrackVis file containing extracted streamlines.

TrackDensityMap

Link to code

Bases: DipyBaseInterface

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()                                   
Mandatory Inputs:

in_file (a pathlike object or string representing an existing file) – The input TrackVis track file.

Optional Inputs:
  • data_dims (a list of from 3 to 3 items which are an integer) – The size of the image in voxels.

  • out_filename (a pathlike object or string representing a file) – The output filename for the tracks in TrackVis (.trk) format. (Nipype default value: tdi.nii)

  • points_space (‘rasmm’ or ‘voxel’ or None) – Coordinates of trk file. (Nipype default value: rasmm)

  • reference (a pathlike object or string representing an existing file) – A reference file to define RAS coordinates space.

  • voxel_dims (a list of from 3 to 3 items which are a float) – The size of each voxel in mm.

Outputs:

out_file (a pathlike object or string representing an existing file)