Documentation‎ > ‎

Fiber Tracking


DSI Studio uses a deterministic fiber tracking algorithm that uses quantitative anisotropy to obtain tractography [4]. A recent study has shown that DSI Studio's tracking method achieved the highest valid connection among other fiber tracking approaches   (see the 92% valid connection achieved by ID:03 at 96 methods submitted from 20 different research groups in an open competition (paper see In comparison, probabilistic fiber tracking has very low percentage of valid connections. It is good at getting all possible connections but the high percentage of false connections can render a questionable tracking result. 

The choice of a fiber tracking method is thus determined by the application. Deterministic fiber tracking is more like a "maximum likelihood estimation" of the fiber tracks. It tends to give the best estimation. By contrast, probabilistic fiber tracking provides the "empirical distribution" of the fiber tracks. It gives a distribution but there will only be one correct answer. If the purpose of a study is to find the most likely route of a fiber pathway, deterministic fiber tracking will offer a better result. If the purpose is to explore all possible connections between regions, probabilistic fiber tracking is better.

To run the tracking algorithm in DSI Studio, open the main window and click a button named "STEP3 Tractography". Select a ".fib" file to bring up the tracking window. To the left side, there is a region window presenting pixels with resolved directions in different color coding and background grayscale anisotropy map. To the right side, there is a visualization panel in the right upper corner to change the rendering options. At the bottom, there is a track bar to select slices and also a status bar showing the information at the current pixel.
The steps to create a tractography are as follows
1. Assign regions as seeding areas/region of interest/region of avoidance/ending regions.
2. Setup tracking options
3. Start tracking

The information for each process is detailed in the following sections.

Step1. Assign Regions

Manually draw a region

You can manually draw a region in the region window to the left. A tool bar on the top showing different drawing tool. To draw a region in the region window, left-click in the window and drag to create a new region. Any further click will add voxels to the existing region. To remove part of a region, right click to assign the region to be erased. 

The function of each tool is detailed as follows:
1. The rectangle tool draws a rectangular region.
2. The free-handle tool draws shape using the cursor trajectory.
3. The polygon tool draws a polygon region.
4. The ball bool draws a ball in the 3D space.
5. The cubic tool draws a cubic in the 3D space.
6. The all way cross tool allows for moving a region.
7. The ruler can be used to estimate the distance in mm. 

The region can be assigned as "seed","ROI","ROA",...etc. Please note that the region mentioned here are actually a set of voxels stored by their coordinates.

Load from atlases

DSI Studio provides a handy list of atlases that can be added to the region list. Users can add a known anatomy by click on the "atlas" button in the "Region List" window. The atlas is mapped to subject space by nonlinear registration between the anisotropy map and the atlas included in the DSI Studio package. 

The atlases include the following:

FreeSurferDKT            DKT cortical labeling protocol with sulcus landmarks on FreeSurfer’s fsaverage surface. (source)
OASIS-TRT-20            OASIS-TRT-20 joint fusion atlas in MNI152 space. (source)

Load from text coordinate files

DSI studio can load ROIs from a text file of the ROI coordinates. The coordinates should be integers (floating point will be rounded up) because the coordinates indicate the "voxel" of the seeding regions. Users should be noted that the actual seeding points are uniformly distributed "within" the seeding region. The coordinates here may not necessarily match the exact seeding points in the tracking algorithm.

Load from nifti files

An ROI file in the nifti format can be loaded in DSI Studio. The nifti file can be loaded by three different ways.

1. If the image size of the nifti matches the diffusion data, then no image resampling is applied. The image volume will be flipped in x-direction if the sform(0,0) is positive, and be flipped in y-direction if the sform(1,1) is positive. 

2. If the ROI file is originated from a structural image (e.g. T1-weighted or T2-weighted image), then you need to first insert the original structural image (e.g. T1-weighted or T2-weighted images) by [Slices][Insert T1/T2]. DSI Studio will do a background registration, which may take 5 minutes to converge. After the registration is stablized, users can load the ROI file, and DSI Studio will automatically apply the registration from the previous structural image. The transformation matrix in the nifti header will not beused here.

