22155
Comment:
|
13793
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
= Tutorial 12: Explore the average response = | = Tutorial 17: Visual exploration = |
Line 4: | Line 4: |
This tutorial illustrates the options Brainstorm offers to represent graphically and explore interactively the evoked responses we computed in the previous tutorial. It shows how to produce spatial maps of the sensors, temporal averages, save screen captures and movies. |
|
Line 6: | Line 8: |
= From continuous tutorials: = == Online filter == As introduced in the previous tutorials, you can add an online visualization filter to make the traces and the topographies look smoother. We suggest in this case a low-pass filter at 120Hz, because it shows very smooth traces, but all the waves we are interested in are still clearly visible in the MEG time series figure. {{http://neuroimage.usc.edu/brainstorm/Tutorials/TutRawAvg?action=AttachFile&do=get&target=onlineFilter.gif|onlineFilter.gif|class="attachment"}} == Explore the average == Open the time series for the "'''Avg: left'''". Then press '''Control+T''', to see on the side a spatial topography at the current time point. Then observe what is happening between 0ms and 100ms. Start at 0ms and play it like a movie using the arrow keys left and right, to follow the brain activity millisecond by millisecond: * '''16 ms''': First response, the sensory information reaches the right somatosensory cortex (S1) * '''30 ms''': Stronger and more focal activity in the same region, but with a source oriented in the opposite direction (S1) * '''60 ms''': Activity appearing progressively in a more lateral region (S1 + S2) * '''70 ms''': Activity in the same area in the left hemisphere (S2 left + S2 right) {{http://neuroimage.usc.edu/brainstorm/Tutorials/TutRawAvg?action=AttachFile&do=get&target=avg16.gif|avg16.gif|class="attachment"}} {{http://neuroimage.usc.edu/brainstorm/Tutorials/TutRawAvg?action=AttachFile&do=get&target=avg30.gif|avg30.gif|class="attachment"}} {{http://neuroimage.usc.edu/brainstorm/Tutorials/TutRawAvg?action=AttachFile&do=get&target=avg60.gif|avg60.gif|class="attachment"}} {{http://neuroimage.usc.edu/brainstorm/Tutorials/TutRawAvg?action=AttachFile&do=get&target=avg70.gif|avg70.gif|class="attachment"}} = From CTF = == Display recordings == Several display modes are available for recordings. They are all accessible with a right-click.The first four menus (MEG, MEG REF, Stim, Video), represent all the different types of channels that were found in the channel file. You can check that with Channel Edit (right-click on channel file > Edit). We are only interested in the "MEG" in this tutorial. Select Left / ERF > MEG > Display time series. {{http://neuroimage.usc.edu/brainstorm/Tutorials/TutExploreRecodings?action=AttachFile&do=get&target=treePopupRecordings.gif|treePopupRecordings.gif|class="attachment"}} . Now repeat this operation several times to display all the available modes: ''Display time series, 3D sensor cap, 2D sensor cap, 2D disc'' and ''2D Layout''. You should now see all the figures displayed below. Keep them opened for the next few paragraphs, you will learn how to manipulate multiple views of the same data. === Display time series === Amplitude fluctuations over time for all the sensors. {{http://neuroimage.usc.edu/brainstorm/Tutorials/TutExploreRecodings?action=AttachFile&do=get&target=dataTimeSeries.gif|dataTimeSeries.gif|class="attachment"}} Buttons available on the figure: * '''[<]''' and '''[>]''': Horizontal zoom around the current time point * '''[^]''' and '''[v]''': Vertical zoom * '''[Flip +/-'''''']''': Exchange the direction of the Y axis, useful in clinical EEG * '''[...'''''']''': Set the amplitude range manually, ie. the limits of the Y axis * '''[AS'''''']''': Amplitude auto-scale. When selected, the amplitude range (Y axis limits) is updated automatically when the figure is updated. This is useful mostly when reviewing continuous files or individual trials, it will be illustrated in other tutorials. List of mouse and keyboard operations for this type of figure (most of the operations are detailed later): * '''Mouse wheel''': Horizontal zoom * '''CTRL+mouse wheel''': Vertical zoom * '''Right click + move''': Move in zoomed figure * '''Left click + move''': Time selection * '''Left-click''': Set current time * '''Left-click on a line''': Select the corresponding sensor * ''' Shift + Left-click''': Force setting the current time, even when clicking on a sensor * '''Right-click''': Popup menu * '''Double-click''': Restore initial view (ie. unzoom) * '''Keyboard arrows''': Change current time * '''PageUp / PageDown''': Change current time (10 samples at a time) * Notes for Mac users: * All the actions involving the mouse wheel can be performed on MacBook laptops by moving up and down two fingers on the pad. * "PageUp" or "PageDown" keys are obtained by pressing the "Fn" key together with the arrows UP or DOWN === 3D Sensor cap / 2D Sensor cap / 2D Disc === The recordings at a given time instant and interpolated over a 2D or 3D surface. {{http://neuroimage.usc.edu/brainstorm/Tutorials/TutExploreRecodings?action=AttachFile&do=get&target=data3Dcap.gif|data3Dcap.gif|height="175px",width="204px",class="attachment"}} {{http://neuroimage.usc.edu/brainstorm/Tutorials/TutExploreRecodings?action=AttachFile&do=get&target=data2Dcap.gif|data2Dcap.gif|height="174px",width="203px",class="attachment"}} {{http://neuroimage.usc.edu/brainstorm/Tutorials/TutExploreRecodings?action=AttachFile&do=get&target=data2Ddisc.gif|data2Ddisc.gif|height="173px",width="201px",class="attachment"}} Keyboard and mouse shortcuts: * '''Mouse wheel''': Zoom / unzoom * '''Left click + move''': Rotate (3D only) * '''Middle click + move''': Or left+right click + move: Move in zoomed figure * '''Right click + move''': Select sensors (2D only, when sensors are visible, see below) |
== 2D/3D topography == The sensor values at one time instant can be represented on a surface. Each amplitude value gets associated with a color using a colormap (described in the next tutorial). We call this type of representation "sensor topography", it shows the spatial distribution of the magnetic fields (or electric potentials). * Show the MEG signals for the '''standard average''' in '''Run#01''' (double-click on the file). This gives us a direct feedback of the current time instant and allows to jump quickly to a different time. * Right-click on the same file > MEG > select the menus: '''3D sensor cap''', '''2D sensor cap''', '''2D disc'''. <<BR>><<BR>> {{attachment:explore_topo.gif||height="281",width="669"}} * '''3D sensor cap''': Represents the real 3D positions of the sensors. * '''2D sensor cap''': The sensors are projected on a 2D plane. Realistic distribution of the sensors. * '''2D disc''': The sensors are projected on a sphere, then displayed as flat disc. Sometimes distorted... * In each of these views, you can add markers to indicate the sensors and their labels.<<BR>>Right-click on the figure > Channels > '''Display sensors/labels''' (or Ctrl+E). * You can change the number of contour lines: Right-click > '''Contour lines''' > 0-20.<<BR>><<BR>> {{attachment:explore_contours.gif||height="145",width="647"}} * In the 3D view, you can notice a hole in the right-occipital area. It corresponds to a damaged sensor in the MEG system we used for collecting this dataset. * For '''EEG/sEEG/ECoG''' recordings, there is an additional representation mode available: <<BR>>"'''3D Electrode'''". This will be detailed in the advanced tutorials corresponding to these modalities. <<BR>><<BR>> {{attachment:explore_3delectrode.gif||height="180",width="584"}} <<TAG(Advanced)>> == Magnetic interpolation == By default, some of the views re-interpolate the fields that are recorded by the MEG sensors to get smoother displays. A simple inverse problem and forward problem are solved to reconstruct the magnetic fields on a high-resolution surface of virtual magnetometers (function channel_extrapm.m). On Elekta-Neuromag systems, this interpolation has the effect of converting the topographies of the planar gradiometers into topographies of magnetometers, which deeply affects the display. The menu '''"No magnetic interpolation"''' offers the same views, but without using this reconstruction of the magnetic field. A spatial interpolation of the values between the sensors is performed instead. . {{attachment:explore_nointerp.gif||height="251",width="351"}} <<TAG(Advanced)>> == 2D Layout == The menu 2D Layout represents, in the same figure, the '''spatial information''' (the values for each channel is represented where the sensor is actually located) and the '''temporal information''' (instead of just one single value, we represent the signal around the current time). <<BR>>The light gray lines represent the zero amplitude (horizontal) and the current time (vertical lines). Only a part of the full time window is displayed for each channel, before and after the current time. The length of this time window can be modified either with the mouse shortcut '''Ctrl+mouse wheel''', or with the 2D Layout options, in the figure popup menu. The amplitude of the signal can be controlled with the shortcut '''Shift+mouse wheel'''. . {{attachment:explore_2dlayout.gif||height="272",width="546"}} <<TAG(Advanced)>> == Display as image == The menu "Display as image" shows the same information as the "time series" view, but the values for each sensor are represented with a color instead of a line. . {{attachment:explore_image.gif||height="200",width="660"}} <<TAG(Advanced)>> == Time selection == Click somewhere on the white part of the time series figure, hold the mouse button, and drag your mouse left or right: A transparent blue rectangle appears to represent the time selection. If you right-click on the figure, new options become available in the popup menu: * '''Set current time''': Move the time cursor where the right-click occurred. The shortcut '''Shift+Click''' can be useful when trying to move in time on dense displays in columns view. * '''Set selection manually''': Type the beginning and end of the selected window (in milliseconds). * '''Average time''': Average over the selected time window and save it as a new file in the database. <<BR>>Note that the best way to do this is to run the process "'''Average > Average time'''". * '''Export to database''': Extract the recordings and save them in a new file in the database.<<BR>>If some sensors are selected, only their values are extracted, all the others are set to zero.<<BR>>Note that the best way to do this is to run the process "'''Extract > Extract time'''". * '''Export to file''': Same, but in a user-defined file (not in the database). * '''Export to Matlab''': Same, but export the selection as a variable in the current Matlab workspace. <<BR>><<BR>> {{attachment:explore_timeselect.gif||height="200",width="434"}} <<TAG(Advanced)>> == Snapshots == Using Brainstorm, you will quickly feel like saving the beautiful images you produce. Your operating system already provides some nice tools for doing this. Many other options are available in the "Snapshot" menu, accessible with a right-click on any Brainstorm figure. ==== Operating system ==== * '''Windows/Linux''': Press the '''PrintScreen''' key on your keyboard and paste the copied screen in your favorite image or text editor. The combination '''Alt+PrintScreen''' only copies the figure that is currently selected. * '''MacOS''': Many more options available, Google for the best ones ([[http://graphicssoft.about.com/od/screencapturemac/ht/macscreenshot.htm|see example]]). ==== Snapshot menu ==== * The options available in the Snapshot menu depend on the type of data represented. Examples: <<BR>><<BR>> {{attachment:explore_snapshot.gif||height="262",width="614"}} * '''Save as image''': Save the figure in a file, without the title bar and borders. Many formats available. * '''Open as image''': Capture the figure and open it in as an image. This can be useful if you want to visually compare the selected figure with another one that you cannot display at the same time (because they have different time or frequency definitions). * '''Open as figure''': Similar, but copies the figure as a new Matlab figure with some interactivity. * '''Contact sheet and movies''': See next section. * '''Export to database''': Save the recordings in the figure as a new entry in the database. <<BR>>If there are selected channels, only their values will be saved, the others being set to zero. * '''Export to file''': Extract the time series displayed in this figure (or only the selected sensors), and save them in a file. Several exchange file formats available for exporting to another program. * '''Export to Matlab''': Same thing, but exports the structure in a variable of the Matlab workspace. * '''Save as SSP projector''': Create an SSP projector that removes the current topography. * '''Save surface''': Save the surface in a file, with the current modifiers applied (smooth, resect). <<TAG(Advanced)>> == Movie studio == * '''Movie (horizontal/vertical)''': Rotate spatially the 3D scene. * '''Movie (time): Selected figure''': Create .avi movies to show the evolution of the selected figure. * The dimensions of the movie depend on the actual size of the figure on the screen. <<BR>>Resize the figure to the appropriate dimensions for the movie before using this menu. * Zoom in/out (mouse wheel) and move the image (middle click+move) to give enough space to the time stamp that is added at the bottom-left of the rendered movie. * Don't do anything else while rendering: the captured figure must be visible all the time. * '''Movie (time): All figures''': Instead of capturing one figure only, it captures them all. Arrange your figures the way you want and create a movie of all your workspace at once.<<BR>><<BR>> {{attachment:movie_options.gif||height="285",width="139"}} {{attachment:movie.gif}} <<TAG(Advanced)>> == Contact sheets == A contact sheet is a large image representing many time frames of the same figure. * Same recommendations as for movies: if you don't want the final image to be too big, reduce the size of the figure, zoom in, move, hide the colorbar. Keep the figure visible during the capture. * At the end, the image is displayed in an image viewer with which you can zoom (menu or wheel), move (click+move) and save the image (File > Save as). * Example for the '''standard average''', run#01: <<BR>><<BR>> {{attachment:contact_options.gif||height="220",width="135"}} {{attachment:contact_standard.gif||height="283",width="340"}} <<TAG(Advanced)>> == Edit the figures == All the figures can be edited with the Figure popup menu: . {{attachment:explore_figure.gif||height="319",width="403"}} If you select both "'''Matlab controls'''" and "'''Plot edit toolbar'''", you will get all the tools available in the Matlab environment to explore the data and edit the figure. Select the button "'''Edit plot'''" to edit the graphic properties of an object (eg. select a signal, then right-click on it to edit its properties) or unselect it to get back to the regular Brainstorm figure interactivity. . {{attachment:figure_edit.gif||height="215",width="326"}} <<TAG(Advanced)>> == Mouse shortcuts == '''Scroll''' * '''Mouse wheel''': Zoom in / zoom out * '''Control + mouse wheel''': Change the length of the displayed time window (2D Layout) * '''Control + mouse wheel''': Vertical zoom (time series) '''Click''' * '''Left click + move''': Rotate (3D) or select (time) * '''Middle click + move''': Move in zoomed figure (ie. panning) * '''Left click + right click + move''': Move in zoomed figure (ie. panning) * '''Shift + left click''': Force setting the current time, ignoring if a line was clicked (time series) * '''Right click + move''': Vertical zoom (time series) * '''Right click + move''': Select sensors (2D topography) |
Line 91: | Line 153: |
* '''Left click on the colorbar + move''': Change contrast (up/down) and brightness (left/right) * '''Control + E''': Display the channels markers and/or names * '''Keyboard arrows''': Change current time * '''PageUp / PageDown''': Change current time (10 samples at a time) / Mac: Fn+UP/Fn+Down === 2D layout === The time course of each channel is drawn at the actual position of the electrode, projected in 2D the same way as ''2D Sensor cap''. The light gray lines represent the zero amplitude (horizontal) and the current time (vertical lines). {{http://neuroimage.usc.edu/brainstorm/Tutorials/TutExploreRecodings?action=AttachFile&do=get&target=data2Dlayout.gif|data2Dlayout.gif|class="attachment"}} {{http://neuroimage.usc.edu/brainstorm/Tutorials/TutExploreRecodings?action=AttachFile&do=get&target=data2DlayoutWhite.gif|data2DlayoutWhite.gif|class="attachment"}} {{http://neuroimage.usc.edu/brainstorm/Tutorials/TutExploreRecodings?action=AttachFile&do=get&target=data2DlayoutMenu.gif|data2DlayoutMenu.gif|class="attachment"}} Only a part of the full time window is displayed for each channel, before and after the current time. The length of this time window can be modified either with the mouse shortcut Control+wheel, or with the 2D Layout options, in the figure popup menu. Other options are also available in the popup menu. * '''Mouse wheel''': Zoom / unzoom * '''Middle click + move''': (or left+right click + move) Move into the zoomed figure * '''Shift + mouse wheel''': Increase/decrease the amplitude gain of the channels * '''Control + mouse wheel''': Increase/decrease the length of the time window around the current time |
* '''Double-click''': Restore initial view '''Click on something''' |
Line 116: | Line 159: |
* '''Right click + move''': Select a group of sensors * '''Shift + click on a line''': Select one sensor and unselect all the others Display the time-frequency decomposition for the selected sensor, when available * '''Right-click''': Display popup menu. Sub-menu "2DLayout options" offer some configuration options for this type of figure. * '''Control + E''': Display/hide the channels names * '''Keyboard arrows''': Change current time * '''PageUp / PageDown''': Change current time (10 samples at a time) / Mac: Fn+UP/Fn+Down === Magnetic interpolation === Some of the views (3D Sensor cap / 2D Sensor cap / 2D Disc), are by default re-interpolating the field that is recorded by the sensors to get much smoother displays. A simple inverse problem + forward problem are solved to reconstruct the magnetic fields on a high-resolution surface. The menu '''"No magnetic interpolation"''' offer the same views, but without using this reconstruction of the magnetic field, and performing instead a spatial interpolation of the values between the sensors. {{http://neuroimage.usc.edu/brainstorm/Tutorials/TutExploreRecodings?action=AttachFile&do=get&target=data3DcapRaw.gif|data3Dcap.gif|height="175px",width="204px",class="attachment"}} {{http://neuroimage.usc.edu/brainstorm/Tutorials/TutExploreRecodings?action=AttachFile&do=get&target=data2DcapRaw.gif|data2Dcap.gif|height="174px",width="203px",class="attachment"}} {{http://neuroimage.usc.edu/brainstorm/Tutorials/TutExploreRecodings?action=AttachFile&do=get&target=data2DdiscRaw.gif|data2Ddisc.gif|height="173px",width="201px",class="attachment"}} === Important note === If you are experiencing any kind of graphic bug, you should try to disable the OpenGL renderer. In Brainstorm main window, select menu File > Set preferences, and check the option "OpenGL: Disabled (no transparency)". All the 3D views would be very slow and with no transparency, but it may solve all the problems. This is more likely to happen on 64bit machines or when working on a remote system (X-server, VirtualBox, Windows remote desktop connection...). You may also try keeping the OpenGL renderer but typing "opengl software" before you run Brainstorm. It would force Matlab to do a software OpenGL rendering instead of using the 3D hardware accelerations. The display would be similar to hardware OpenGL but much slower. == Time exploration == The time window and the current time instant are centralized and managed from the top of the Brainstorm window. You can use the text box or the buttons to change the current time value. All the figures always stay synchronized, you cannot display the 2D disc topography at t=10ms and the 3D sensor cap topography at t=50ms at the same time. It might look too restrictive at the beginning, but the contrary would have made the interface much too complex; we wanted to keep it as simple and intuitive as possible. {{http://neuroimage.usc.edu/brainstorm/Tutorials/TutExploreRecodings?action=AttachFile&do=get&target=timeWindow.gif|timeWindow.gif|class="attachment"}} The time window panel is not the best way to explore your recordings. There are many other shortcuts that are much faster to navigate through the time. * '''Click on ''''''time series'''''' figure''': Left-click in any white area of the figure: it will move the time cursor at this point and update all the other figures to match this new value. Don't click on a black line, it would select the corresponding channel instead of moving the time cursor. * '''Press the keyboard arrows''': Click on any data figure and try to press several time the left and right arrows, and also the ''PageUp ''and ''PageDown ''keys. This feature is really useful when you want to quickly see how the recordings are changing in time. Try holding the arrow keys for a while. It might be a bit slow because you have many figures to refresh at each time change. It is much faster if you have only one 2D figure to refresh. '''To remember''': An efficient and quick way to review your recordings just after importation is to: 1. Open a Time series window (double click on recordings file) 1. Click on the time of interest (eg. first response peak) 1. Open a topography view of your choice (2D disc, 2D sensor cap, or 3D sensor cap) You can do this by right-clicking on the time series figure > MEG Topography (or Ctrl+T keyboard shortcut). 1. Use the left/right arrows, and PageUp/PageDown keys (or Fn+Up / Fn+Down on a Mac) == Sensors selection == You can select some channels, and then display them separately or mark them as good or bad. 1. Now close all the figures except the ''Time series'' and the ''2D Sensor cap'' topography (if you don't remember which one it was, close everything and open again these two figures). 1. On ''2D Sensor cap'' figure: right-click anywhere on the window ''> Channels > Display sensors''. You'll see white dots representing the center of each MEG coil. Note that there is keyboard shortcut indicated for this menu: ''Ctrl + E''. 1. Press'' Ctrl + E'' several times and see what happens. Come back to the display with only the sensors markers (no labels). 1. Click on some white dots. * They turn red and the corresponding lines in the time series window also turn red * Left-click on the lines in the time series window: it also selects the sensors * Right-click on a red line in time series figure: shows the name and index of the selected channel * Click on a selected (red) point or line: the sensor is deselected. * To deselect all the sensors, press ''Escape'' or ''right-click > Channels > Reset selection'' 1. Now select randomly three sensors. . {{http://neuroimage.usc.edu/brainstorm/Tutorials/TutExploreRecodings?action=AttachFile&do=get&target=channelSelection.gif|channelSelection.gif|height="174px",width="545px",class="attachment"}} 1. Right-click > Channels > View selected (Shortcut = Enter key). A new window is created, with only those three sensors, whose names are indicated in a legend box (you can move this legend if needed). . {{http://neuroimage.usc.edu/brainstorm/Tutorials/TutExploreRecodings?action=AttachFile&do=get&target=channelPopupMenu.gif|channelPopupMenu.gif|height="143px",width="327px",class="attachment"}} {{http://neuroimage.usc.edu/brainstorm/Tutorials/TutExploreRecodings?action=AttachFile&do=get&target=channelViewSelected.gif|channelViewSelected.gif|height="121px",width="295px",class="attachment"}} 1. Close that last figure. In the 2D topography figure, right-click and move the mouse to select a group of sensors, just to remember that this feature exists. . {{http://neuroimage.usc.edu/brainstorm/Tutorials/TutExploreRecodings?action=AttachFile&do=get&target=channelGroupSelection.gif|channelGroupSelection.gif|class="attachment"}} == Time series in columns == There are two display modes for the MEG signals: "butterfly", what we've seen until now, or "column". Double click on Left/ERP to open a time series figure. To switch from the current mode to the "column" mode, click on {{http://neuroimage.usc.edu/brainstorm/Tutorials/TutExploreRecodings?action=AttachFile&do=get&target=buttonTsCol.gif|buttonTsCol.gif|class="attachment"}} in the Record tab. * The figure you get is unreadable because it contains the 151 sensors in the same figure. There are several ways to get a readable display: you need to select a subset of the channels, zoom and/or to increase the gain of the channels. . {{http://neuroimage.usc.edu/brainstorm/Tutorials/TutExploreRecodings?action=AttachFile&do=get&target=tsColumn.gif|tsColumn.gif|class="attachment"}} * Start by maximizing the size of the figure. If you have a large screen, you might be already able to see something. * '''Channel gain''': You can increase/decrease the amplitude of the traces in different ways: * Click on the up/down buttons on the right side of the figure * Click on the "..." button on the right of the window to set manually the gain value for each vertical unit in the graph (distance between two horizontal lines). * Press the "+" or "-" keys on your keyboard * Hold the SHIFT key down, and use the mouse wheel to zoom/unzoom * '''Vertical zoom''': Hold the CTRL key down, and use the mouse wheel to zoom in or out. * '''Horizontal zoom''': * Click on the "<" and ">" buttons at the bottom of the window * Use the mouse wheel to zoom in or out. * '''Move in the zoomed figure''': Hold down left and right buttons of the mouse, and move the mouse. * You can reach some display results that are already a little more interesting: . {{http://neuroimage.usc.edu/brainstorm/Tutorials/TutExploreRecodings?action=AttachFile&do=get&target=tsColumnZoom.gif|tsColumnZoom.gif|class="attachment"}} * '''Reset initial view''': Double-click == Snapshots == Using Brainstorm, you will quickly feel like saving the beautiful images you produce. For that you can: * Press the ''PrintScreen'' key on your keyboard and paste the copied screen in your favorite image or text editor (PC or Linux) * More subtle: ''Alt+PrintScreen'' would only copy the figure that is currently selected (PC or Linux). * On MacOS: Many more options available, Google for the best ones ([[http://graphicssoft.about.com/od/screencapturemac/ht/macscreenshot.htm|see example]]). * The ''Snapshots ''menu present in the popup of all the figures can be useful too. Here are two examples of Snapshots menus, respectively on time series and 3D figures: {{http://neuroimage.usc.edu/brainstorm/Tutorials/TutExploreRecodings?action=AttachFile&do=get&target=snapshotsTS.gif|snapshotsTS.gif|class="attachment"}} --- {{http://neuroimage.usc.edu/brainstorm/Tutorials/TutExploreRecodings?action=AttachFile&do=get&target=snapshotsTopo.gif|snapshotsTopo.gif|class="attachment"}} * '''Save as image''': save the figure (without the title bar and borders) in a file. Many formats available. * '''Open as image''': capture the figure and open it in as an image. This can be useful if you want to compare visually the selected figure with another one that you cannot display at the same time (because they have different time or frequency definitions) * '''Export to database''': saves the recordings in the figure as a new entry in database * If there are selected channels, only their values will be saved, the others being set to zero. * '''Save time series''': extract the time series displayed in this figure (or only the selected sensors), and save them in a file. Available formats: * ASCII (.txt) * Matlab (.mat): saves much more information (titles, time values, etc.) * Cartool (.eph) * EGI (.raw) * '''Export to Matlab''': Same thing, but exports the structure in a variable in Matlab workspace instead of creating a new file. * '''Movie (time): Selected figure''': Create .avi movies to show time evolution of the selected figure. * The dimensions of the movie image depend on the actual size of the figure on the screen. * Don't do anything else while creating the movies: the figure which is captured must be visible all the time. * '''Movie (time): All figures''': Instead of capturing one figure only, it captures them all and creates a movie showing what you see on the screen. Arrange your figures the way you want and create a movie of all your workspace at once. {{http://neuroimage.usc.edu/brainstorm/Tutorials/TutExploreRecodings?action=AttachFile&do=get&target=movie.gif|movie.gif|class="attachment"}} * '''Movie (horizontal/vertical)''': Rotate spatially the 3D scene. * '''Contact sheet''': Produce a big image with all the time frames in it. * Same recommendations than for movies: if you don't want the final image to be too big, reduce the size of your figure, zoom a bit, and maybe hide the colorbar. Don't hide the figure during the capture. * At the end, the image is displayed in a viewer with which you can zoom (menu or wheel), move (left-click+move), and save the image (File > Save as). * The contact sheet menu also appears for the time series figure, which is not that interesting because nothing changes except for the position of the time cursor. However, it can make sense to use in combination with the same contact sheet for a 2D/3D figure. Displaying the two images side by side you would have a clear view of the exact timing of each topography. {{http://neuroimage.usc.edu/brainstorm/Tutorials/TutExploreRecodings?action=AttachFile&do=get&target=contactSheet.gif|contactSheet.gif|height="299px",width="487px",class="attachment"}} * '''Figure menu''': Various options to edit the selected figure. |
* '''Shift + click on a line''': Select a sensor and unselect all the others (2D topography) * '''Click on the colorbar + move''': Change contrast (up/down) and brightness (left/right) <<TAG(Advanced)>> |
Line 259: | Line 168: |
* '''Arrows: '''left, right, PageUp, PageDown: Move in time | * '''Arrows: '''Left, right, PageUp, PageDown: Move in time |
Line 265: | Line 174: |
* '''Enter''': View time series for selected sensors * '''Shift + Enter''': Set all the bad sensors as good (=brings back all the channels in the display) |
* '''Enter''': View time series for the selected sensors |
Line 271: | Line 178: |
* '''Shift + Escape''': Set all the bad sensors as good (=brings back all the channels in the display) |
|
Line 273: | Line 182: |
* '''Ctrl + A''': Add event in raw file viewer (see raw file viewer tutorial) |
|
Line 279: | Line 186: |
* '''Ctrl + E''': Show sensors and labels (E stands initially for ''Electrode'') | * '''Ctrl + E''': Show sensors markers and labels (E=''Electrode'') or add an event marker (E=''Event'') * '''Ctrl + F''': Copy figure, removes all the callbacks and detach from Brainstorm figure management |
Line 283: | Line 192: |
* '''Ctrl + R''': Open ''Time series'' view (R stands for ''Recordings'') * '''Ctrl + S''': Open ''Sources'' view (see next tutorial) * '''Ctrl + T''': Open ''2D sensor cap'' view (T stands for ''Topography'') * '''Shift + letter''': Change sensors display when in "column" display mode for the time series. |
* '''Ctrl + J''': Open figure as an image * '''Ctrl + R''': Open ''Time series'' view (R=''Recordings'') * '''Ctrl + S''': Open ''Sources'' view (S=''Sources'') * '''Ctrl + T''': Open ''2D sensor cap'' view (T=''Topography'') * '''Shift + letter''': Change selected montage |
Line 293: | Line 204: |
* '''1, 2, 3, 4, 5, 6, 7, 8, 9, 0''': Set a pre-defined 3D view * '''+ / -''': Increase/decrease the channel gain (vertical zoom for time series) * '''=''': Apply view to all figures * '''*''': Apply montage to all figures |
|
Line 294: | Line 213: |
* PageUp = Fn + UP * PageDown = Fn + DOWN * F1 = Fn + F1 |
* PageDown = '''Fn''' + DOWN * PageUp = '''Fn''' + UP * F1 = '''Fn''' + F1 |
Line 302: | Line 221: |
<<EmbedContent("http://neuroimage.usc.edu/bst/get_prevnext.php?prev=Tutorials/Averaging&next=Tutorials/HeadModel")>> | <<TAG(Advanced)>> == Graphic bugs == If you observe any graphic problem with these displays, there might be an issue with the OpenGL drivers. You may try the following options. * Update the drivers for your graphics card. * Upgrade your version of Matlab. * Run the compiled version of Brainstorm (see [[http://neuroimage.usc.edu/brainstorm/Installation|Installation]]). * Turn off the OpenGL hardware acceleration: Menu File > Edit preferences > ''Software'' or ''Disabled''. * Send a bug report to the Mathworks. <<HTML(<!-- END-PAGE -->)>> <<EmbedContent("http://neuroimage.usc.edu/bst/get_prevnext.php?prev=Tutorials/Averaging&next=Tutorials/Colormaps")>> |
Tutorial 17: Visual exploration
Authors: Francois Tadel, Elizabeth Bock, Sylvain Baillet
This tutorial illustrates the options Brainstorm offers to represent graphically and explore interactively the evoked responses we computed in the previous tutorial. It shows how to produce spatial maps of the sensors, temporal averages, save screen captures and movies.
Contents
2D/3D topography
The sensor values at one time instant can be represented on a surface. Each amplitude value gets associated with a color using a colormap (described in the next tutorial). We call this type of representation "sensor topography", it shows the spatial distribution of the magnetic fields (or electric potentials).
Show the MEG signals for the standard average in Run#01 (double-click on the file). This gives us a direct feedback of the current time instant and allows to jump quickly to a different time.
Right-click on the same file > MEG > select the menus: 3D sensor cap, 2D sensor cap, 2D disc.
3D sensor cap: Represents the real 3D positions of the sensors.
2D sensor cap: The sensors are projected on a 2D plane. Realistic distribution of the sensors.
2D disc: The sensors are projected on a sphere, then displayed as flat disc. Sometimes distorted...
In each of these views, you can add markers to indicate the sensors and their labels.
Right-click on the figure > Channels > Display sensors/labels (or Ctrl+E).You can change the number of contour lines: Right-click > Contour lines > 0-20.
- In the 3D view, you can notice a hole in the right-occipital area. It corresponds to a damaged sensor in the MEG system we used for collecting this dataset.
For EEG/sEEG/ECoG recordings, there is an additional representation mode available:
"3D Electrode". This will be detailed in the advanced tutorials corresponding to these modalities.
Magnetic interpolation
By default, some of the views re-interpolate the fields that are recorded by the MEG sensors to get smoother displays. A simple inverse problem and forward problem are solved to reconstruct the magnetic fields on a high-resolution surface of virtual magnetometers (function channel_extrapm.m).
On Elekta-Neuromag systems, this interpolation has the effect of converting the topographies of the planar gradiometers into topographies of magnetometers, which deeply affects the display.
The menu "No magnetic interpolation" offers the same views, but without using this reconstruction of the magnetic field. A spatial interpolation of the values between the sensors is performed instead.
2D Layout
The menu 2D Layout represents, in the same figure, the spatial information (the values for each channel is represented where the sensor is actually located) and the temporal information (instead of just one single value, we represent the signal around the current time).
The light gray lines represent the zero amplitude (horizontal) and the current time (vertical lines).
Only a part of the full time window is displayed for each channel, before and after the current time. The length of this time window can be modified either with the mouse shortcut Ctrl+mouse wheel, or with the 2D Layout options, in the figure popup menu. The amplitude of the signal can be controlled with the shortcut Shift+mouse wheel.
Display as image
The menu "Display as image" shows the same information as the "time series" view, but the values for each sensor are represented with a color instead of a line.
Time selection
Click somewhere on the white part of the time series figure, hold the mouse button, and drag your mouse left or right: A transparent blue rectangle appears to represent the time selection. If you right-click on the figure, new options become available in the popup menu:
Set current time: Move the time cursor where the right-click occurred. The shortcut Shift+Click can be useful when trying to move in time on dense displays in columns view.
Set selection manually: Type the beginning and end of the selected window (in milliseconds).
Average time: Average over the selected time window and save it as a new file in the database.
Note that the best way to do this is to run the process "Average > Average time".Export to database: Extract the recordings and save them in a new file in the database.
If some sensors are selected, only their values are extracted, all the others are set to zero.
Note that the best way to do this is to run the process "Extract > Extract time".Export to file: Same, but in a user-defined file (not in the database).
Export to Matlab: Same, but export the selection as a variable in the current Matlab workspace.
Snapshots
Using Brainstorm, you will quickly feel like saving the beautiful images you produce. Your operating system already provides some nice tools for doing this. Many other options are available in the "Snapshot" menu, accessible with a right-click on any Brainstorm figure.
Operating system
Windows/Linux: Press the PrintScreen key on your keyboard and paste the copied screen in your favorite image or text editor. The combination Alt+PrintScreen only copies the figure that is currently selected.
MacOS: Many more options available, Google for the best ones (see example).
Snapshot menu
The options available in the Snapshot menu depend on the type of data represented. Examples:
Save as image: Save the figure in a file, without the title bar and borders. Many formats available.
Open as image: Capture the figure and open it in as an image. This can be useful if you want to visually compare the selected figure with another one that you cannot display at the same time (because they have different time or frequency definitions).
Open as figure: Similar, but copies the figure as a new Matlab figure with some interactivity.
Contact sheet and movies: See next section.
Export to database: Save the recordings in the figure as a new entry in the database.
If there are selected channels, only their values will be saved, the others being set to zero.Export to file: Extract the time series displayed in this figure (or only the selected sensors), and save them in a file. Several exchange file formats available for exporting to another program.
Export to Matlab: Same thing, but exports the structure in a variable of the Matlab workspace.
Save as SSP projector: Create an SSP projector that removes the current topography.
Save surface: Save the surface in a file, with the current modifiers applied (smooth, resect).
Movie studio
Movie (horizontal/vertical): Rotate spatially the 3D scene.
Movie (time): Selected figure: Create .avi movies to show the evolution of the selected figure.
The dimensions of the movie depend on the actual size of the figure on the screen.
Resize the figure to the appropriate dimensions for the movie before using this menu.- Zoom in/out (mouse wheel) and move the image (middle click+move) to give enough space to the time stamp that is added at the bottom-left of the rendered movie.
- Don't do anything else while rendering: the captured figure must be visible all the time.
Movie (time): All figures: Instead of capturing one figure only, it captures them all. Arrange your figures the way you want and create a movie of all your workspace at once.
Contact sheets
A contact sheet is a large image representing many time frames of the same figure.
- Same recommendations as for movies: if you don't want the final image to be too big, reduce the size of the figure, zoom in, move, hide the colorbar. Keep the figure visible during the capture.
At the end, the image is displayed in an image viewer with which you can zoom (menu or wheel), move (click+move) and save the image (File > Save as).
Example for the standard average, run#01:
Edit the figures
All the figures can be edited with the Figure popup menu:
If you select both "Matlab controls" and "Plot edit toolbar", you will get all the tools available in the Matlab environment to explore the data and edit the figure. Select the button "Edit plot" to edit the graphic properties of an object (eg. select a signal, then right-click on it to edit its properties) or unselect it to get back to the regular Brainstorm figure interactivity.
Mouse shortcuts
Scroll
Mouse wheel: Zoom in / zoom out
Control + mouse wheel: Change the length of the displayed time window (2D Layout)
Control + mouse wheel: Vertical zoom (time series)
Click
Left click + move: Rotate (3D) or select (time)
Middle click + move: Move in zoomed figure (ie. panning)
Left click + right click + move: Move in zoomed figure (ie. panning)
Shift + left click: Force setting the current time, ignoring if a line was clicked (time series)
Right click + move: Vertical zoom (time series)
Right click + move: Select sensors (2D topography)
Right click: Popup menu
Double-click: Restore initial view
Click on something
Click on a line: Select a sensor
Shift + click on a line: Select a sensor and unselect all the others (2D topography)
Click on the colorbar + move: Change contrast (up/down) and brightness (left/right)
Keyboard shortcuts
Here is a memo of all the keyboard shortcuts for time series and topography figures. If you don't remember them, you can find most of them in the figure popup menus.
Arrows: Left, right, PageUp, PageDown: Move in time
Delete: Mark selected sensors as bad
Shift + Delete: Mark non-selected sensors as bad (=keeps ony the selected sensors)
Enter: View time series for the selected sensors
Escape: Unselect all the selected sensors
Shift + Escape: Set all the bad sensors as good (=brings back all the channels in the display)
Ctrl + A: Show axis on 3D figures (X,Y,Z)
Ctrl + B: Set trial as bad
Ctrl + D: Dock/undock figure in Matlab's figures list
Ctrl + E: Show sensors markers and labels (E=Electrode) or add an event marker (E=Event)
Ctrl + F: Copy figure, removes all the callbacks and detach from Brainstorm figure management
Ctrl + I: Save figure as image
Ctrl + J: Open figure as an image
Ctrl + R: Open Time series view (R=Recordings)
Ctrl + S: Open Sources view (S=Sources)
Ctrl + T: Open 2D sensor cap view (T=Topography)
Shift + letter: Change selected montage
F1, F2, F3: with or without Shift, calls the database navigator (F1=subject, F2=condition, F3=file)
1, 2, 3, 4, 5, 6, 7, 8, 9, 0: Set a pre-defined 3D view
+ / -: Increase/decrease the channel gain (vertical zoom for time series)
=: Apply view to all figures
*: Apply montage to all figures
- Notes for Mac users:
PageDown = Fn + DOWN
PageUp = Fn + UP
F1 = Fn + F1
Mouse wheel = Two finger up/down on the MacBook pad
Graphic bugs
If you observe any graphic problem with these displays, there might be an issue with the OpenGL drivers. You may try the following options.
- Update the drivers for your graphics card.
- Upgrade your version of Matlab.
Run the compiled version of Brainstorm (see Installation).
Turn off the OpenGL hardware acceleration: Menu File > Edit preferences > Software or Disabled.
- Send a bug report to the Mathworks.