Automation of multiple Fibertrack saves

Viewing 7 reply threads
  • Author
    • #4747

      Dear Hivemind,

      I am using Brainsuite to analyze the fibertracks of 107 subjects.
      Is there a way to automate the saving of multiple fibertracks for each subject?

      I have 36 ROI´s (e.g. Putamen to Thalamus, etc.) that I wanna save with Brainsuite.
      Is there a way to “give” Brainsuite a list to save all selected ROI´s?

      At the moment it is very time intensive to click through the whole process to save so many ROI´s for so many subjects, if there is any way to make it faster, I´d really appreciate your input!

    • #4749
      David Shattuck

      Hello –

      I have written some command-line tools that can probably do this. I thought we were distributing them, but I just checked and they aren’t in the public release yet.

      Can you be more specific about what you are trying to do and what steps you are taking? Are you trying to give it pairs of ROIs and save out a .dft file?


    • #4750

      Hi David,
      thanks for the quick reply!

      I am trying to single out selected fiber tracks and save them for further FA and MD calculations with TractConnect, but on a larger scale.
      At the moment I am manually selecting the desired fibertracks using the computed tracks from the connectivity matrix, and then saving the filtered fiber tracks (e.g. L. Insula to L. Amygdala) as a BrainSuite Track File (*dft).
      What I am looking for now is a way to not click through this process manually for each of my predefined fiber tracks.

    • #4751
      David Shattuck

      If you send an email to support at, I’ll see what I can do. Let me know what platform (Mac/Win/Linux) you are using.


    • #4796


      I am still waiting for a response.

      Kind regards,


    • #4799
      David Shattuck

      hi Adrien –

      I’m working on it — still need to do some testing. Will follow up by email soon with a few questions.


    • #4803

      Thanks for the update, really appreciate it!

    • #4824
      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
Viewing 7 reply threads
  • You must be logged in to reply to this topic.