Reply To: Automation of multiple Fibertrack saves

David Shattuck

Hi Adrien –

It took a little longer than expected because we have been preparing a major release of BrainSuite (v23a, out now), as well as an updated BrainSuite BIDS App. We were making some improvements to the underlying methods, including some optimizations in how the streamline filtering is performed.

The new package includes a program call filterdft, which is in the bin directory. You can use it to perform all of the filtering options that are available in the GUI. These are performed (in order, but the order shouldn’t matter):

* remove streamlines shorter than the length threshold if specified (-l setting)
* remove streamlines that intersect labels in the exclude list (specified as –exclude # # #)
* remove streamlines based on spherical ROI filters if specified (uses an xml file)
* remove streamlines unless they intersect labels in the include list (specified as –include # # #)

By default, it will use an or operation for the final check, so if you wanted to include all streamlines that intersect the superior frontal gyri, you would run:

filterdft -i input.dft -o output.dft --include 120 121

You can use the –and flag if you want to have the streamlines go through *all* labels specified, e.g,. if you want to find streamlines that connect the brainstem (800) and cerebellum (900), you would use:

filterdft -i input.dft -o output.dft --include 800 900 --and

The full set of options is listed below.

Let me know if that provides the functionality that you need.


usage: filterdft [settings]

required settings:
-i                       input file
-o                       output file
-l filename                    label volume (must be 16-bit)

optional settings:
--license                      show the license information
-g                             debug
-v                      verbosity [default: 0]
--length length                length threshold [default: 0]
--include           labelID1 ...  labelIDN (include these labels)
--exclude           labelID1 ...  labelIDN (exclude these labels)
--and                          tracks must pass through all labels in include list
--dont-merge                   don't merge cortical gm/wm labels
-s filename                    sphere ROI xml file