3. If the nifti file is in the MNI space, you may place the file under the atlas folder. DSI Studio will use it as an atlas. A background nonlinear registration will be conducted that allows warpping the ROI to the subject space.

DSI Studio can take the nifti file with multiple values as multiple ROIs. You can supply a label file with the nifti file. An example of the label file can be found under the "atlas" folder in the DSI Studio package.

Modifying regions

You may modify the region by a right lick on the region list window and expand the submenu under "modify current region." The modification includes shitting the region in x, y, or z-direction. Flip x, flip y, or flip z correct the orientation problem. There is also expansion function that expand the current region. Other functions include erosion, smoothing, negate, and defragment.

To perform ROI1+ROI2, use [Region][Merge all].

To perform ROI1-ROI2, first "negate" ROI1, and then merge negated ROI1 with ROI2, and then negate the merged regions.

Export quantitative index in the region

Once you draw an ROI or ROA, you may export the quantitative indices (e.g. FA, ADC, ...etc) inside the regions by selecting [Regions][Save Region Data As]. The exported information is a text file including the coordinates and the corresponding values for the indices

Region Types

There are several region types available to control fiber tracking


This option indicates that the voxels are to be used as the starting area for fiber tracking algorithm. The tracking algorithm will place starting points within these voxels at subvoxel resolution. The actual seeding points are determined randomly and uniformly within the seeding regions. DSI Studio uses a deterministic random generator to place the seeds, and thus the seeding sequence is both deterministic and random. This ensures that the tracking result is reproducible using the same tracking parameters. Specifically, DSI Studio randomly selects a seed voxel. Then, within the voxel, DSI Studio draws three random numbers between 0 and 1 using a uniform distribution. These three floating numbers are then used as the starting point within the selected voxel.

To edit the seeding area, press the left mouse button to assign the area. To unselect, press right mouse button. 

Region of interest (ROI) & region of avoidance (ROA)

Once a new region is added, there will be an item appeared on the region list, where you may find a combo box (labeled "ROI") with a drop menu that can switch the "type" of the region.

ROI is used to "filter in" the tracks that pass through the region, whereas ROAs "filter out" the tracks. Multiple ROI and ROA could be used in combination to fulfill a complicated tracking demand. For example, if there are two ROIs, the tracks that pass through
both of the regions are selected.

*Text file, Analyze, and NIFTI format are supported for input seeding, ROI, or ROA.

End region & terminative region

An "End" region selects tracts that are ended (not passing) in the "end" region. If one ending region is assigned, then only the tracks ended within the regions are preserved. If two end regions are assigned, then the tracks ended in both regions are preserved. Please note that the "end" region, unlike the terminative region, does not affect the termination of the tracking algorithm. It simply selects the tracts that end in it.

A terminative region terminates any tracts as soon as they enter it. It change the behavior of a tracking algorithm and force tracking to terminate. A terminative region is useful if one is to study the tracts that project to a nucleus or a specific cortical area. A terminative region does not allow tract to pass through it, which is very different from an "end" region.

A terminative region can be used to terminate a track if the anisotropy level is greater than a threshold. The steps are the following: (1) In the options window, set the anisotropy threshold to the maximum value (2) click on [Region][Whole Brain seeding]. This creates a region with FA greater than the threshold (3) Change the region type to "terminative" (4) Setting the Fanisotropy threshold back to the minimum value (5) Do fiber tracking.

Step2. Setup Tracking Parameters

Anisotropy threshold

This parameter determines the threshold for fiber termination. In DTI, FA is used as the index for the filter to determine the fiber threshold. In DSI, QBI, GQI, the fiber threshold is based on the quantitative anisotropy (QA), which is defined for each resolved fiber orientation. The definition of QA is documented in the GQI paper [3].

It is noteworthy that the anisotropy threshold is used as a mask to filter out background voxel. As a result, the estimated along track FA/QA index estimated will be affected by the fiber threshold.

