TrackVis is a program for interactively extracting and visualizing tract groups (ROIs) from whole-brain streamline tractography data. It is developed at the Martinos Center at MGH. This page is mainly here to collect the various nifty hacks that I've collected over time.

If you're unfamiliar with TrackVis, here is a basic tutorial demonstrating the general workflow (I recommend clicking on the Vimeo link so you can view it in fullscreen HD on the main site. Otherwise you can't read the details.):

Generic .scene files

One of my favorite things about the .scene plain text XML specification is that it lets you specify file paths relatively. If you use a uniform directory layout, this allows you to store a single “master” .scene file and reuse it in many different situations via symbolic links.

For example, in one of my standard overview scenes I use for each subject, I like to color-code the tract dissections so that the L and R tract groups and associated ROIs all share the same color. I store all of these in my master .scene that includes relative paths to the .trk and background FA map files, and then simply link that into each of my many hundreds of subjects' directories. Now, whenever I open a new subject, their own specific tracts and FA map are shown, but the colors will always be just how I like them. As a bonus, if I want to tweak something about the scene, I only have to change it once in the master file and the edits are instantly shared with all of the linked copies.

Here is an example to show off all the nice uniform colors. With only a single master .scene file, an equivalent custom view can be generated for many different individuals.

Custom color lookup tables

Coloring the streamline vertices by some variable of interest is the most powerful technique for visualizing this type of data. There are 2 main options:

  • Directional: This is the most common setting, where RGB maps to fibers in the XYZ directions, respectively, as well as their combinations. (Property→Track→Color Code→“Directional”)
  • Scalar: It is also very useful to visualize vertex/voxel-wise scalar properties along the tract fibers. For example, within-tract variation in FA could be highlighted. (Property→Track→Color Code→“Scalar”)

Through my work developing along-tract statistics tools, I have also found the flexible TrackVis .trk/.scene framework useful for visualizing other arbitrary scalar measures that I include in my own custom .trk files (for a quick intro on creating custom .trk files, see the Basic workflow along-tract-stats wiki page).

TrackVis already contains several color look-up tables that are good for displaying p-values of one-directional tests (the red/yellow ones), as well as bidirectional effect sizes (the rainbow ones):

However, although you can create a custom 2-color scheme in the GUI, it doesn't include a way to generate the type of bi-directional p-value color scheme that is commonly used in FSL, Freesurfer, and other neuroimaging tools. This method uses warm colors to encode significant p-values for positive effects, and cool colors to encode significant p-values for negative effects. Sub-threshold regions are often greyed-out to avoid clutter.

Fortunately this is easy to do in the .scene file. Here is the XML clipping for the relevant section:

  <ColorStop stop="-0.10001" r="0.5" g="0.5" b="0.5" />
  <ColorStop stop="-0.1"     r="0"   g="0"   b="1" />
  <ColorStop stop="-1e-16"   r="0"   g="1"   b="1" />
  <ColorStop stop="1e-16"    r="1"   g="1"   b="0" />
  <ColorStop stop="0.1"      r="1"   g="0"   b="0" />
  <ColorStop stop="0.10001"  r="0.5" g="0.5" b="0.5" />

And here is an example of how it looks:

neuroimaging/trackvis.txt · Last modified: 2012/02/07 12:04 pm PST by John Colby
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki