-
Notifications
You must be signed in to change notification settings - Fork 34
3) Visualization of Clustered Tracts
Lauren O'Donnell edited this page Apr 6, 2017
·
6 revisions
First install 3D Slicer from www.slicer.org and SlicerDMRI from http://dmri.slicer.org
Please read diffusion MRI analysis tutorial for instructions of software installation: https://github.com/SlicerDMRI/slicerdmri.github.io/blob/master/docs/tutorials/DiffusionMRIanalysis.pdf
- Load output clustered_tracts.mrml file into Slicer. This will load all clusters into the scene.
- The output clusters are vtkPolyData format and could be viewed with other programs that support vtk.
- The percentage of each fiber bundle (cluster) that is visible is controlled by the SubsamplingRatio in the MRML file. If you would like to change this for all tracts at once, the easiest way is to edit the MRML file in a text editor. (Note: the total number of fibers displayed is calculated according to the parameter -mrml_fibers SHOWNFIBERSINSLICER of wm_cluster_atlas.py. This is used to determine an appropriate SubsamplingRatio.)
- Another complementary and useful way to visualize atlas clusters is by running wm_quality_control_tractography.py on the atlas output directory to create html pages displaying all clusters.
- To easily turn on and off and view clusters, use the Models module in Slicer.
- Click "include fibers" to see tracts in the interface.
- Organize and group atlas clusters into regions of interest for your study in the Models module by creating a hierarchy.
- The hierarchy allows measurement from multiple clusters together (e.g. the clusters in the anterior part of the corpus callosum).
- The hierarchy allows visualization of fiber clusters of interest in the atlas and the same clusters in individual subjects.
- Right click or Ctrl-click to add a Hierarchy Node, and use drag and drop to add tracts into the hierarchy.
- Save your hierarchy by saving the scene in Slicer. This will produce a MRML file.
- (Pick Tracts is an alternative but does not yet support hierarchy creation.)
These commands can help extract and visualize a single cluster across multiple subjects, for studies when this is useful
wm_extract_cluster.py
- Extract a single cluster from all subjects, into a new directory. (Not commonly used but useful for some studies).
- This is useful to then run the wm_quality_control in the new directory to compare this cluster across all subjects.
- It is also useful when you would like to measure from just this one cluster, across subjects.
- This command prepends the subject ID to each cluster filename (subject_ID_cluster_number.vtp)
- For example, to extract cluster 170 from all subjects, who were clustered in subdirectories of the all_subjects_clusters directory, and to output the extracted clusters into the new directory cluster_170:
wm_extract_cluster.py 170 all_subjects_clusters cluster_170
wm_create_mrml_file.py
- Create a mrml file that includes all polydata files in the input directory, for easy loading into the Slicer scene.
- This file automatically loads tractography as fiber bundles in Slicer, with unique colors.
- This is helpful for viewing one cluster across subjects, or for any other application where viewing a directory of tractography is needed.
- For visualizing the output of clustering, it is not necessary to run this script. Please use the mrml files that are generated by the clustering because these assign colors according to the fiber cluster atlas.
wm_create_mrml_file.py tract_directory/
- This step can provide a sum image (proportional to group average image) in the group atlas space.
- This is useful for visualizing atlas tracts with images, for publications and for anatomical reference when creating tract hierarchies.
- Only images in each subject's DWI/DTI space should be used (such as FA or b0/baseline images).
- Load all affine and non-rigid transforms (in ITK format) from the groupwise tractography registration (
wm_registermultisubject_faster.py
step). - Load each subject-specific structural volume (either FA or baseline).
- Apply and harden each subject transform to subject-specific volumes in Slicer (see Transforms Module documentation)
- Open the
Cast Scalar Volume
module in Slicer. - Select the first subject volume as input.
- Under
Output Volume
, selectCreate New Volume As...
, and enterAtlas Average
- For
Output Type
, selectDouble
. - Click
Apply
. - Open the
Simple Filters
Slicer module (note: requires SimpleITK, which is available by default in release and nightly builds, but may not be available if your Slicer was built from source). - For the first
Input Volume
selector, choose the second subject volume. - For the second
Input Volume
selector, chooseAtlas Average
. - For the
Output Volume
selector, chooseAtlas Average
. - Click
Apply
. - Now select the third subject volume with the first
Input Volume
selector, andApply
; select the forth subject volume,Apply
, etc. Continue until all subject volumes have been added.