Differences between revisions 54 and 55
Deletions are marked like this. Additions are marked like this.
Line 25: Line 25:
Our subject was pretty well-behaved. These motion measures can be used to ensure that groups of subjects are matched with respect to head motion, or to introduce head motion as a nuissance regressor in group analyses. For more information, see [[http://www.sciencedirect.com/science/article/pii/S1053811913011312|Yendiki et al. 2013.]] Our subject was pretty well-behaved. These motion measures can be used to ensure that groups of subjects are matched with respect to head motion, or to introduce head motion as a nuissance regressor in group analyses. For more information, see [[http://www.sciencedirect.com/science/article/pii/S1053811913011312|Yendiki et al. 2014.]]
Line 28: Line 28:
Even though TRACULA relies on the ball-and-stick model instead of the tensor model to reconstruct tracts, the outputs of the tensor fit, especially anisotropy and diffusivity maps, are still useful for group analysis. In addition to the tract-based analysis that can be performed on the tract-based averages of anisotropy and diffusivity, the same maps could also be used for other voxel-based and ROI-based group analyses. The maps can be viewed/analyzed in either native space or template space (MNI or CVS, depending on what template was specified). We'll take a look at both. Even though TRACULA relies on the ball-and-stick model instead of the tensor model to reconstruct tracts, the outputs of the tensor fit, especially anisotropy and diffusivity maps, are still useful for group analysis. In addition to the tract-based analysis that can be performed on the tract-based averages of anisotropy and diffusivity, the same maps could also be used for ROI-based or even voxel-based group analyses.
Line 31: Line 31:
The diffusion tensor reconstruction files in native space can be found in the '''dmri''' directory which was created when {{{trac-all -prep}}} was run. Let's {{{cd}}} into that directory for subject elmo.2012: The maps produced by the diffusion tensor fit can be found in the '''dmri''' directory which was created when {{{trac-all -prep}}} was run. Let's {{{cd}}} into that directory for subject elmo.2012:
Line 49: Line 49:
One can use {{{freeview}}} to view the FA image for elmo.2012 in native space. You can do this with the command below: One can use {{{freeview}}} to view the FA image for elmo.2012, overlaid with the anatomical segmentation mapped from T1 to diffusion space. This is a good way to check the quality of the intra-subject registration. You can do this with the command below:
Line 52: Line 52:
freeview $TUTORIAL_DATA/diffusion_tutorial/elmo.2012/dmri/dtifit_FA.nii.gz & freeview $TUTORIAL_DATA/diffusion_tutorial/elmo.2012/dmri/dtifit_FA.nii.gz \
         $TUTORIAL_DATA/diffusion_tutorial/elmo.2012/dlabel/diff/aparc+aseg.bbr.nii.gz:colomap=lut:opacity=.4
&
Line 56: Line 57:
Note: The above assumed that bbregister was used for the intra-subject registration. If FLIRT was used, the transformed FA map would be called {{{aparc+aseg.flt.nii.gz}}} instead.
Line 58: Line 61:
=== Outputs in MNI space ===
The images described above are generated in the subject's native diffusion space. If you wanted to overlay FA maps of different subjects, they would have to be transformed to a common space (MNI or CVS). As an example, we will look at the FA maps in MNI space.

The resampling of the output volumes of the tensor fit to MNI space is performed as part of the tensor-fitting step in TRACULA preprocessing. This resampling involves:

 * First, mapping the volumes from the individual's diffusion space to the individual's anatomical space (using either bbregister or FLIRT, whichever was specified for intra-subject registration in the configuration file).
 * Second, mapping the volumes from the individual's anatomical space to the space of the MNI template.

Among outputs of the tensor fit, only the scalar maps, i.e., all outputs except the eigenvectors, are transformed to the template space. You can find these volumes mapped to the MNI template in the following directory:

{{{
cd $TUTORIAL_DATA/diffusion_tutorial/elmo.2012/dmri/mni/
}}}
To check the registration of the FA image to the MNI template in freeview, use the command below:

{{{
freeview -v $FSLDIR/data/standard/MNI152_T1_1mm_brain.nii.gz \
            $TUTORIAL_DATA/diffusion_tutorial/elmo.2012/dmri/mni/dtifit_FA.bbr.nii.gz &
}}}
Note: The above assumed that bbregister was used for the intra-subject registration. If FLIRT was used, the transformed FA map would be called {{{dtifit_FA.flt.nii.gz}}} instead.

To see the correspondence between the FA in MNI space and the MNI template and check the accuracy of the registration, toggle between the two images by using the 'Alt + C' hot key.
To see the correspondence between the FA and anatomical segmentation in diffusion space and check the accuracy of the intra-subject registration, toggle between the two images by using the 'Alt + C' hot key.
Line 85: Line 67:
You can make one of the views bigger by choosing the 1x1 button ( {{attachment:FreeviewGuide/FreeviewGeneralUsage/FreeviewQuickStart/layout_1x1.gif}} ). Use the orientation buttons to switch the plane ( {{attachment:FreeviewGuide/FreeviewGeneralUsage/FreeviewQuickStart/view_sagittal.gif}} , {{attachment:FreeviewGuide/FreeviewGeneralUsage/FreeviewQuickStart/view_coronal.gif}} , {{attachment:FreeviewGuide/FreeviewGeneralUsage/FreeviewQuickStart/view_axial.gif}} , {{attachment:FreeviewGuide/FreeviewGeneralUsage/FreeviewQuickStart/view_3d.gif}} ). Put your cursor at the edge of a gyrus or ventricle as a landmark before toggling back and forth between the two volumes. Scroll through the slices and try it again on a different section of the brain. Notice how accurate the registration is - the anatomy in the individual subject's image lines up well with the anatomy in the template's image. When you are done, be sure to close freeview again. You can make one of the views bigger by choosing the 1x1 button ( {{attachment:FreeviewGuide/FreeviewGeneralUsage/FreeviewQuickStart/layout_1x1.gif}} ). Use the orientation buttons to switch the plane ( {{attachment:FreeviewGuide/FreeviewGeneralUsage/FreeviewQuickStart/view_sagittal.gif}} , {{attachment:FreeviewGuide/FreeviewGeneralUsage/FreeviewQuickStart/view_coronal.gif}} , {{attachment:FreeviewGuide/FreeviewGeneralUsage/FreeviewQuickStart/view_axial.gif}} , {{attachment:FreeviewGuide/FreeviewGeneralUsage/FreeviewQuickStart/view_3d.gif}} ). Put your cursor at the edge of a gyrus or ventricle as a landmark before toggling back and forth between the two volumes. Scroll through the slices and try it again on a different section of the brain. Notice how accurate the registration is - the subject's anatomy should line up well between the FA map and the segmentation. When you are done, be sure to close freeview again.
Line 89: Line 71:
To visualize the posterior distribution of the inferior longitudinal fasiculus (ILF), assuming the default options were used for registration (bbregister and MNI), do the following: To visualize the posterior distribution of the inferior longitudinal fasiculus (ILF), do the following:
Line 96: Line 78:
Click on the 3D button ( {{attachment:FreeviewGuide/FreeviewGeneralUsage/FreeviewQuickStart/view_3d.gif}} )to view the tract. Use the 1x1 button ( {{attachment:FreeviewGuide/FreeviewGeneralUsage/FreeviewQuickStart/layout_1x1.gif}} ) to make it fill the window. You can rotate the image by grabbing it with the mouse and dragging. You can also move the slice planes by grabbing those and dragging them out of the way. Hold down the right mouse button and push the mouse forward for a smooth zoom inwards.
Note: The above assumed that bbregister was used for the intra-subject registration and affine registration to MNI space was used for the inter-subject alignment. If anything else was used, {{{bbr}}} and {{{mni}}} would have to be adjusted accordingly.

Click on the 3D button ( {{attachment:FreeviewGuide/FreeviewGeneralUsage/FreeviewQuickStart/view_3d.gif}} )to view isosurfaces of the left and right ILF. Use the 1x1 button ( {{attachment:FreeviewGuide/FreeviewGeneralUsage/FreeviewQuickStart/layout_1x1.gif}} ) to make it fill the window. You can rotate the image by grabbing it with the mouse and dragging. You can also move the slice planes by grabbing those and dragging them out of the way. Hold down the right mouse button and push the mouse forward for a smooth zoom inwards.
Line 106: Line 91:
You can also adjust the heatmap thresholds for the posterior distribution of ILF. You'll want to go back to the non-3D views ( {{attachment:FreeviewGuide/FreeviewGeneralUsage/FreeviewQuickStart/view_sagittal.gif}} , {{attachment:FreeviewGuide/FreeviewGeneralUsage/FreeviewQuickStart/view_coronal.gif}} , {{attachment:FreeviewGuide/FreeviewGeneralUsage/FreeviewQuickStart/view_axial.gif}} ) to see the effect. You can also adjust the heatmap thresholds for the posterior distribution of the ILF. You'll want to go back to the non-3D views ( {{attachment:FreeviewGuide/FreeviewGeneralUsage/FreeviewQuickStart/view_sagittal.gif}} , {{attachment:FreeviewGuide/FreeviewGeneralUsage/FreeviewQuickStart/view_coronal.gif}} , {{attachment:FreeviewGuide/FreeviewGeneralUsage/FreeviewQuickStart/view_axial.gif}} ) to see the effect.
Line 110: Line 95:
Close Freeview when you are done. Close freeview when you are done.
Line 119: Line 104:
Move around in Freeview to find the location in this screenshot, or look for an area that interests you.
Move around in freeview to find the location in this screenshot, or look for an area that interests you.
Line 129: Line 115:
When you are done, close Freeview. When you are done, close freeview.
Line 138: Line 124:
 * View tensor fit outputs (in Freeview) in native space and MNI space
 * Check registration of tensor fit outputs (e.g, FA) to MNI space
 * Visualize and manipulate tractography outputs (in Freeview)
 * View the maps output by the tensor fit (''e.g.,'' FA) in freeview
 * Overlay these with the anatomical segmentation to check the intra-subject registration
 * Visualize and manipulate tractography outputs in freeview

Back to list of all tutorials | Back to course page | Previous | Next

TRACULA Outputs

Remember...

For each new terminal that you open, you must do:

export SUBJECTS_DIR=$TUTORIAL_DATA/diffusion_recons
cd $TUTORIAL_DATA/diffusion_tutorial


Outputs from quality assessment

The diffusion MRI contrast is designed to detect the microscopic motion of water molecules. Unfortunately this makes diffusion MRI particularly sensitive to head motion. Head motion does not result only in misalignment between consecutive DWIs, which could be corrected by registering the DWIs to each other. It can also alter the intensities of the DWIs, and this cannot be corrected by registration. The quality assessment step in TRACULA computes four measures of head motion that summarize the above effects. To see an example of these motion measures for one scan, run:

cat $TUTORIAL_DATA/diffusion_tutorial/elmo.2012/dmri/dwi_motion.txt

This file contains four values: the average volume-by-volume translation, the average volume-by-volume rotation, the percent of slices with excessive intensity drop-out, and the average drop-out score for slices with excessive intensity drop-out. Excessive intensity drop-out can be identified by slices that are dark, or even completely black, adjacent to normal looking slices.

AvgTranslation AvgRotation PercentBadSlices AvgDropoutScore
0.495785 0.00404153 0 1

Our subject was pretty well-behaved. These motion measures can be used to ensure that groups of subjects are matched with respect to head motion, or to introduce head motion as a nuissance regressor in group analyses. For more information, see Yendiki et al. 2014.

Outputs from tensor fit

Even though TRACULA relies on the ball-and-stick model instead of the tensor model to reconstruct tracts, the outputs of the tensor fit, especially anisotropy and diffusivity maps, are still useful for group analysis. In addition to the tract-based analysis that can be performed on the tract-based averages of anisotropy and diffusivity, the same maps could also be used for ROI-based or even voxel-based group analyses.

Outputs in native diffusion space

The maps produced by the diffusion tensor fit can be found in the dmri directory which was created when trac-all -prep was run. Let's cd into that directory for subject elmo.2012:

cd $TUTORIAL_DATA/diffusion_tutorial/elmo.2012/dmri

You can find all outputs from the tensor fit in this directory by using the ls command. The output maps are explained below:

  1. dtifit_FA.nii.gz - Fractional Anisotropy
  2. dtifit_MD.nii.gz - Mean Diffusivity
  3. dtifit_MO.nii.gz - Mode of the Anisotropy
  4. dtifit_S0.nii.gz - Non-Diffusion weighted image
  5. dtifit_L1.nii.gz - Primary Eigenvalue
  6. dtifit_L2.nii.gz - Secondary Eigenvalue
  7. dtifit_L3.nii.gz - Tertiary Eigenvalue
  8. dtifit_V1.nii.gz - Primary Eigenvector
  9. dtifit_V2.nii.gz - Secondary Eigenvector
  10. dtifit_V3.nii.gz - Tertiary Eigenvector

One can use freeview to view the FA image for elmo.2012, overlaid with the anatomical segmentation mapped from T1 to diffusion space. This is a good way to check the quality of the intra-subject registration. You can do this with the command below:

freeview $TUTORIAL_DATA/diffusion_tutorial/elmo.2012/dmri/dtifit_FA.nii.gz \
         $TUTORIAL_DATA/diffusion_tutorial/elmo.2012/dlabel/diff/aparc+aseg.bbr.nii.gz:colomap=lut:opacity=.4 &

dtifit_FA_NewScreenshot.jpg/FA_nativespace.jpg

Note: The above assumed that bbregister was used for the intra-subject registration. If FLIRT was used, the transformed FA map would be called aparc+aseg.flt.nii.gz instead.

Hover your mouse on different voxels throughout the image and notice the FA value change in the bottom toolbar. Look for areas of low FA and areas of high FA. Scroll through the slices using the Page Up and Page Down buttons (or up and down arrows). Feel free to change the contrast by holding down Shift and the left mouse button while dragging the mouse across the viewer window. When you are done, hit the X in the top right to close freeview.

To see the correspondence between the FA and anatomical segmentation in diffusion space and check the accuracy of the intra-subject registration, toggle between the two images by using the 'Alt + C' hot key.

Alternatively, you can adjust the opacity:

FsTutorial/TraculaOutputs(CVS)/freeview_opacity.jpg

You can make one of the views bigger by choosing the 1x1 button ( FreeviewGuide/FreeviewGeneralUsage/FreeviewQuickStart/layout_1x1.gif ). Use the orientation buttons to switch the plane ( FreeviewGuide/FreeviewGeneralUsage/FreeviewQuickStart/view_sagittal.gif , FreeviewGuide/FreeviewGeneralUsage/FreeviewQuickStart/view_coronal.gif , FreeviewGuide/FreeviewGeneralUsage/FreeviewQuickStart/view_axial.gif , FreeviewGuide/FreeviewGeneralUsage/FreeviewQuickStart/view_3d.gif ). Put your cursor at the edge of a gyrus or ventricle as a landmark before toggling back and forth between the two volumes. Scroll through the slices and try it again on a different section of the brain. Notice how accurate the registration is - the subject's anatomy should line up well between the FA map and the segmentation. When you are done, be sure to close freeview again.

Tractography outputs

Visualizing the probability distribution of single white-matter pathways

To visualize the posterior distribution of the inferior longitudinal fasiculus (ILF), do the following:

freeview -v $TUTORIAL_DATA/diffusion_tutorial/elmo.2012/dmri/dtifit_FA.nii.gz \
            $TUTORIAL_DATA/diffusion_tutorial/elmo.2012/dpath/rh.ilf_AS_avg33_mni_bbr/path.pd.nii.gz:colormap=heat:isosurface=0,0:color='Red':name=rh.ilf \
            $TUTORIAL_DATA/diffusion_tutorial/elmo.2012/dpath/lh.ilf_AS_avg33_mni_bbr/path.pd.nii.gz:colormap=heat:isosurface=0,0:color='Red':name=lh.ilf

Note: The above assumed that bbregister was used for the intra-subject registration and affine registration to MNI space was used for the inter-subject alignment. If anything else was used, bbr and mni would have to be adjusted accordingly.

Click on the 3D button ( FreeviewGuide/FreeviewGeneralUsage/FreeviewQuickStart/view_3d.gif )to view isosurfaces of the left and right ILF. Use the 1x1 button ( FreeviewGuide/FreeviewGeneralUsage/FreeviewQuickStart/layout_1x1.gif ) to make it fill the window. You can rotate the image by grabbing it with the mouse and dragging. You can also move the slice planes by grabbing those and dragging them out of the way. Hold down the right mouse button and push the mouse forward for a smooth zoom inwards.

Click on either rh.ilf or lh.ilf, and you can play with the isosurface threshold to change the smoothness of the isosurface.

height="70px",width="270px"

Try to make the tracts look similar to the screenshot below.

Tracula_output2.png

You can also adjust the heatmap thresholds for the posterior distribution of the ILF. You'll want to go back to the non-3D views ( FreeviewGuide/FreeviewGeneralUsage/FreeviewQuickStart/view_sagittal.gif , FreeviewGuide/FreeviewGeneralUsage/FreeviewQuickStart/view_coronal.gif , FreeviewGuide/FreeviewGeneralUsage/FreeviewQuickStart/view_axial.gif ) to see the effect.

height="158px",width="259px"

Close freeview when you are done.

Visualizing the probability distributions of all white-matter pathways simultaneously

TRACULA also outputs a merged 4D volume, which is a concatenation of the probability distributions of all the pathways that were reconstructed. To visualize all pathways at once, open this merged 4D volume in freeview using the -tv option:

freeview -tv $TUTORIAL_DATA/diffusion_tutorial/elmo.2012/dpath/merged_avg33_mni_bbr.mgz \
         -v $TUTORIAL_DATA/diffusion_tutorial/elmo.2012/dmri/dtifit_FA.nii.gz &

Move around in freeview to find the location in this screenshot, or look for an area that interests you.

height="233px",width="405px"

The lower-left corner of the freeview display gives the color lookup table for all the tracts. The tracts in the merged volume are displayed at 20% of their maximum threshold, by default. Hence the posterior distribution of some of the tracts may not be displayed in its entirety. The threshold for each tract can be adjusted in the 3D and non-3D views by selecting a specific tract from the lookup table and adjusting the threshold button at the bottom of the freeview diplay panel (between 1 and 100).

select_tract.jpg

4d_tract_thresh.jpg

When you are done, close freeview.

Now that you've seen what the output looks like, you can take a look at the resulting stats for each tract by clicking on the Next button below.


Summary

By the end of this page, you should know how to:

  • Check head motion measures
  • View the maps output by the tensor fit (e.g., FA) in freeview

  • Overlay these with the anatomical segmentation to check the intra-subject registration
  • Visualize and manipulate tractography outputs in freeview

Back to list of all tutorials | Back to course page | Previous | Next

FsTutorial/TraculaOutputs (last edited 2023-07-17 02:36:22 by AnastasiaYendiki)