Size: 12162
Comment:
|
Size: 12983
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
= Tutorial 3: Display the anatomy = ''Authors: Francois Tadel, Elizabeth Bock, Sylvain Baillet'' |
|
Line 2: | Line 4: |
== Fiducials selection (MRI Viewer) == A few more details about the MRI and the fiducials: Right-click on the MRI file > Edit MRI... |
<<TableOfContents(2,2)>> |
Line 5: | Line 6: |
. {{attachment:mriViewer.gif}} | == Anatomy folder == The anatomy of the subject "Subject01" should now contain all the files that Brainstorm could import from the FreeSurfer segmentation results: |
Line 7: | Line 9: |
* Navigate in the volume by clicking anywhere in the slices, or by using the sliders below each image. * Once you have clicked on any orientation, you can use the '''mouse wheel''' to move to the next/previous slice in the same orientation. * '''Zoom '''in and out with the magnifying glass buttons at the bottom of the figure * There are three small buttons above each image. They may be useful when you import your own MR volumes, if they are not oriented in the way Brainstorm wants them (e.g. you see the ''Sagittal ''title on top of the coronal view; or the small white "''P''", which is supposed to indicate the posterior part of the head, points the nose). Leave your mouse a few seconds over any button to read its description tooltip. Click on them and try to understand what they are doing. * Image contrast can be changed with the mouse: click and hold the right button on one image, and move your mouse up and down (this operation will be later referred as ''right-click+move''). * Right-clicking in any view shows a popup menu that will be described in the following tutorials. * You can define six points on the MRI: * Three to define the Subject Coordinate System (SCS):<<BR>>Nasion (NAS), Left pre-auricular point (LPA), Right pre-auricular point (RPA) * Three to define the Normalized coordinate system (NCS):<<BR>>Anterior commissure (AC), Posterior commissure (PC), and any Interhemispheric point (IH) * More information on how to define the fiducial points on the CoordinateSystems page. * To define a point, position the three views at the point your want to define (pointed by the 3 crosses), and click on the ''Set ''button. Later you can click on ''View ''to move the views to this point again. |
* '''MRI''': T1-weighted MRI, resampled and re-aligned by FreeSurfer. * '''Head mask''': Head surface, generated by Brainstorm.<<BR>>If this doesn't look good for your subject, you can recalculate another head surface using different parameters: right-click on the subject folder > Generate head surface. * '''Cortex_330142V''': High-resolution pial envelope generated by FreeSurfer. * '''Cortex_15002V''': Low-resolution pial envelope, downsampled from the original one by Brainstorm. * '''White_*''': White matter envelope, high and low resolution. * '''Mid_*''': Surface that represents the mid-point between the white and cortex envelopes. * '''Aseg atlas''': Surfaces representing various sub-cortical regions identified by FreeSurfer. * For more information about the files generated by FreeSurfer, read the [[Tutorials/LabelFreeSurfer|FreeSurfer page]].<<BR>><<BR>> {{attachment:import_anat_files.gif||height="190",width="305"}} |
Line 19: | Line 18: |
* You can see that all the points are already defined on this MRI, but you should always check their positions. For many reasons, each research group has a different way to define those points. So you may not position the ears or the nasion exactly the same way as we do. Do not hesitate to move the fiducials to better fit your needs. | == MRI Viewer == Right-click on the MRI to get the list of the available display menus: |
Line 21: | Line 21: |
* The ''Display options'' panel allows to hide some of the components. If the ''MIP/Anatomy ''checkbox is selected, the Maximum Intensity Power is displayed instead of the regular slices: At each point, the value displayed is the maximum value across all the slices. | . {{attachment:mri_popup.gif}} |
Line 23: | Line 23: |
* The ''Coordinates ''panel shows the (x,y,z) coordinates in the coordinate systems managed by Brainstorm: MRI and SCS. | Select the MRI Viewer. This interface was already introduced in the previous tutorial. It corresponds to the default display menu if you double-click on the MRI from the database explorer. Let's describe a few more options: |
Line 25: | Line 25: |
* Once you're done, click on ''Cancel ''(unless you really want to save all your experiments). | * '''MIP Anatomy''': Maximum Intensity Projection. When this option is selected, the MRI viewer shows the maximum intensity value across all the slices in each direction. This maximum does not depend on the selected slice, therefore if you move the cursor, the image stays the same. * '''Neurological/Radiological''': Two standard ways displaying scans. In the neurological orientation, the left hemisphere is on the left of the image while in the radiological orientation the left hemisphere is on the right on the image. * '''Coordinates''': Position of the cursor in different coordinate systems, as described on this page: [[CoordinateSystems]]. The MNI coordinates are only available for the MRI volumes that have been transformed to the MNI stereotaxic space (for example the Colin27 and ICBM152 templates). * '''Popup menu''': All the figures have additional options available in a popup menu, accessible with a right-click on the figure. The colormap options will be described later in the tutorials, you can test the other options by yourself.<<BR>><<BR>> {{attachment:mri_viewer.gif||height="266",width="295"}} {{attachment:mri_viewer_mip.gif||height="266",width="295"}} |
Line 27: | Line 30: |
== MRI visualization == There are many different ways to display the MR volumes. Right click on the ''T1-MRI'' in ''Default anatomy'', menu ''Display''. Just click everywhere and try all the options by yourself, it is the best way to learn.<<BR>><<BR>> {{attachment:popupMri.gif}} ==== MRI Viewer ==== Already introduced in this tutorial<<BR>>It is the default visualization mode; when you double-click on the MRI file, it brings up the MRI Viewer. ==== Axial / coronal / sagittal slices ==== {{attachment:mriSlicesContact.gif||height="231",width="210"}} |
== MRI contact sheets == You can get collections of slices in any direction axial/coronal/sagittal with menus in the popup menu in the database explorer or from the popup menu in the MRI Viewer figure. |
Line 39: | Line 36: |
* Colormap selection in menu * Save as image in menu |
{{attachment:mri_axial.gif}} |
Line 43: | Line 40: |
||<tablewidth="200px"> {{attachment:mriSlices3d.gif||height="229",width="292"}} || {{attachment:menuShortcut.gif}} || |
{{attachment:mri_3d.gif}} |
Line 89: | Line 85: |
== Create a subject == If you explored well, you should have found the "''New subject''" menu in the protocol's popup menu. ||<tablewidth="200px"#ffffff style="vertical-align:top; "> {{attachment:menuNewSubject.gif}} || {{attachment:createNewSubject.gif}} || |
== Check registration with MRI == Your Subject01 anatomy is ready for source estimation. But before going further, you should '''always''' check that surfaces and MRI are well registered. When performing those steps a bit too fast, it is really easy to end up with a cortex envelope that is not aligned with the MRI. None of the following steps in source estimation will check that for you, and the sources estimated would be completely wrong. |
Line 93: | Line 88: |
* Right-click on the ''Cortex ''surface ''> MRI Registration > Check MRI/surface registration''... . {{http://neuroimage.usc.edu/brainstorm/Tutorials/TutImportAnatomy?action=AttachFile&do=get&target=checkMriRegistration.gif|checkMriRegistration.gif|height="265px",width="332px",class="attachment"}} * The calculation of the interpolation MRI-surface takes a few seconds, but it is then saved in the database and will be reused later. * The yellow lines represent the re-interpolation of the surface in the MRI volume. The computation may take a while, but the result will be stored in the surface file, and will be useful for other operations anyway. |
|
Line 94: | Line 93: |
== What happened on the hard drive == For most manipulations, it is not necessary to know exactly what is going on at the level of the file system, in the Brainstorm database directory. However, many things are not accessible from the Brainstorm interface, you may find sometimes useful to manipulate some piece of data directly from the Matlab command window. |
|
Line 95: | Line 96: |
The '''right-click > File menu''', accessible on all the nodes in Brainstorm database explorer, offers many tools to interact with the file system and the Matlab environment. | |
Line 96: | Line 98: |
* Usually, the only thing you need to do here is to edit the name of the subject. | ==== Where are the files ? ==== Several ways to reach a file: |
Line 98: | Line 101: |
* But you can also override here the protocol's defaults regarding the sharing of anatomy and channel file between subjects and conditions. For the example, leave selected the "''Yes, use default anatomy''" option. Then click on ''Save''. | * Leave your mouse during a few seconds over any node in the database explorer, and a tooltip will appear, with the name and path of the corresponding file on the hard drive. <<BR>><<BR>> {{attachment:treeToolTip.gif}} * Paths are relative to current protocol path (''brainstorm_db/TutorialCTF''). What is displayed in the Brainstorm window is a comment and may have nothing to do with the real file name. Eg. the Cortex surface's real file name is ''tess_cortex_pial.mat''. * Almost all the files in the database (imported data or computation results) are in Matlab .mat format. As a consequence, you can load them really easily in the Matlab environment, where they appear as structures with several fields. |
Line 100: | Line 105: |
* You should see a the new subject in both ''Anatomy ''and ''Functional data'' views. | ==== Popup menu: File ==== Right-click on a surface file: many menus can lead you to the files and their contents: |
Line 102: | Line 108: |
* In the Anatomy view, the subject node only contains a link called (Default anatomy). It is here just to remind that the subject is using the default ''MNI Colin27'' anatomy.<<BR>><<BR>> {{attachment:subjectDefaultAnat.gif}} | . {{attachment:treeFileMenu.gif}} |
Line 104: | Line 110: |
== Change the default anatomy == When you create a new protocol, the program makes a copy of the Colin27 anatomy and sets it as the default for the protocol. It means that you will be able to use the Colin27 brain as a substitute for the subjects without an individual MRI, or as the common brain for group analysis. |
* '''View file contents''': Display all the fields in the corresponding Matlab .mat file and the file path<<BR>><<BR>> {{attachment:fileViewMat.gif}} * '''View file history''': Review the History field in the file, that records all the operations that were performed on the file since if was imported in Brainstorm<<BR>><<BR>> {{attachment:fileViewHistory.gif}} * '''Export to file''': Export in one of the supported mesh file format * '''Export to Matlab''': Load the contents of the .mat file in the Matlab base workspace. It is then accessible from the Matlab command window. * '''Import from Matlab''': Replace the selected file with the content of a variable from the Matlab base workspace. Useful to save back in the database some structures that where exported and modified manually with the Matlab command window. * '''Copy / Cut / Paste''': Allow you to copy/move files in the database explorer. Keyboard shortcuts for those menus are the standard Windows shortcuts (Ctrl+C, Ctrl+X, Ctrl+V). The tree also support drag-and-drop operations for moving files between different folders. * '''Delete''': Delete a file. Keyboard shortcuts: Delete key. * '''Rename''': Change the Comment field in the file ("renames" the file in the database explorer, but does not rename the actual file on the hard drive). Keyboard shortcut: F2 * '''Copy file path to clipboard''': Copies the full file name into the system clipboard, so that you can paste it in any other window (Ctrl+V or Paste menu) * '''Go to this directory (Matlab)''': Change the current Matlab path, so that you can access the file from the Matlab ''Command window'' or the Matlab ''Current directory'' window * '''Show in file explorer''': Open an explorer window in this directory (not working on all the systems...) * '''Open terminal in this folder''': Start a system console in the file directory (Linux, Unix, MacOS only) |
Line 107: | Line 123: |
Other sets of MRI+surfaces are available to replace the Colin27 anatomy. Right-click on ''(Default anatomy)'' > Use template. If a package is not currently available on your system, it will be downloaded from the Brainstorm website and saved in $HOME/.brainstorm/templates. The available options are: | ==== What are all those other files ? ==== * If you look in your ''brainstorm_db/TutorialCTF ''directory with the file explorer of your operating system, you'll find many other directories and files that are not visible in Brainstorm database explorer.<<BR>><<BR>> {{attachment:protocolFolders.gif}} * The protocol TutorialCTF is divided in ''Anatomy ''and ''Datasets ''directories: * Each subject in ''anat ''is described by an extra file: ''brainstormsubject.mat'' * Each condition in ''data ''is described by an extra file: ''brainstormstudy.mat'' * '''anat/@default_subject''': contains the files of the default anatomy ''(Default anatomy)'' * '''data/@default_study''': files shared between different subjects ''(Global common files)'' * '''data/@inter''': results of inter-subject analysis * '''data/Subject01/@default_study''': files shared between different conditions in Subject01 * '''data/Subject01/@intra''': results of intra-subject analysis (across different conditions) |
Line 109: | Line 134: |
* '''Colin27''': Average of 27 scans of the same head, processed with FreeSurfer 5.3: [[http://www.bic.mni.mcgill.ca/ServicesAtlases/Colin27|more information]] * '''Colin27_2012''': Previous version of the default anatomy distributed with Brainstorm * '''ICBM152''': Non-linear average of 152 subjects, processed with FreeSurfer 5.3: [[http://www.bic.mni.mcgill.ca/ServicesAtlases/ICBM152NLin2009|more information]] * '''FSAverage''': Average of 40 subjects using a spherical averaging described in [[http://nmr.mgh.harvard.edu/~fischl/reprints/morphing_human_brain_mapping_reprint.pdf|(Fischl et al. 1999)]].<<BR>>It is the default FreeSurfer brain: please [[https://surfer.nmr.mgh.harvard.edu/registration.html|register here]] if you are using it. * '''Infant7w''': 7-week infant brain with the antomical atlas presented in [[http://www.sciencedirect.com/science/article/pii/S105381191400411X|(Kabdebon et al. 2014)]]. |
<<EmbedContent("http://neuroimage.usc.edu/bst/get_prevnext.php?prev=Tutorials/ImportAnatomy&next=Tutorials/ReviewRaw")>> |
Line 115: | Line 136: |
They all include the following information: * T1 MRI volume * Cortex surface: high-resolution (~300.000 vertices) and low-resolution (15.000 vertices) * Head surface: based on the head used for FSAverage in the MNE software * FreeSurfer spherical registration of each hemisphere, with which we can co-register the individual brains processed with FreeSurfer with the selected default anatomy * FreeSurfer surface-based atlases: Desikan-Killiany, Destrieux, Brodman, Mindboggle<<BR>>(plus Yeo2011 and PALS for FSAverage only) The atlases will be discussed in the following tutorials. For more information on the interactions between FreeSurfer and Brainstorm: [[Tutorials/LabelFreeSurfer|read this tutorial]]. {{attachment:changeDefault.gif|changeDefault1.gif}} If you click on any of the download options, it downloads it into your $HOME/.brainstorm/templates folder: {{attachment:changeDefault2.gif}} Then the list of files in the (default anatomy) folder is replaced with the new template. {{attachment:changeDefault3.gif}} == Modify the default MRI fiducials == The fiducial points (Nasion, LPA, RPA) used in your recordings might not be the same as the ones used in the anatomy templates in Brainstorm (Colin27, ICBM152, FSAverage). By default, the LPA/RPA points are defined at the junction between the tragus and the helix, as represented with the red dot in the [[http://neuroimage.usc.edu/brainstorm/CoordinateSystems|Coordinates systems page]]. If you want to use an anatomy template but you are using a different convention when digitizing the position of those points, you have to modify the default positions of the template with the MRI Viewer. * Go to the anatomy view * In (default anatomy), right-click on the MRI > Edit MRI * Modify the position of the fiducial points to match your own convention * Click on [Save], it will update the surfaces to match the new coordinate system |
<<EmbedContent(http://neuroimage.usc.edu/bst/get_feedback.php?Tutorials/ExploreAnatomy)>> |
Tutorial 3: Display the anatomy
Authors: Francois Tadel, Elizabeth Bock, Sylvain Baillet
Contents
Anatomy folder
The anatomy of the subject "Subject01" should now contain all the files that Brainstorm could import from the FreeSurfer segmentation results:
MRI: T1-weighted MRI, resampled and re-aligned by FreeSurfer.
Head mask: Head surface, generated by Brainstorm.
If this doesn't look good for your subject, you can recalculate another head surface using different parameters: right-click on the subject folder > Generate head surface.Cortex_330142V: High-resolution pial envelope generated by FreeSurfer.
Cortex_15002V: Low-resolution pial envelope, downsampled from the original one by Brainstorm.
White_*: White matter envelope, high and low resolution.
Mid_*: Surface that represents the mid-point between the white and cortex envelopes.
Aseg atlas: Surfaces representing various sub-cortical regions identified by FreeSurfer.
For more information about the files generated by FreeSurfer, read the FreeSurfer page.
MRI Viewer
Right-click on the MRI to get the list of the available display menus:
Select the MRI Viewer. This interface was already introduced in the previous tutorial. It corresponds to the default display menu if you double-click on the MRI from the database explorer. Let's describe a few more options:
MIP Anatomy: Maximum Intensity Projection. When this option is selected, the MRI viewer shows the maximum intensity value across all the slices in each direction. This maximum does not depend on the selected slice, therefore if you move the cursor, the image stays the same.
Neurological/Radiological: Two standard ways displaying scans. In the neurological orientation, the left hemisphere is on the left of the image while in the radiological orientation the left hemisphere is on the right on the image.
Coordinates: Position of the cursor in different coordinate systems, as described on this page: CoordinateSystems. The MNI coordinates are only available for the MRI volumes that have been transformed to the MNI stereotaxic space (for example the Colin27 and ICBM152 templates).
Popup menu: All the figures have additional options available in a popup menu, accessible with a right-click on the figure. The colormap options will be described later in the tutorials, you can test the other options by yourself.
MRI contact sheets
You can get collections of slices in any direction axial/coronal/sagittal with menus in the popup menu in the database explorer or from the popup menu in the MRI Viewer figure.
Zoom: mouse wheel (or two finger-move on a MacBook pad)
Move in zoomed image: click + move
Adjust contrast: right click + move up/down
3D orthogonal slices
- Simple mouse operations
Rotate: click + move
Zoom: mouse wheel (two finger-move on a MacBook pad)
Move object: left+right click + move
Move MRI slices: right click + move along direction of the slice
(or use the Resect panel in the Surface tab)Colormap contrast/brightness: click on the colorbar, and move up/down (brightness) or left/right (contrast)
Reset view: double click
Reset colormap: double-click on the colorbar
- Popup operations (right-click on the figure)
Colormap: Full Anatomy colormap edition (detailed in next tutorial)
MRI Display: For now, contains only the MIP option (Maximum Intensity Power). If checked, for each orientation: displays the maximum along all the slices instead of the proper slice.
Get coordinates: Pick a point in any 3D view and get its coordinates
Snapshots: save images or movies from this figure
Figure: change background color, display axes and menus for an advanced figure editing and management using Matlab tools.
Views: configure camera position with predefined settings.
- Keyboard shortcuts:
Notice the indications in the right part of the popup menu (CTRL+A in front of Figures>Axes, "1" in front of Views>Left), they represent the keyboard shortcut for each menu.
Views shortcuts (0,1,2...9 and "="): Remember them, they will be very useful when exploring the cortical sources. It is much faster to press a key to switch from left to right hemisphere, than having to rotate the brain with the mouse.
- Surfaces tab (in the Brainstorm main window):
- This panel is primarily dedicated to the surfaces display, but some controls can also be useful for the 3D MRI view.
Transparency slider
Smooth slider: it changes the threshold applied to the MRI slices. If you set it zero, you will see the full slices, as extracted from the volume.
Resect panel: you can change the position of the slices with the three sliders.
Surfaces visualization
There is only one way to display the surfaces: in 3D figures. To display a surface you can either double-click on it or right-click > Display.
- The mouse and keyboard operations are the same described for the 3D MRI display also apply here.
- If you display two surfaces from the same subject, they will be displayed on the same figure.
Open the Cortex surface and try all the buttons and sliders. Then do the same with the Scalp surface (Head). All the controls should have some effect on the display, except the sliders in the "Data options" panel. They are useful only when some additional data is mapped on the surfaces.
Multiple surfaces: If you have more than one surface in a figure, you need to select the surface you want to edit before changing its properties. The list of the available surfaces is displayed on top of the Surfaces tab.
You can also quickly add or remove surfaces in any 3D figure with the top-right buttons of the Surfaces tab.
Coordinates tab
- Close all the figures. Open the cortex surface again.
- Right-click on the 3D figure, select "Get coordinates". A new window appears.
Click anywhere on the cortex surface: a big yellow cross appears, and the coordinates of the point are displayed in all the available coordinates systems (see page: CoordinateSystems)
- MRI: MR volume, in millimeters (multiplied with the Voxsize field in the MRI file).
- SCS: Subject Coordinates System, in millimeters
- MNI: Montreal Neurological Institute standard coordinates
You can click on "View / MRI" to see where this point is located in the MRI, using the MRI Viewer.
Check registration with MRI
Your Subject01 anatomy is ready for source estimation. But before going further, you should always check that surfaces and MRI are well registered. When performing those steps a bit too fast, it is really easy to end up with a cortex envelope that is not aligned with the MRI. None of the following steps in source estimation will check that for you, and the sources estimated would be completely wrong.
Right-click on the Cortex surface > MRI Registration > Check MRI/surface registration...
- The calculation of the interpolation MRI-surface takes a few seconds, but it is then saved in the database and will be reused later.
- The yellow lines represent the re-interpolation of the surface in the MRI volume. The computation may take a while, but the result will be stored in the surface file, and will be useful for other operations anyway.
What happened on the hard drive
For most manipulations, it is not necessary to know exactly what is going on at the level of the file system, in the Brainstorm database directory. However, many things are not accessible from the Brainstorm interface, you may find sometimes useful to manipulate some piece of data directly from the Matlab command window.
The right-click > File menu, accessible on all the nodes in Brainstorm database explorer, offers many tools to interact with the file system and the Matlab environment.
Where are the files ?
Several ways to reach a file:
Leave your mouse during a few seconds over any node in the database explorer, and a tooltip will appear, with the name and path of the corresponding file on the hard drive.
Paths are relative to current protocol path (brainstorm_db/TutorialCTF). What is displayed in the Brainstorm window is a comment and may have nothing to do with the real file name. Eg. the Cortex surface's real file name is tess_cortex_pial.mat.
- Almost all the files in the database (imported data or computation results) are in Matlab .mat format. As a consequence, you can load them really easily in the Matlab environment, where they appear as structures with several fields.
Popup menu: File
Right-click on a surface file: many menus can lead you to the files and their contents:
View file contents: Display all the fields in the corresponding Matlab .mat file and the file path
View file history: Review the History field in the file, that records all the operations that were performed on the file since if was imported in Brainstorm
Export to file: Export in one of the supported mesh file format
Export to Matlab: Load the contents of the .mat file in the Matlab base workspace. It is then accessible from the Matlab command window.
Import from Matlab: Replace the selected file with the content of a variable from the Matlab base workspace. Useful to save back in the database some structures that where exported and modified manually with the Matlab command window.
Copy / Cut / Paste: Allow you to copy/move files in the database explorer. Keyboard shortcuts for those menus are the standard Windows shortcuts (Ctrl+C, Ctrl+X, Ctrl+V). The tree also support drag-and-drop operations for moving files between different folders.
Delete: Delete a file. Keyboard shortcuts: Delete key.
Rename: Change the Comment field in the file ("renames" the file in the database explorer, but does not rename the actual file on the hard drive). Keyboard shortcut: F2
Copy file path to clipboard: Copies the full file name into the system clipboard, so that you can paste it in any other window (Ctrl+V or Paste menu)
Go to this directory (Matlab): Change the current Matlab path, so that you can access the file from the Matlab Command window or the Matlab Current directory window
Show in file explorer: Open an explorer window in this directory (not working on all the systems...)
Open terminal in this folder: Start a system console in the file directory (Linux, Unix, MacOS only)
What are all those other files ?
If you look in your brainstorm_db/TutorialCTF directory with the file explorer of your operating system, you'll find many other directories and files that are not visible in Brainstorm database explorer.
The protocol TutorialCTF is divided in Anatomy and Datasets directories:
Each subject in anat is described by an extra file: brainstormsubject.mat
Each condition in data is described by an extra file: brainstormstudy.mat
anat/@default_subject: contains the files of the default anatomy (Default anatomy)
data/@default_study: files shared between different subjects (Global common files)
data/@inter: results of inter-subject analysis
data/Subject01/@default_study: files shared between different conditions in Subject01
data/Subject01/@intra: results of intra-subject analysis (across different conditions)