= Tutorial 3: Display the anatomy = ''Authors: Francois Tadel, Elizabeth Bock, Sylvain Baillet'' <> == 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 [[Tutorials/LabelFreeSurfer|FreeSurfer page]].<
><
> {{attachment:import_anat_files.gif||height="190",width="305"}} == Default surfaces == * There are four possible surface types: cortex, inner skull, outer skull, head. * For each type of surface, one file is selected as the one to use by default for all the operations. * This selected surface is displayed in '''green'''. * Here, there is only one "head" surface, which is selected. * The mid, cortex and white surfaces can all be used as "cortex" surfaces, only one can be selected at a time. By default, the '''low-resolution cortex''' should be selected and displayed in green. * To select a different cortex surface, you can double-click on it or right-click > Set as default. == MRI Viewer == Right-click on the MRI to get the list of the available display menus: . {{attachment:mri_popup.gif}} 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). * '''Colormap''': Click on the colorbar and move up/down (brightness) or left/right (contrast) * '''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.<
><
> {{attachment:mri_viewer.gif||height="266",width="295"}} {{attachment:mri_viewer_mip.gif||height="266",width="295"}} == 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<
><
> {{attachment:mri_axial.gif||height="254",width="217"}} == MRI in 3D == Right-click on the MRI file in the database explorer > Display > '''3D orthogonal slices'''. . {{attachment:mri_3d.gif||height="213",width="460"}} * Simple mouse operations:<
> * '''Rotate''': Click + move. * '''Zoom''': Mouse wheel, or two finger-move on a MacBook pad. * '''Move''': Left+right click + move (or middle-click + move). * '''Colormap''': Click on the colorbar and move up/down (brightness) or left/right (contrast). * '''Reset view''': Double click anywhere on the figure. * '''Reset colormap''': Double-click on the colorbar. * '''Move slices''': Right click + move along the MRI slice axis.<
>(or use the ''Resect ''panel in the ''Surface ''tab) * Popup operations (right-click on the figure): * '''Colormap''': Edit the colormap, detailed in another tutorial. * '''MRI Display''': For now, contains only the MIP option (Maximum Intensity Projection). * '''Get coordinates''': Pick a point in any 3D view and get its coordinates. * '''Snapshots''': Save images or movies from this figure. * '''Figure''': Change some of the figure options or edit it using the Matlab tools. * '''Views''': Set one of the predefined orientation. * Note the indications in the right part of the popup menu, they represent the keyboard shortcut for each menu. * Keyboard shortcuts: <
> * '''Views shortcuts (0,1,2...9 and [=])''': Remember them, they will be very useful when exploring the cortical sources. To switch from left to right, it is much faster to press a key than having to rotate the brain with the mouse. * '''Zoom''': Keys [+] and [-] for zooming in and out. * Surfaces tab: * This panel is primarily dedicated to the display of the surfaces, but some controls can also be useful for the 3D MRI view. * '''Transparency''': This slider lets you change the transparency of the slices. * '''Smooth''': This slider changes the background threshold applied to the MRI slices. If you set it zero, you will see the full slices, as extracted from the volume. * '''Resect''': You can change the position of the slices with the three sliders. == Surfaces == To display a surface you can either double-click on it or right-click > Display. * The mouse and keyboard operations described for the 3D MRI view also apply here. * '''Smooth''': Inflates the cortical surface to make all the parts of the cortex envelopes visible. <
>This is just a display option, it does not actually modify the surface. * '''Color''': Changes the color of the surface. * '''Sulci''': Shows the bottom of the cortical folds with a darker color. We recommend to keep this option selected for the cortex, it helps for the interpretation of source locations on smoothed brains. * '''Edge''': Display the faces of the surface tesselation. * '''Multiple surfaces''': If you open two surfaces from the same subject, they will be displayed on the same figure. Then you need to select the surface you want to edit before changing its properties. The list of the available surfaces is displayed at the top of the ''Surface ''tab. * At the bottom of the Surface tab, you can read the number of vertices and faces in the tesselation.<
><
> {{attachment:surface_options.gif||height="210",width="320"}} {{attachment:surface_mesh.gif||height="210",width="286"}} == Get coordinates == * Close all the figures. Open the cortex surface again. * Right-click on the 3D figure, select "Get coordinates". * Click anywhere on the cortex surface: a yellow cross appears and the coordinates of the point are displayed in all the available coordinates systems. * You can click on [View/MRI] to see where this point is located in the MRI, using the MRI Viewer. <
><
> {{attachment:surface_coordinates.gif||height="152",width="365"}} == Sub-cortical regions == The standard FreeSurfer segmentation pipeline generates a volume atlas of 40 subcortical regions. Brainstorm reads those volume labels and tesselates some of those regions, groups all the meshes in a large surface file where the regions are identified in an atlas called "Structures". It identifies: 8 bialateral structures (accumbens, amygdala, caudate, hippocampus, pallidum, putamen, thalamus, cerebellum) and 1 central structure (brainstem). These structures can be useful for advanced source modeling, but will not be used in the introduction tutorials. Please refer to the advanced tutorials for more information. . {{attachment:aseg.gif||height="186",width="368"}} == Registration MRI/surfaces == The MRI and the surfaces are represented using the different coordinate systems and could be misregistered for various reasons. If you are using the automated segmentation pipeline from FreeSurfer or BrainSuite you should never have any problem, but if something goes wrong or in the case of more manual import procedures it is always good to check that the MRI and the surfaces are correctly aligned. * Right-click on the low-res cortex > MRI Registration > Check MRI/surface registration * The calculation of the interpolation between the MRI and the cortex surface takes a few seconds, but the result 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.<
><
> {{attachment:surface_register.gif||height="216",width="271"}} == 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. ==== Where are the files ? ==== * Leave your mouse during a few seconds over any node in the database explorer, 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/TutorialAuditory). What is displayed in the Brainstorm window is a comment and may have nothing to do with the real file name. For instance, the file name corresponding to "head mask" is ''tess_head_mask.mat''. * Almost all the files in the database are in Matlab .mat format. You can load and edit them easily in the Matlab environment, where they appear as structures with several fields.<
><
> {{attachment:file_tooltip.gif||height="122",width="482"}} ==== Popup menu: File ==== Right-click on a surface file: many menus can lead you to the files and their contents. . {{attachment:file_menu.gif}} * '''View file contents''': Display all the fields in the Matlab .mat file. <
><
> {{attachment:file_contents.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.<
><
> {{attachment:file_history.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 a structure that was 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 database explorer also supports 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. It "renames" the file in the database explorer, but does not the change the actual file name 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 a file explorer window in this directory. * '''Open terminal in this folder''': Start a system console in the file directory (Linux and MacOS only) ==== What are all those other files ? ==== * If you look in ''brainstorm_db/TutorialAuditory ''with the file explorer of your operating system, you'll find many other directories and files that are not visible in the database explorer.<
><
> {{attachment:file_disk.gif}} * The protocol TutorialAuditory is divided in ''Anatomy ''and ''Datasets ''directories: * Each subject in ''anat ''is described by an extra file: ''brainstormsubject.mat'' * Each folder 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 folders in Subject01 * '''data/Subject01/@intra''': Results of intra-subject analysis (across different folders) <> <>