The initial value of this threshold is determined automatically using 0.6 * (Otsu's threshold). Otsu's method calculates the optimal separation threshold that maximizes the variance between the background and foreground. 

If a threshold of 0 is assigned, DSI Studio will use a randomly selected threshold from [0.5 Otsu, 0.7 Otsu].

Max angle

This threshold serves as a termination criterion. If two consecutive moving directions have crossing angle above this threshold, the tracking will be terminated.

Assign 0 to do a random selection from 15 degrees to 90 degrees

Step size

Step size defines the moving distance in each tracking interval. This unit is in millimeter scale. The default setting is the half of the spatial resolution.

Assign 0 to do a random selection of the step size from 0.1 voxel to 1 voxel distance


Smoothing serves like a "momentum". For example, if smoothing is 0, the propagation direction is independent of the previous incoming direction. If the smoothing is 0.5, each moving direction remains 50% of the "momentum", which is the previous propagation vector. This function makes the tracks appeared smoother. In implementation detail, there is a weighting sum on every two consecutive moving directions. For smoothing value 0.2, each subsequent direction has 0.2 weighting contributed from the previous moving direction and 0.8 contributed from the income direction. To disable smoothing set its value to 0.

Assign 1.0 to do a random selection of the value from 0% to 95%.

Min and Max Length Constraint

Length Constraint filters out the tracks that are either too short or too long.

Primary orientation versus all orientations 

Specify the starting orientation of the seeds. "Primary orientation" starts the tracking from the primary fiber of a seeding point, whereas "all orientation" may start from a branching fiber.

The "primary" approach always starts the tracking from then most prominent fiber in a voxel. The advantage of "primary" is the stableness and consistency of the results. However, it is possible that the tracks that you are interested in are minor branches and may not be successfully tracked using "primary" setting. A way to compensate for this drawback is using whole brain seeding to explore all possible connections.

The "random" approach starts the tracking a randomly selected fiber orientation, so the results have random factor. The advantage is that "random" can explore all possibility, but the drawback is that the results may not be reproduced exactly. The tracking results are also sensitive to noisy fibers because the a false fiber orientation can be selected as the starting direction.

The "all" approach starts a track for each fiber orientation resolved in a voxel. It aims to explore all possible connection and there are no stochastic factors that may hurt the reproducibility. The drawback is that "all" setting is sensitive to noisy fibers because all resolved fiber orientations will be used as the starting directions.

Subvoxel versus voxel

Specify the seeding strategy. "Subvoxel" conducts subvoxel seeding and each seed voxel may have infinite seeding locations within the voxel. "Voxel" places the seeding location at the center of a seed voxel.


The interpolation method used in estimating the fiber orientation.

Tracking Method

The deterministic fiber tracking method [4] is the default method for fiber tracking. Runge-Kutta method[1] is a higher order tracking method similar to the default Euler approach. 

5000 Tracts v.s. 5000 Seeds

This tracking plan determines when the tracking should stop. The default options are seeding until the total amount of fibers reaches the assigned number. Another option is to have a fixed number of seeds placed in the seeding area. One should note that the generated fibers may be less than the seeds because 
some fibers will be discarded due to length constraint, ROI, ROA, and End point settings.

Thread Count

DSI Studio supports multithread fiber tracking, which can boost the performance on a computer with multiple core CPU. Assign the thread count in accord with the possible computation power to obtain the highest efficiency. 

Step3. Perform fiber tracking and save tract coordinates

Click the start tracking button to perform tracking, and input the tract count or the seeding number. The fiber trajectories can be saved using [Tracts][Save Tracts As]. The output format can be a text file that stores the coordinates of each fiber track. The coordinates of each fiber trajectory are stored in one line. The x y z coordinates are list sequentially:

x1 y1 z1 x2 y2 z2 ... xn yn zn               <---first tract
x1 y1 z1 x2 y2 z2 ... xn yn zn               <---second

The result can also be exported as TrackVis .trk format. The specification for the trk format is detailed on the TrackVis website.

The tracjectories can be saved as a Matlab MAT version 4 format. The coordinates of all tracts are stored in a matrix named "tracts". The numbers of coordinates for each fiber are stored in a matrix named "length". The coordinates of the first trajectory are stored in tracts(:,1:length(1)), and the second in tracts(:,length(1)+1,length(1)+length(2)).

To save the tracts data in MAT version 4 format. Use the command save tract.mat -v4

One should note that [Tracts][Save Tracts As] saves only the current selected fiber bundles. To save tracts of different clusters at one, use [Tracts][Save All Tracts As...].

DSI Studio saves tracks in the native diffusion space. The coordinates are voxel coordinates started from (0,0,0) at the most left/anterior/bottom point of the image volume. The orientation is (+right,+posterior, +top). For example, (1,2,3) = [the left most 1st voxel, the most anterior second voxel, the bottom 3rd voxel].

Tips and Examples: 

1. Use "whole brain seeding" always. DSI Studio will assign whole brain seeding if you do not specify a seed region. Please note that the tracking algorithm starts from the seeding point and track in two directions until it reaches the ending points. In most of the cases, the seeding point is not the end points of the trajectory.

2. To track trajectories connecting between two brain regions, place two "end" regions, one on each of them. DSI Studio will find the trajectories that end in these two regions. 

3. An "end" region is more restrictive than a "roi". A "roi" allows tracks to pass through, whereas the end region requires that the trajectories end in them. If you cannot find connections using two end regions, try setting them as roi.

4. To force track to terminate if the anisotropy threshold is "greater" than a value. First, set up the threshold to the designated value and place whole brain seed by [Regions][Whole Brain Seeding]. In the region list window, change the region type from "Seed" to "Terminative". This will enforce a termination if tracks enter the region. Adjust the threshold to a lower value to initiate fiber tracking. 

Shortcuts and Controls

In the ROI window:

Key "Q" and "A": move sagittal slide
Key "W" and "S": move coronal slide
Key "E" and "D": move axial slide
Key "Z": switch to sagittal view
Key "X": switch to coronal view
Key "C": switch to axial view

Double click: move slices to the pointed location

In the 3D window

Mouse left button: press and rotate the object
Mouse right button: press and change the zoom scale
Mouse mid button: press and move the object (you may also use direction keys to move the object)

Ctrl+A: move ROI or slides in the 3D window (drag)

Alt+1: remember the current viewport and slice position to memory slot 1
1: return to the viewport and slice position recorded in memory slot 1

The same function applies to Alt+2,...Alt+9, and 2,3,...9

Track editing

The following four shortcuts are for tract editing. To edit the tracts, 1) hit the shortcut 2) press left mouse button 3) drag the cursor 4) release the mouse button. If the track selection further considers the income angle, use right mouse button instead. (please refer to here for details)

