User Tools

Site Tools


psyc410_s2x:dti

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
psyc410_s2x:dti [2025/03/11 12:00] adminpsyc410_s2x:dti [2025/03/17 13:03] (current) – removed admin
Line 1: Line 1:
-====== Part 3: Tractography ====== 
- 
-Diffusion weighted imaging is an important development in MRI that gave clinicians and researchers the ability to identify and measure white matter non-invasively. But it also just happens to be one of the most visually beautiful types of scientific imaging (IMHO). The rest of this lab is aimed at getting you more comfortable with visualizing white matter tracts, but also to just have fun and create some awesome looking images. 
- 
-<WRAP center round alert 100%> 
-<WRAP centeralign>In order to simplify things and move you through this lab a bit quicker, we will skip the "Single Subject" section of the lab. \\ 
-\\ 
-**Skip ahead to the [[#Visualizing Tracts with DSI Studio: Population Template|Population Template section]] of the lab.** 
-</WRAP> 
-</WRAP> 
- 
- 
- 
-===== Visualizing Tracts with DSI Studio: Single Subject ===== 
- 
-<WRAP center round info 100%> 
-The sample data for this section are located in ''~/Desktop/input/dti-sample''. The files include: 
-  * ''data.nii.gz'' - DWI data (the preprocessing applied to these data is summarized below) 
-  * ''bvals'' and ''bvecs'' - 60 directions, b1000 
-  * ''T1_brain.nii.gz'' - Extracted T1-weighted brain 
- 
- 
-=== Preprocessing === 
-  * Denoising 
-  * Gibbs ringing artifact 
-  * Susceptibility artifact 
-  * Eddy current distortions 
-  * Subject motion 
- 
-/* Applying strong gradients such as those used in diffusion imaging creates compensatory magnetic fields that oppose the gradients. These are called 'eddy currents' in analogy to the swirls that you can observe in moving water when it encounters an obstruction. These swirls oppose the direction of the stream. 
- 
-The problem in MRI is that spatial encoding is exquisitely dependent upon the strength of the magnetic field gradient. The spatial location of a hydrogen nucleus (proton) is encoded by applying a magnetic field of a precise strength to a location in space. If the magnetic field strength is augmented or diminished by eddy currents, there will be a change in the perceived location of the proton. Thus, the image will be sheared or otherwise distorted. 
- 
-There are algorithms that attempt to compensate for eddy current distortions, which are spatially related to the gradient direction. We will first need to remove eddy current distortion from our diffusion data before proceeding. This can be done by choosing ''FDT diffusion'' on the FSL menu, and then choosing eddy current correction on the drop down menu. However, **due to the time taken for this computation, this has been computed beforehand so you do not need to do it now**. 
-*/ 
- 
-</WRAP> 
- 
- 
-In this section we will use [[https://dsi-studio.labsolver.org/|DSI-Studio]] program to visualize white matter tracts. 
- 
-<WRAP center round tip 80%> 
-It is best to not use the macos "dark mode" setting when using DSI-Studio. If you never changed this setting, then you have nothing to worry about. If you did set your computer to use Dark mode, then you should set it back to Light mode for the rest of this lab. 
-</WRAP> 
- 
-==== Getting Started ==== 
- 
-**1.** Open ''DSI-Studio'' by clicking on the icon in your dock. {{:psyc410:images:dsi_studio_icon.png?75|}} 
- 
-  * If a license agreement pops up, select ''Accept and Sign-In'' 
- 
-<WRAP center round tip 80%> 
-If you don't see the icon in your dock, you can open it from your ''Applications'' directory. 
-</WRAP> 
- 
-==== Preparing a single subject ==== 
- 
-**1.** Click on the **Tools** tab. 
- 
-{{ :psyc410:images:dsi_tools_tab.png?direct&800 |}} 
- 
- 
-**2.** Select **R1: Linear Registration** 
- 
-{{ :psyc410:images:dsi_linear_reg.png?direct&800 |}} 
- 
- 
-  * Select the ''T1_brain.nii.gz'' file 
-  * Then select the ''data.nii.gz'' file 
- 
-**3.** Check the quality of the registration by using the sliders to move through slices, and using the ''Click to switch views'' button. 
-  *Unless something look horribly wrong, select ''OK'' 
- 
- 
-**4.** Select the **Tractography** tab. 
- 
-{{ :psyc410:images:dsi_tractography_tab.png?direct&800 |}} 
- 
-**5.** Select **Step T1: NIFTI to SRC ...** 
- 
-{{ :psyc410:images:dsi_nifti_src.png?direct&800 |}} 
- 
-  * Select the ''data.nii.gz'' 
-    * The ''bvec'' and ''bval'' values will load automatically. 
-    * Click ''Ok'' in the popup window indicating ''SRC file created'' 
- 
-**6.** Select **Step T2: Reconstruction ...** 
- 
-{{ :psyc410:images:dsi_reconstruction.png?direct&800 |}} 
- 
-  * Select the ''data.sz'' file 
-  * Select **Run Reconstruction** in the bottom-right corner of the window that opens up. 
-  * Click ''Ok'' in the popup window indicating ''FIB file created'' 
-  * Close the reconstruction window 
- 
-**7.** Select **Step T2: Fiber Tracking** 
- 
-{{ :psyc410:images:dsi_fibertracking.png?direct&800 |}} 
- 
-  * Select the ''data.dti.fz'' file 
- 
- 
-==== Viewing a single subject ==== 
- 
-A new DTI viewing window will open (see below). There is a lot going on in this window and it will take you some time to get it figured out. There are way too many options for us to review in this lab, so I will highlight just a few, but you should mess around, press buttons, see what things do. You'll discover cool stuff. If you really lose your way, you can always close the program, reopen it, and jump to step #7 above. 
- 
-<WRAP center round info 100%> 
- 
- 
- 
-There are five windows: 
-  * The main viewing window (<fc #ffff00>yellow box</fc>) 
-    * The three sliders at the bottom will move you through the x, y, and z dimensions. 
-    * To the right of the sliders is an option to zoom in or out. 
-    * This brain can also be rotated in 3D by click-hold-drag. 
- 
- 
-  * ''T3a Assign Regions'' (<fc #ff0000>red box</fc>) 
-    * Here we will add regions to filter and select the tracts we want to view. 
- 
- 
-  * ''T3b Draw Regions'' (<fc #6495ed>blue box</fc>) 
-    * This is a fractional anisotropy map color coded by the principle diffusion direction. 
-      * In the upper corner of this window is a zoom window (just below the little ''x''. Adjust that number to zoom in. If you zoom in a lot, you will see the different orientations of the principle diffusion directions. 
-      * By default, this is mirrored with the brain in the main window. Adjusting the slider will move through the slices of both brains.  
-      * The little icons to the right of the slider let you choose axial, sagittal, coronal, or multi-view perspectives. 
-    * Among other things, you can hand draw regions of interest (ROI) 
- 
- 
-  * ''T3c Options'' (<fc #00ffff>cyan box</fc>) 
-    * A million different options for all of the windows 
- 
- 
-  * ''T3d Tracts'' (<fc #ff00ff>purple box</fc>) 
-    * Here you will generate and control which tracts are displayed. 
- 
-{{ :psyc410:images:dsi_dti_window.png?direct&800 |}} 
- 
- 
-</WRAP> 
- 
- 
-**1.** Choose the coronal view by selecting the appropriate button underneath the ''T3b'' window (hint: it's the second one to the right fo the slider) 
- 
-**2.** In the main window set the y-slider to ''65'' (from left to right, the three sliders are ''x'', ''y'', and ''z'') 
- 
-In the main window you should see two prominent, vertical, white-matter tracts. You should also see a prominent horizontal tract that seems to connect the two vertical tracts about two-thirds of the way up.  
-In window ''T3b'' you'll see that the two vertical tracts are primarily blue, whereas the horizontal tract is primarily red. Zoom in close and you'll see  the length and orientation within each voxel. The two vertical tracts are the right and left [[https://en.wikipedia.org/wiki/Corticospinal_tract|corticospinal tract]] and the horizontal tract is the [[https://en.wikipedia.org/wiki/Corpus_callosum|corpus callosum]]. 
- 
-**3.** Click **Autotrack** in the ''T3d'' window. 
- 
-**4.** Click **Fiber Tracking** in the ''T3d'' window. 
-  * Pretty cool, right!? 
-  * Spend some time playing around with the brain, rotate to see all the pretty colors and fibers. Adjust the sliders, zoom, view, options in ''T3c'', etc. We'll be doing some more specific things in a bit, so it's good to get as familiar with the interface as you can by just messing around. 
- 
-<WRAP center round info 90%> 
-The tracts are overlaid onto a fractional anisotropy (FA) map. You might prefer to see them overlaid on a T1-weighted hi-resolution brain. To do so, on the top menubar select ''Slices'' --> ''Insert Other Images...'' and select the ''T1_brain.nii.gz''. 
- 
-In the upper left of the main window is dropdown menu that you can now use to switch between ''fa'' and ''T1_brain'' 
- 
-</WRAP> 
- 
-===== Visualizing Tracts with DSI Studio: Population Template ===== 
- 
-<WRAP center round info 100%> 
-<WRAP centeralign> **DSI description of the template data:**</WRAP> 
-A group-average template was constructed from a total of 1065 scans. A multishell diffusion scheme was used, and the b-values were 1000, 2000, and 3000 s/mm2. The number of diffusion sampling directions were 90, 90, and 90, respectively. The in-plane resolution was 1.25 mm. The slice thickness was 1.25 mm. The diffusion data were reconstructed in the MNI space using q-space diffeomorphic reconstruction (Yeh et al., Neuroimage, 58(1):91-9, 2011) to obtain the spin distribution function (Yeh et al., IEEE TMI, ;29(9):1626-35, 2010).  A diffusion sampling length ratio of 1.7 was used. The output resolution in diffeomorphic reconstruction was 1 mm isotropic. The restricted diffusion was quantified using restricted diffusion imaging (Yeh et al., MRM, 77:603–612 (2017)). 
-</WRAP> 
- 
-==== Getting Started ==== 
- 
-**1.** Open ''DSI-Studio'' by clicking on the icon in your dock. {{:psyc410:images:dsi_studio_icon.png?75|}} 
- 
-  * If a license agreement pops up, select ''Accept and Sign-In'' 
- 
-<WRAP center round tip 80%> 
-If you don't see the icon in your dock, you can open it from your ''Applications'' directory. 
-</WRAP> 
- 
- 
-**2.** Select the **FIB Template & Tractography Atlas** tab. 
- 
-{{ :psyc410:images:dsi_fib_tab.png?direct&800 |}} 
- 
-In the ''Population-averaged FIB templates'' box you will see a list of seven different templates.  
- 
-  * Select ''human'' (Note: by default, ''Human human_neonate'' is highlighted, but that's not what you want. Be sure to select ''human'' at the top of the list.) 
-  * Press ''Load'' 
- 
-<WRAP center round box 80%> 
-We won't be using any of them for this lab, but how awesome is it that you can play with the white matter of babies, and chimpanzees, and monkeys, and rodents?! I encourage you to play around with them at some point. 
- 
-(the correct answer is "Very awesome!") 
-</WRAP> 
- 
-A new DTI viewing window will open (see below). There is a lot going on in this window and it will take you some time to get it figured out. There are way too many options for us to review in this lab, so I will highlight just a few, but you should mess around, press buttons, see what things do. You'll discover cool stuff. If you really lose your way, you can always close the program, reopen it, and jump to step #7 above. 
- 
-<WRAP center round info 100%> 
- 
-There are five windows: 
-  * The main viewing window (<fc #ffff00>yellow box</fc>) 
-    * The three sliders at the bottom will move you through the x, y, and z dimensions. 
-    * To the right of the sliders is an option to zoom in or out. 
-    * This brain can also be rotated in 3D by click-hold-drag. 
- 
- 
-  * ''T3a Assign Regions'' (<fc #ff0000>red box</fc>) 
-    * Here we will add regions to filter and select the tracts we want to view. 
- 
- 
-  * ''T3b Draw Regions'' (<fc #6495ed>blue box</fc>) 
-    * This is a fractional anisotropy map color coded by the principle diffusion direction. 
-      * In the upper corner of this window is a zoom window (just below the little ''x''. Adjust that number to zoom in. If you zoom in a lot, you will see the different orientations of the principle diffusion directions. 
-      * By default, this is mirrored with the brain in the main window. Adjusting the slider will move through the slices of both brains.  
-      * The little icons to the right of the slider let you choose axial, sagittal, coronal, or multi-view perspectives. 
-    * Among other things, you can hand draw regions of interest (ROI) 
- 
- 
-  * ''T3c Options'' (<fc #00ffff>cyan box</fc>) 
-    * A million different options for all of the windows 
- 
- 
-  * ''T3d Tracts'' (<fc #ff00ff>purple box</fc>) 
-    * Here you will generate and control which tracts are displayed. 
- 
-{{ :psyc410:images:dsi_dti_window.png?direct&800 |}} 
- 
- 
-</WRAP> 
- 
-==== Plotting tracts ==== 
- 
-We'll start by plotting a couple of major white-matter tracts. 
- 
-**1.** Switch to a coronal view by selecting the appropriate button underneath the ''T3b'' window (hint: it's the second one to the right of the slider). In both ''T3b'' and the main viewing window zoom in so that the brains fill the respective windows. 
- 
-In the main window you should see two prominent, vertical, white-matter tracts. In window ''T3b'' you'll see that the two vertical tracts are primarily blue indicating that the the principle diffusion direction is superior-inferior. Zoom in close and you'll see  the length and orientation of the primary diffusion direction within each voxel. The two vertical tracts are the right and left [[https://en.wikipedia.org/wiki/Corticospinal_tract|corticospinal tract]] which is the primary pathway that brings motor information from the brain to the body. 
- 
-Let's plot these as fiber tracts. 
- 
-**2.** Click **Autotrack** in the ''T3d'' window. The button will now read ''All''. 
- 
-**3.** Click the ''All'' dropdown menu and select **ProjectionBrainstem**. A new dropdown menu will appear immediately below the only you just used. If you click on it you'll see a list of prominent white matter tracts. But the first one that is selected by default, **CorticospinalTractL**, is the one we want, so click on the **Fiber Tracking** button. 
- 
-**4.** Select **CorticospinalTractR** and then **Fiber Tracking**. 
- 
-**5.** In the main viewing window change the brain image from ''qa'' to ''t1w_template'' 
- 
-{{ :psyc410:images:dsi_dti_underlay.png?direct&800 |}} 
- 
-Play around with the image in the main window. Rotate it around. Try different moving through the slices of the underlay. You can also click the check box next to each slider to turn slices on/off. For example, in the image below I've turned off the ''x'' and ''y'' slices so that we get a view of the tracts ascending through the midbrain.  
- 
-{{ :psyc410:images:corticospinal_tracts_midbrain.png?direct&500 |}} 
- 
-<WRAP center round tip 100%> 
-As you add new fiber tracts you'll probably want to hide or remove ones you've already viewed. In ''T3d'' you can simply uncheck a given tract to hide it. If you want to remove it altogether, make sure it's highlighted and click the red "X" button. 
-</WRAP> 
- 
- 
- 
-===== LAB REPORT Part 3 ===== 
-<WRAP center round important 100%> 
-<WRAP centeralign> 
-<WRAP centeralign> 
-<typo fs:x-large; fc:purple; fw:bold; text-shadow: 2px 2px 2px #ffffff> 
-LAB REPORT Part 3 
-</typo> 
-</WRAP></WRAP> 
- 
-For this section of your lab report you will plot several fiber tracts (listed below). For each tract you should choose the best way to display it (i.e., orientation, underlay slices, whether you have other tracts visible, etc.). Your figures can include multiple sub-figures if you feel the best depiction requires more than one view. But this is not mandatory. 
- 
-The brain tracts you should plot: 
-  * The main body of the [[https://en.wikipedia.org/wiki/Corpus_callosum#Structure|corpus callosum]] 
-    * ''Commissure'' --> ''CorpusCallosum'' --> ''Body''  
-  * The [[https://en.wikipedia.org/wiki/Corpus_callosum#Relations|forceps major]], which connect the occipital lobes through the splenium of the corpus callosum. 
-    * ''Commissure'' --> ''CorpusCallosum'' --> ''ForcepsMajor''  
-  * The [[https://en.wikipedia.org/wiki/Arcuate_fasciculus|left arcuate fasciculus]], which is the primary fiber bundle connecting Broca's area and Wernicke's area. 
-    * ''Association'' --> ''ArcuateFasciculusL'' 
-  * The bilateral [[https://en.wikipedia.org/wiki/Optic_radiation|optic radiations]], which connect the lateral geniculate nucleus and striate cortex. 
-    * ''ProjectionBasalGanglia'' --> ''OpticRadiationL'' 
-    * ''ProjectionBasalGanglia'' --> ''OpticRadiationR'' 
-</WRAP> 
- 
-==== Plotting tracts that run through particular regions ==== 
- 
-<WRAP center round alert 100%> 
-This section is <sigh> optional. If you'd like to play around with identifying fiber tracts that run through particular regions (including ones that you create yourself) then proceed!  
-</WRAP> 
- 
- 
-I suggest that you open a new template window. If you go back to the main DSI window and click **Load** for the ''Population-averaged FIB templates'' it'll open a new instance. You can close the one you've been workin in, or leave it open if you prefer. 
- 
-**1.** As you did previously, change the underlay from ''qa'' to ''t1w_template'' and click **Autotrack** in the ''T3d'' window. 
- 
-**2.** Click on **Fiber Tracking** 
- 
-Unlike earlier, you're not seeing a specific tract, but rather all of the tracts in the brain. This is very pretty, but not terribly useful so after you've explored it a bit uncheck ''whole_brain'' or delete it. 
- 
-**3.** In ''T3a'' click on the **Atlas** button. This will open small window. 
- 
-{{ :psyc410:images:dsi_atlas_window.png?direct&300 |}} 
- 
-Let's say we're interested in seeing which fibers pass through the right fusiform gyrus.  
- 
-**4.** In the dropdown menu select ''FreeSurferDKT_Cortical'' and then ''right_fusiform'' from the list. 
-  * Click ''Add'' 
-  * Click ''Close'' 
- 
-In the right temporal cortex you will now see the fusiform gyrus highlighted. It kind of looks like playdoh or clay. So that's our region of interest. We now need to tell DSI what we'd like to do with that region. 
- 
-**5.** In ''T3a'' click the dropdown menu next to ''right_fusiform'' and select ''ROI''. This tells the software that we want to see all of the fibers that pass through the region. A description of all these options is available [[https://dsi-studio.labsolver.org/doc/gui_t3_roi_tracking.html|here]]. 
- 
-**6.** Click on **Fiber Tracking** in ''T3d''. 
- 
-<WRAP center round tip 60%> 
-Our "lump of clay" is kind of ugly and obscures the fibers. To make it disappear unclick ''Region Rendering'' in ''T3c''. 
-</WRAP> 
- 
-**7.** In ''T3a'' click the dropdown menu next to ''right_fusiform'' and select ''End'', the **Fiber Tracking** in ''T3d''. This tells the software that we want to see all of the fibers that end in the region (as opposed to simply passing through). Remember to uncheck the previous fiber tract that you plotted in ''T3d'' 
- 
-<WRAP center round tip 100%> 
-You can combine regions to further limit and select fibers. For example, if we select ''left_pars_opercularis''--a subregion of Broca's area--and ''left_superior_temporal''--home of Wernicke's area--and set both of them to ''ROI'' then the only fibers that get plotted will be those that pass through //both// of the areas. 
-</WRAP> 
- 
-Finally, you can create custom regions rather than selecting pre-existing ones from the Atlases.  
- 
-**8.** Right-click in ''T3a'' and select ''New Region''. 
- 
-**9.** In ''T3b'' you can draw your own region of interest.  
-  * After you draw your region remember to select ''ROI'' from the dropdown menu before clicking **Fiber Tracking** 
- 
- 
  
psyc410_s2x/dti.1741712421.txt.gz · Last modified: 2025/03/11 12:00 by admin

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki