5470
Comment:
|
7813
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
= Colormaps = = From CTF = == Colormap configuration == * Open a ''2D sensor cap'' view, and play with colors. * Brainstorm keeps track of many user-defined colormaps: anatomy, EEG, MEG, sources, stat, time, time-frequency, etc. You can go to the Colormaps menu in the main window to see this list. Usually, you will use only popup menus from specific figures to edit the colormaps. |
= Tutorial 18: Colormaps = ''Authors: Francois Tadel, Elizabeth Bock, Sylvain Baillet'' When displaying signals on the sensor array or on the cortex surface, we need to convert the amplitude of the signal into a color. The way the values are mapped to colors has a lot of influence over the visual interpretation of the figures. The selection of the appropriate colormap is an important step of the data exploration. <<TableOfContents(2,2)>> == Colormap menus == Brainstorm keeps track of many user-defined colormaps: anatomy, EEG, MEG, sources, stat, time, time-frequency, etc. You can go to the Colormaps menu in the main window to see this list. . {{attachment:colormap_all.gif||height="330",width="353"}} Usually, you will use only popup menus from specific figures to edit the colormaps. * Open a topography view for the standard average (right-click > MEG > 2D Sensor cap). * Right-click on the figure, you will only see the menu "'''Colormap: MEG recordings'''". |
Line 7: | Line 19: |
* You are going to manipulate only with the MEG colormap, but the others work exactly the same way. * Right-click on you ''2D sensor cap'' figure > Colormap. |
|
Line 10: | Line 20: |
{{http://neuroimage.usc.edu/brainstorm/Tutorials/TutExploreRecodings?action=AttachFile&do=get&target=colormapPopup.gif|colormapPopup.gif|class="attachment"}} | == Set the color array == A colormap is an array of colors that are indexed and then mapped to values. It is represented by a [Nx3] matrix, where N is the number of colors available in it. Each color is coded with three values corresponding its relative levels of red, green and blue. In Matlab, the colors are coded between 0 and 1. To get an example, type "jet" in the Matlab command window, you will get the default values for the "jet" colormap. |
Line 12: | Line 23: |
* '''Colormap''': You can change the colors that are used to represent the recorded MEG values. You can create your own colormaps with the Matlab colormap editor, clicking on the last option ''Custom''. | We offer two ways of creating this array of colors in Brainstorm: you can use standard color arrays (modulated in contrast and brightness) or define your own. |
Line 14: | Line 25: |
* '''Absolute values''': Display the absolute values of the recordings, instead of the original values. * This is the default for ''Anatomy, Sources'' and ''Stat ''colormaps, but it is not very useful for recordings: for EEG and MEG, the sign of the values is very important. |
* '''Colormap name''': The standard colormaps are referred to with names (bone, grey, jet, rwb, etc). Just pick a different color set in the menu to update all the figures with similar data types.<<BR>><<BR>> {{attachment:colormap_name.gif||height="115",width="450"}} |
Line 17: | Line 27: |
{{http://neuroimage.usc.edu/brainstorm/Tutorials/TutExploreRecodings?action=AttachFile&do=get&target=colormapDefault.gif|colormapDefault.gif|class="attachment"}} {{http://neuroimage.usc.edu/brainstorm/Tutorials/TutExploreRecodings?action=AttachFile&do=get&target=colormapAbsolute.gif|colormapAbsolute.gif|class="attachment"}} ''Fig.1: Relative values; Fig.2: Absolute values '' |
* '''Brightness''': Moves the center of the color array up and down. Example values: -80, 0, +80.<<BR>><<BR>> {{attachment:colormap_brightness.gif||height="115",width="450"}} |
Line 20: | Line 29: |
* '''Maximum''': How is the maximum of the colorbar estimated, for the color correspondence. * '''Global''': The bounds of the colormap are set to the maximum value across the whole time window. Eg. if you use the ''rbw'' colormap and the min and max values are [-100ft, +100ft], the colors will be mapped in the following way: -100ft is blue, +100ft is red, 0ft is white. The display is identical for each time sample. If you select this option at t=-49ms, the 2D topography figure will turn almost white because the values are low before the stimulus. |
* '''Contrast''': Changes the distance between the first and last colors. Example values: -80,0,+80.<<BR>><<BR>> {{attachment:colormap_contrast.gif||height="115",width="450"}} |
Line 23: | Line 31: |
* '''Local''': It uses the local min and max values at the current time frame AND for each figure, instead of the global min and max. Eg. at t=-49ms, the extrema values are roughly [-25ft, +25ft]. So the colors will be mapped in order to have: -25ft = blue, and +25ft = red. | * The term "brightness" is not well adapted for colormaps such as ''rbw, jet'' or ''hsv. ''It makes more sense for colormaps with only one tint that varies in intensity, such as the ''grey'' colormap. We use it here for lack for a better word. * You can modify those values by '''clicking directly on the color bar'''. Hold the mouse button, then: * Move '''up/down''' to change the ''' brightness''' , * Move '''left/right''' to change the '''contrast'''. |
Line 25: | Line 36: |
* '''Custom''': You can set manually the minimum/maximum bounds of the colorbar. It does not have to be symmetrical around zero. If you set the values to [-100, 200] ft, the white colors would correspond to values ~50ft, hence values around 0ft would be displayed in blue. | <<TAG(Advanced)>> |
Line 27: | Line 38: |
{{http://neuroimage.usc.edu/brainstorm/Tutorials/TutExploreRecodings?action=AttachFile&do=get&target=colormapNotNormalized.gif|colormapNotNormalized.gif|class="attachment"}} ''Fig.1: Local max; Fig.2: Global max; Fig.3: Custom [-100,300]'' |
== Custom color array == To edit your own list of colors, use the menu "'''New...'''" at the end of the standard colormaps. |
Line 30: | Line 41: |
* You can usually keep this option to ''Local'' when looking at recordings, it makes things nicer. But keep in mind that it is not because you see flashy colors that you have strong effects. It's always a matter of colormap configuration. | * Open a 2D sensor cap view for the MEG sensors the standard average file for Run#01. <<BR>> Right-click on the figure Colormap: MEG recordings > Colormap > New. |
Line 32: | Line 43: |
* Remember that when you change this option, it is saved in your user preferences. If you close Brainstorm and start it again, the colormap configuration stays the same. | * Enter the name of the new colormap and the number of colors it will contain. <<BR>>Enter a small number to better get the feeling of how it works. <<BR>><<BR>> {{attachment:colormap_new.gif||height="188",width="159"}} {{attachment:colormap_edit1.gif||height="189",width="250"}} * Each color in this colormap is represented with a little square. The arrows in the the second row can be selected and deleted (delete key) or edited (double-click). They represent the key colors between which Matlab interpolates the other colors. Click on the second row to add more control colors. <<BR>><<BR>> {{attachment:colormap_edit2.gif||height="189",width="250"}} * Once you are satifsied with your new colormap, click on [Ok]. <<BR>>It will update the figure. A new menu is now available in the list of available colormaps.<<BR>><<BR>> {{attachment:colormap_edit3.gif||height="275",width="500"}} * To delete the custom colormap currently selected, select the menu "'''Delete'''". == Set the color mapping == After defining the colors, we need to define how we want to map them with the values. The information necessary to do this color mapping is the value corresponding to first color and the value corresponding to the last color. The color indices will be scaled linearly between those extrema. * '''Absolute values''': Display the absolute values of the recordings, instead of the original values. This has the effect of constraining the color mapping to positive values only. It is not very useful for exploring the recordings: in EEG and MEG, the sign of the values is very important. <<BR>><<BR>> {{attachment:colormap_absolute.gif}} * '''Maximum''': How are the minimum and maximum values of the colorbar estimated. * '''Global''': The bounds of the colormap are set to the extrema values found in the entire file. <<BR>> Example: if you use the ''rbw'' colormap and the min and max values are [-200ft, +200ft], the colors will be mapped in the following way: -200ft is blue, +200ft is red, 0ft is white. The display is identical for each time sample. If you select this option at '''t=0ms''', the 2D topography figure will turn almost white because the average values are low before the response. * '''Local''': Uses the local min and max values at the current time frame AND for each figure, instead of the global min and max. Example: A t=0ms, the extrema values are roughly [-30ft, +30ft]. So the colors will be mapped in order to have: -30ft = blue, and +30ft = red. * '''Custom''': You can set manually the min/max bounds of the colorbar. It does not have to be symmetrical around zero. If you set the values to [-40,+20] ft, the white colors would correspond to values around -10ft, and values around 0ft would be displayed in pale red. <<BR>><<BR>> {{attachment:colormap_max.gif}} * You can usually keep the option ''Local'' when looking at recordings, it is easier to read. <<BR>> But keep in mind that it is not because you see flashy colors that you have necessarily strong effects. It's always a matter of colormap configuration. |
Line 40: | Line 67: |
Line 44: | Line 70: |
* '''Contrast and Brightness''': * Brightness moves the center of the colormap up and down. * Contrast saturate/desaturate the colors. |
== Colormap management == Remember that when you change any of the options above, it is saved in your user preferences. If you close Brainstorm and start it again, the colormap configuration stays the same. |
Line 48: | Line 73: |
{{http://neuroimage.usc.edu/brainstorm/Tutorials/TutExploreRecodings?action=AttachFile&do=get&target=colormapContrast.gif|colormapContrast.gif|class="attachment"}} ''Fig.1: High brightness; Fig.2: High contrast'' |
|
Line 51: | Line 74: |
* The words brightness/contrast may not be adapted for colormaps such as ''rbw, jet'' or ''hsv. ''It makes more sense for colormaps with only one tint that varies in intensity, such as the ''grey'' colormap. * You can also modify those values by '''clicking directly on the color bar''' in the figures. Hold the mouse button, and move up/down to change the brightness and left/right to change the contrast. Even if the sliders do not work, you can modify the colormaps. * '''Display colorbar''': Just in case you want to hide the color bar... |
* '''Display colorbar''': Just in case you want to hide the color bar. |
Line 60: | Line 80: |
<<HTML(<!-- END-PAGE -->)>> <<EmbedContent("http://neuroimage.usc.edu/bst/get_prevnext.php?prev=Tutorials/ExploreRecordings&next=Tutorials/ChannelClusters")>> <<EmbedContent(http://neuroimage.usc.edu/bst/get_feedback.php?Tutorials/Colormaps)>> |
Tutorial 18: Colormaps
Authors: Francois Tadel, Elizabeth Bock, Sylvain Baillet
When displaying signals on the sensor array or on the cortex surface, we need to convert the amplitude of the signal into a color. The way the values are mapped to colors has a lot of influence over the visual interpretation of the figures. The selection of the appropriate colormap is an important step of the data exploration.
Contents
Colormap menus
Brainstorm keeps track of many user-defined colormaps: anatomy, EEG, MEG, sources, stat, time, time-frequency, etc. You can go to the Colormaps menu in the main window to see this list.
Usually, you will use only popup menus from specific figures to edit the colormaps.
Open a topography view for the standard average (right-click > MEG > 2D Sensor cap).
Right-click on the figure, you will only see the menu "Colormap: MEG recordings".
- If you modify a colormap, the changes will be applied to all the figures, saved in your user preferences and available the next time you start Brainstorm.
Set the color array
A colormap is an array of colors that are indexed and then mapped to values. It is represented by a [Nx3] matrix, where N is the number of colors available in it. Each color is coded with three values corresponding its relative levels of red, green and blue. In Matlab, the colors are coded between 0 and 1. To get an example, type "jet" in the Matlab command window, you will get the default values for the "jet" colormap.
We offer two ways of creating this array of colors in Brainstorm: you can use standard color arrays (modulated in contrast and brightness) or define your own.
Colormap name: The standard colormaps are referred to with names (bone, grey, jet, rwb, etc). Just pick a different color set in the menu to update all the figures with similar data types.
Brightness: Moves the center of the color array up and down. Example values: -80, 0, +80.
Contrast: Changes the distance between the first and last colors. Example values: -80,0,+80.
The term "brightness" is not well adapted for colormaps such as rbw, jet or hsv. It makes more sense for colormaps with only one tint that varies in intensity, such as the grey colormap. We use it here for lack for a better word.
You can modify those values by clicking directly on the color bar. Hold the mouse button, then:
Move up/down to change the brightness ,
Move left/right to change the contrast.
Custom color array
To edit your own list of colors, use the menu "New..." at the end of the standard colormaps.
Open a 2D sensor cap view for the MEG sensors the standard average file for Run#01.
Right-click on the figure Colormap: MEG recordings > Colormap > New.Enter the name of the new colormap and the number of colors it will contain.
Enter a small number to better get the feeling of how it works.
Each color in this colormap is represented with a little square. The arrows in the the second row can be selected and deleted (delete key) or edited (double-click). They represent the key colors between which Matlab interpolates the other colors. Click on the second row to add more control colors.
Once you are satifsied with your new colormap, click on [Ok].
It will update the figure. A new menu is now available in the list of available colormaps.
To delete the custom colormap currently selected, select the menu "Delete".
Set the color mapping
After defining the colors, we need to define how we want to map them with the values. The information necessary to do this color mapping is the value corresponding to first color and the value corresponding to the last color. The color indices will be scaled linearly between those extrema.
Absolute values: Display the absolute values of the recordings, instead of the original values. This has the effect of constraining the color mapping to positive values only. It is not very useful for exploring the recordings: in EEG and MEG, the sign of the values is very important.
Maximum: How are the minimum and maximum values of the colorbar estimated.
Global: The bounds of the colormap are set to the extrema values found in the entire file.
Example: if you use the rbw colormap and the min and max values are [-200ft, +200ft], the colors will be mapped in the following way: -200ft is blue, +200ft is red, 0ft is white. The display is identical for each time sample. If you select this option at t=0ms, the 2D topography figure will turn almost white because the average values are low before the response.Local: Uses the local min and max values at the current time frame AND for each figure, instead of the global min and max. Example: A t=0ms, the extrema values are roughly [-30ft, +30ft]. So the colors will be mapped in order to have: -30ft = blue, and +30ft = red.
Custom: You can set manually the min/max bounds of the colorbar. It does not have to be symmetrical around zero. If you set the values to [-40,+20] ft, the white colors would correspond to values around -10ft, and values around 0ft would be displayed in pale red.
You can usually keep the option Local when looking at recordings, it is easier to read.
But keep in mind that it is not because you see flashy colors that you have necessarily strong effects. It's always a matter of colormap configuration.
Range: Use symmetrical or non-symmetrical colormaps.
[-max, max]: Symmetrical colorbar around the absolute value of the maximum. Eg. at t=47ms, the range is [-80ft, +100ft], and the colorbar used is [-100ft, +100ft], white is zero.
[min, max]: Uses the real min and max. Eg. at t=47ms, the colorbar used is [-80ft, +100ft], white is NOT zero.
- This option is ignored when the option "Maximum: Custom" is selected.
Fig.1: [-max,max]; Fig.2: [min,max]
Colormap management
Remember that when you change any of the options above, it is saved in your user preferences. If you close Brainstorm and start it again, the colormap configuration stays the same.
Display colorbar: Just in case you want to hide the color bar.
Permanent menu: Open a window that displays this colormap sub-menu. Might be useful when you do a lot of colormap adjustments.
Restore defaults: Click on it now so all your experiments will be discarded.
You can also reset the colormap by double-clicking on the color bar.