Ctrl+S: select tracts in the 3D window 
Ctrl+D: delete tracts in the 3D window
Ctrl+P: delete tracts in the 3D window
Ctrl+X: cut tracts in the 3D window (click-drag-release)(cannot undo)

Ctrl+T: trim tracts
Ctrl+Z: undo select and delete
Ctrl+Y: redo select and delete

Program Registry

The parameters are stored in the following directory:

On Unix systems, the following files are used by default:

$HOME/.config/DSI Studio.conf
/etc/xdg/DSI Studio.conf

On Mac OS X versions 10.2 and 10.3, these files are used by default:
$HOME/Library/Preferences/com.labsolver.DSI Studio.plist
On Windows, settings are stored in the following registry paths:
HKEY_CURRENT_USER\Software\Labsolver\DSI Studio


[1] Basser, P.J., Pajevic, S., Pierpaoli, C., Duda, J., Aldroubi, A., 2000. In vivo fiber tractography using DT-MRI data. Magn Reson Med 44, 625-632.
[2] Wedeen, V.J., Wang, R.P., Schmahmann, J.D., Benner, T., Tseng, W.Y., Dai, G., Pandya, D.N., Hagmann, P., D'Arceuil, H., de Crespigny, A.J., 2008. Diffusion spectrum magnetic resonance imaging (DSI) tractography of crossing fibers. Neuroimage 41, 1267-1277.
[3] Yeh FC, Wedeen VJ, Tseng WY. Generalized q-sampling imaging. IEEE Trans Med Imaging 2010;29:1626-1635.
[4] F.-C. Yeh, T. D. Verstynen, Y. Wang, J. C. Fernández-Miranda, and W-Y. I. Tseng, "Deterministic Diffusion Fiber Tracking Improved By Quantitative Anisotropy", PLoS ONE 8(11): e80713. doi:10.1371/journal.pone.0080713 (pdf)