Skip to content

Commit 2fc4afe

Browse files
[EEG Browser] Addition of new changes to signal plot of electrophysiology_browser module from EEGNet (#8415)
This brings in the latest changes to the signal plot of the electrophysiology_browser module from the EEGNet project. High-level list of changes - Default display is changed to the first 5 seconds of every signal (not full recording) and 16 channels (up from 6) - Keyboard shortcuts (legend coming soon) - Channel hovering - clearer highlighting for a single signal - Dynamic # of displayed channels - up to 64 channels displayed - Fixed right-to-left interval selection - Added text fields for time interval and interval precision increased - List of cursor values toggle feature - Zooming controls - including "Zoom to selected region" with 1 click/keypress - Stacking toggle feature : to show variance across all channels on a single track ‘- Isolate’ toggle feature (highlights a single channel on-hover, when stacked) - DC offset toggle feature : filter - Overflow toggle feature: signals that wander outside the plot can be made visible - Event panel improvements and behaviour consistency
1 parent b16085c commit 2fc4afe

33 files changed

+1470
-409
lines changed

modules/electrophysiology_browser/css/electrophysiology_browser.css

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ svg {
4242
user-select: none;
4343
}
4444

45+
svg:not(:root) {
46+
overflow: clip;
47+
}
48+
4549
.list-group-item {
4650
position: relative;
4751
display: flex;
@@ -97,6 +101,26 @@ svg {
97101
border: 1px solid #333;
98102
}
99103

104+
.input-interval-bound {
105+
width: 60px;
106+
height: 22px;
107+
font-size: 10px;
108+
float: left;
109+
text-align: center;
110+
}
111+
112+
.btn-zoom {
113+
margin: 0 auto 3px auto;
114+
width: 50px;
115+
text-align: center;
116+
}
117+
118+
.col-xs-title {
119+
color: #064785;
120+
font-weight: bold;
121+
text-align: center;
122+
}
123+
100124
#electrode-montage .list-group {
101125
border: 1px solid #ddd;
102126
}
@@ -135,6 +159,14 @@ svg {
135159
height: auto !important;
136160
}
137161

162+
#eegSessionView .panel-heading > div > i {
163+
cursor: pointer;
164+
}
165+
166+
#eegSessionView .panel-heading > div > i:hover {
167+
scale: 1.05;
168+
}
169+
138170
#eegSidebar {
139171
top: 0;
140172
bottom: 0;
@@ -187,10 +219,10 @@ svg {
187219
/* Large Devices, Wide Screens */
188220
@media only screen and (min-width : 1200px) {
189221
.pull-right-lg {
190-
float: right;
222+
text-align: right;
191223
}
192224

193225
.pagination-nav {
194226
padding-top: 0;
195227
}
196-
}
228+
}
-131 KB
Binary file not shown.
-132 KB
Binary file not shown.
-39.9 KB
Binary file not shown.
-195 KB
Binary file not shown.
-331 KB
Binary file not shown.
Binary file not shown.
-209 KB
Binary file not shown.

modules/electrophysiology_browser/jsx/react-series-data-viewer/README.md

Lines changed: 41 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ To enable the visualization components, set the `useEEGBrowserVisualizationCompo
99

1010

1111
## Main dependencies
12-
1312
- [Ramda](https://ramdajs.com)
1413
A practical functional library for JavaScript programmers.
1514

@@ -35,29 +34,58 @@ To install the Protocol Buffers Compiler (protoc), run:
3534

3635
The EEG Browser visualization component adds support for some useful visual helpers: The **Signal Viewer** and the **Electrode Map**.
3736

38-
![Overall View](./../../images/overall-view.png)
37+
![Overall View](https://images.loris.ca/eeg-browser/overall-view.png)
3938

4039
### Signal Viewer
41-
![Signal Viewer](./../../images/signal-values-details.png) <br/><br/>
40+
![Signal Viewer](https://images.loris.ca/eeg-browser/signal-values-details.png) <br/><br/>
4241
Several tools can be used to navigate through the Signal Viewer:
43-
- The **Timeline Range View** (1) can be used to change the boundaries of the viewed timeline.
44-
- The **Amplitude** and **Filter** tools (2) can be used to increase/reduce the amplitude scale and apply high or low-pass filters.
45-
- The **Channel navigation** (3) can be used to navigate through the viewed channels.
46-
- The **Event Panel** (4) can be used to display information about the events when event data is available.
47-
- If the selected timeline range contains more than 100 events, a message (5) indicates the user to reduce the boundaries of the timeline in order to display the event data.
42+
- The **Zoom Controls** (1) can be used to increase or reduce the time interval while maintaining the same midpoint.
43+
- *Reset*: Set 'zoom' level to default value (5 second interval).
44+
- *+ / -*: Zoom in or out, respectively.
45+
- *Region*: This button becomes available when a region is highlighted on the plot (left-click drag). Pressing it sets the time interval to the selected region.
46+
- The **Timeline Range View** (2) can be used to change the boundaries of the viewed timeline.
47+
- *[<] / [>]*: These arrows translate the interval bounds backwards or forwards, respectively, by 1 second.
48+
- *[<<] / [>>]*: These arrows translate the interval bounds backwards or forwards, respectively, by the value of the interval.
49+
- *Text fields*: The text fields can be edited to manually set the interval.
50+
- *Sliders*: The sliders can be dragged as an alternative way to set the interval range.
51+
- The **Amplitude** and **Filter** tools and the **Show/Hide Overflow** button (3) can be used to increase/reduce the amplitude scale, apply high or low-pass filters, or toggle the visibility of signal spillage, respectively.
52+
- The **Channel Navigation** (4) toolbar can be used to navigate through the viewed channels.
53+
- *Dropdown*: This dropdown allow to change the number of displayed channels. Currently supported values are: 4, 8 16, 32 or 64 visible channels.
54+
- *Text field*: This can be used to manually set the starting index of the displayed channels.
55+
- *[<] / [>]*: These arrows translate the visible channel range backwards or forwards, respectively, by 1 channel.
56+
- *[<<] / [>>]*: These arrows translate the visible channel range backwards or forwards, respectively, by the number of displayed channel.
57+
- The **Channel Adjustment** (5) buttons can be used to vertically adjust the position of the signals.
58+
- *DC/NO Offset*: This button toggles the subtraction of DC offset from the signals, used to center them with respect to their assigned row.
59+
- *Stack/Spread*: This button toggles the channels from being in their assigned row to being all stacked on the same row. [[Stacked View Demo](#stacked-view)]
60+
- The **Event Panel** (6) can be used to display information about the events when event data is available.
61+
- If the selected timeline range contains more than 500 events, a message inside the panel indicates the user to reduce the boundaries of the timeline in order to display the event data.
4862
<br/><br/>
49-
<p align="center">
50-
<img width="650" src="./../../images/signal-values.png"/><br/>
51-
<sub>Signal Viewer with signal values and event data displayed.</sub>
63+
<p style="text-align: center;">
64+
<img width src="https://images.loris.ca/eeg-browser/signal-values.png"/><br/>
65+
<sub>Signal Viewer with hovered signal value and event data displayed.</sub>
5266
</p>
5367

68+
69+
### Stacked View
70+
Hovering channel names while in 'stacked' or 'spread (default)' view will thicken the respective signal(s). While in stacked view, a feature called "Isolate" becomes available. [[Isolate Mode Demo](#isolate-mode)]
71+
<br/><br/>![Stacked View](https://images.loris.ca/eeg-browser/signal-stacked.png) <br/>
72+
73+
74+
### Isolate Mode
75+
Hovering channel names while in 'isolate' mode will make that signal the only visible signal on the plot.
76+
<br/><br/>![Isolate Mode](https://images.loris.ca/eeg-browser/signal-isolated.png) <br/>
77+
78+
5479
### Electrode Map
5580
The current implementation of the Electrode Map supports 2 display modes: 2D and 3D.
5681

5782
| 2D View | 3D View |
5883
|:-------------------------:|:-------------------------:|
59-
|<img width="300" src="./../../images/electrodes-2d-hover.png"/><br/> The 2D view is a stereographic projection of the electrodes position. Electrodes are indexed and their name is displayed on mouse hover. | <img width="300" src="./../../images/electrodes-3d.png" /><br/> The 3D view displays the exact position of the electrodes on the brain. |
84+
|<img width="300" src="https://images.loris.ca/eeg-browser/electrodes-2d-hover.png"/><br/> The 2D view is a stereographic projection of the electrodes position. Electrodes are indexed and their name is
85+
displayed on mouse hover. | <img width="300" src="https://images.loris.ca/eeg-browser/electrodes-3d.png" /><br/> The 3D view displays the exact position of the electrodes on the brain. |
86+
6087

6188
### Future developements to come
89+
A signal annotation feature is currently under development.
90+
6291

63-
A signal annotation feature is currently under development.

modules/electrophysiology_browser/jsx/react-series-data-viewer/src/color/index.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1+
import * as R from 'ramda';
12
import {scaleOrdinal} from 'd3-scale';
3+
import {schemeDark2, schemeCategory10} from 'd3-scale-chromatic';
24

3-
// import * as R from 'ramda';
4-
// import {schemeCategory10, schemeSet3} from 'd3-scale-chromatic';
5-
// export const colorOrder = scaleOrdinal(
6-
// R.concat(schemeCategory10, schemeSet3)
7-
// );
8-
9-
export const colorOrder = scaleOrdinal();
5+
export const colorOrder = scaleOrdinal(
6+
R.concat(schemeDark2, schemeCategory10)
7+
);
108

119
/**
1210
* hex2rgba

0 commit comments

Comments
 (0)