Skip to content

Commit

Permalink
Added atlas support, HArtMuT
Browse files Browse the repository at this point in the history
  • Loading branch information
lrkrol committed Dec 8, 2022
1 parent 06d9e15 commit 08b83bd
Show file tree
Hide file tree
Showing 30 changed files with 2,130 additions and 258 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
*to*_Atlas_v2/
HArtMuT_mix_Colin27_small.mat
HArtMuT_NYhead_small.mat
mni2atlas/
sa_nyhead.mat
sa_nyhead_sereegareduced.mat
*.asv
*.asv
*.afdesign
197 changes: 122 additions & 75 deletions docs/README.md

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
v1.5.0
- Added utl_call_gui, allowing GUI functions to be called without requiring the EEGLAB GUI itself to be used or a SEREEGA dataset to be loaded
- Added source ID to pop_sereega_sources GUI and console output
- Various documentation updates
- Added support for new HArtMuT (Head Artefact Model using Tripoles) head models containing ocular and muscular sources alongside brain sources
- Added atlas support, allowing sources to be selected from specified named regions. SEREEGA leadfields now have an additional atlas field containing, for each source, the name of the region it belongs to. lf_get_source_* functions have been added/adjusted to allow sources to be obtained from specific regions. lf_add_atlas_frommni2atlas can be used to add atlases to existing lead fields using the mni2atlas function from the FMRIB Software Library (not included).
- Added electrodes argument to plot_headmodel
- Added plot_source_moment to plot source orientation as arrow
- Added support for lead fields generated in Brainstorm

v1.2.2
- Fixed forgotten version increment in eegplugin_sereega.m
- Fixed forgotten documentation update reflecting 2018-06-04 utl_apply_dvslopeshift change
Expand Down
Binary file added docs/workflow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 7 additions & 3 deletions eegplugin_sereega.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
% Team PhyPA, Biological Psychology and Neuroergonomics,
% Berlin Institute of Technology

% 2022-11-17 lrk
% - Added HArtMuT lead field
% 2018 through 2021 lrk
% - Version number increments
% 2018-04-23 First version
Expand All @@ -37,7 +39,7 @@

function version = eegplugin_sereega(fig, try_strings, catch_strings)

version = '1.2.0';
version = '1.5.0';

% find tools menu
% ---------------
Expand Down Expand Up @@ -84,9 +86,10 @@
'eeglab redraw;' ...
];
cb_epochs = 'EEG = pop_sereega_epochs(EEG);';
cb_lf_fieldtrip = 'EEG = pop_sereega_lf_generate_fromfieldtrip(EEG);';
cb_lf_hartmut = 'EEG = pop_sereega_lf_generate_fromhartmut(EEG);';
cb_lf_nyhead = 'EEG = pop_sereega_lf_generate_fromnyhead(EEG);';
cb_lf_pha = 'EEG = pop_sereega_lf_generate_frompha(EEG);';
cb_lf_fieldtrip = 'EEG = pop_sereega_lf_generate_fromfieldtrip(EEG);';
cb_comp_sources = 'EEG = pop_sereega_sources(EEG);';
cb_comp_signals = 'EEG = pop_sereega_signals(EEG);';
cb_comp_components = 'EEG = pop_sereega_components(EEG);';
Expand Down Expand Up @@ -138,9 +141,10 @@
menu_new = uimenu(menu_root, 'label', 'New empty dataset', 'userdata', userdata, 'callback', cb_new);
menu_epochs = uimenu(menu_root, 'label', 'Configure epochs', 'userdata', userdata, 'callback', cb_epochs);
menu_lf = uimenu(menu_root, 'label', 'Configure lead field');
menu_lf_fieldtrip = uimenu(menu_lf, 'label', 'FieldTrip', 'userdata', userdata, 'callback', cb_lf_fieldtrip);
menu_lf_hartmut = uimenu(menu_lf, 'label', 'HArtMuT', 'userdata', userdata, 'callback', cb_lf_hartmut);
menu_lf_nyhead = uimenu(menu_lf, 'label', 'New York Head', 'userdata', userdata, 'callback', cb_lf_nyhead);
menu_lf_pha = uimenu(menu_lf, 'label', 'Pediatric Head Atlas', 'userdata', userdata, 'callback', cb_lf_pha);
menu_lf_fieldtrip = uimenu(menu_lf, 'label', 'FieldTrip', 'userdata', userdata, 'callback', cb_lf_fieldtrip);
menu_comp = uimenu(menu_root, 'label', 'Configure components', 'userdata', userdata);
menu_comp_sources = uimenu(menu_comp, 'label', 'Select source locations', 'userdata', userdata, 'callback', cb_comp_sources);
menu_comp_signals = uimenu(menu_comp, 'label', 'Define signal activations', 'userdata', userdata, 'callback', cb_comp_signals);
Expand Down
6 changes: 6 additions & 0 deletions leadfield/fieldtrip/lf_generate_fromfieldtrip.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
% for each source.
% .pos - xyz MNI coordinates of each source
% .chanlocs - channel information in EEGLAB format
% .atlas - atlas (region) indication for each source; this
% is simply 'Brain' until more specific
% functionality is added
%
% Usage example:
% >> lf = lf_generate_fromfieldtrip('labels', {'Fz', 'Cz', 'Pz'}, ...
Expand All @@ -40,6 +43,8 @@
% Team PhyPA, Biological Psychology and Neuroergonomics,
% Berlin Institute of Technology

% 2021-01-06 lrk
% - Added lf.atlas
% 2018-11-08 lrk
% - Now continues with empty labels if montage not found
% 2018-03-26 lrk
Expand Down Expand Up @@ -163,5 +168,6 @@
lf.pos = ftlf.pos(ftlf.inside,:);
lf.chanlocs = readlocs('chanlocs-standard_1005.elp');
lf.chanlocs = lf.chanlocs(chanidx);
lf.atlas = repmat({'Brain'}, size(lf.pos, 1), 1);

end
231 changes: 231 additions & 0 deletions leadfield/hartmut/chanlocs-hartmut-NYhead_small.xyz
Original file line number Diff line number Diff line change
@@ -0,0 +1,231 @@
1 -36 75.5 25.5 AF3
2 -28.5 77.5 30 AF3h
3 36 75.5 25.5 AF4
4 28.5 77.5 30 AF4h
5 -43 72.5 19.5 AF5h
6 43 72.5 19.5 AF6h
7 -55.5 64 -3 AF7
8 55.5 64 -3 AF8
9 -12.5 70.5 52 AFF1h
10 12.5 70.5 52 AFF2h
11 -52 60.5 28 AFF5h
12 52 60.5 28 AFF6h
13 -62 54 9 AFF7h
14 62 54 9 AFF8h
15 -14 84.5 18.5 AFp1
16 14 84.5 18.5 AFp2
17 0 80 36.5 AFz
18 -37.5 -11 89.5 C1
19 37.5 -11 89.5 C2
20 -67.5 -12 65.5 C3
21 67.5 -12 65.5 C4
22 -82.5 -13 33.5 C5
23 82.5 -13 33.5 C6
24 -38 -29.5 92 CCP1
25 -20 -30 99 CCP1h
26 38 -29.5 92 CCP2
27 20 -30 99 CCP2h
28 -68.5 -29.5 68.5 CCP3
29 -54.5 -29.5 81.5 CCP3h
30 68.5 -29.5 68.5 CCP4
31 54.5 -29.5 81.5 CCP4h
32 -83.5 -28.5 35.5 CCP5
33 -78.5 -29 52.5 CCP5h
34 83.5 -28.5 35.5 CCP6
35 78.5 -29 52.5 CCP6h
36 -37.5 -49.5 91 CP1
37 37.5 -49.5 91 CP2
38 -67 -47 67 CP3
39 67 -47 67 CP4
40 -81.5 -44.5 35 CP5
41 81.5 -44.5 35 CP6
42 -18.5 -69.5 90.5 CPP1h
43 18.5 -69.5 90.5 CPP2h
44 -50 -67 76 CPP3h
45 50 -67 76 CPP4h
46 -72 -62.5 48.5 CPP5h
47 72 -62.5 48.5 CPP6h
48 0 -49.5 100 CPz
49 0 -9 99 Cz
50 -14.5 -111 -54.5 Ex1
51 60.5 -81.5 -59 Ex10
52 -68.5 -69 -59.5 Ex11
53 68.5 -69 -59.5 Ex12
54 -74.5 -56.5 -60.5 Ex13
55 74.5 -56.5 -60.5 Ex14
56 -82.5 -18.5 -62 Ex19
57 14.5 -111 -54.5 Ex2
58 82.5 -18.5 -62 Ex20
59 -81.5 -4 -63 Ex21
60 81.5 -4 -63 Ex22
61 -79.5 9 -64.5 Ex23
62 79.5 9 -64.5 Ex24
63 -76.5 23 -66.5 Ex25
64 76.5 23 -66.5 Ex26
65 -72 36.5 -69 Ex27
66 72 36.5 -69 Ex28
67 -65.5 49 -71 Ex29
68 -28 -108 -57 Ex3
69 65.5 49 -71 Ex30
70 -55 59.5 -71 Ex31
71 55 59.5 -71 Ex32
72 -41.5 66 -68 Ex33
73 41.5 66 -68 Ex34
74 28 -108 -57 Ex4
75 -40.5 -101.5 -58.5 Ex5
76 40.5 -101.5 -58.5 Ex6
77 -51.5 -92.5 -58.5 Ex7
78 51.5 -92.5 -58.5 Ex8
79 -60.5 -81.5 -59 Ex9
80 -13 -106 -81.5 Exx1
81 55.5 -76.5 -85 Exx10
82 -62 -65.5 -84.5 Exx11
83 62 -65.5 -84.5 Exx12
84 -66.5 -54.5 -84.5 Exx13
85 66.5 -54.5 -84.5 Exx14
86 -69 -41.5 -82.5 Exx15
87 69 -41.5 -82.5 Exx16
88 -76.5 -20 -90 Exx19
89 13 -106 -81.5 Exx2
90 76.5 -20 -90 Exx20
91 -76.5 -6 -89.5 Exx21
92 76.5 -6 -89.5 Exx22
93 -75 5.5 -91 Exx23
94 75 5.5 -91 Exx24
95 -72 18.5 -93.5 Exx25
96 72 18.5 -93.5 Exx26
97 -68 31 -96.5 Exx27
98 68 31 -96.5 Exx28
99 -61 44 -99 Exx29
100 -25.5 -102.5 -83.5 Exx3
101 61 44 -99 Exx30
102 -52 55 -99.5 Exx31
103 52 55 -99.5 Exx32
104 -41.5 62.5 -98.5 Exx33
105 41.5 62.5 -98.5 Exx34
106 25.5 -102.5 -83.5 Exx4
107 -37 -96 -85 Exx5
108 37 -96 -85 Exx6
109 -46.5 -87 -84.5 Exx7
110 46.5 -87 -84.5 Exx8
111 -55.5 -76.5 -85 Exx9
112 0 -107 -78.5 Exxz
113 0 -112 -52.5 Exz
114 -28.5 56 61.5 F1
115 28.5 56 61.5 F2
116 -51.5 50.5 45 F3
117 51.5 50.5 45 F4
118 -65.5 44 22.5 F5
119 65.5 44 22.5 F6
120 -71.5 39 -2.5 F7
121 71.5 39 -2.5 F8
122 -34 25 79 FC1
123 34 25 79 FC2
124 -60.5 21 58.5 FC3
125 60.5 21 58.5 FC4
126 -76.5 16.5 29 FC5
127 76.5 16.5 29 FC6
128 -18 8.5 91.5 FCC1h
129 18 8.5 91.5 FCC2h
130 -51.5 5.5 75 FCC3h
131 51.5 5.5 75 FCC4h
132 -74 3 48 FCC5h
133 74 3 48 FCC6h
134 0 26 87.5 FCz
135 -31.5 41 71.5 FFC1
136 -16 43 77 FFC1h
137 31.5 41 71.5 FFC2
138 16 43 77 FFC2h
139 -57 36.5 52 FFC3
140 -45 39 63.5 FFC3h
141 57 36.5 52 FFC4
142 45 39 63.5 FFC4h
143 -72 30 26.5 FFC5
144 -65.5 33 39.5 FFC5h
145 72 30 26.5 FFC6
146 65.5 33 39.5 FFC6h
147 76 24 -20.5 FFT10h
148 -75 28 12.5 FFT7h
149 75 28 12.5 FFT8h
150 -76 24 -20.5 FFT9h
151 79.5 10.5 -40 FT10
152 -79.5 12 -2 FT7
153 79.5 12 -2 FT8
154 -79.5 10.5 -40 FT9
155 -82.5 -0.5 15 FTT7h
156 82.5 -0.5 15 FTT8h
157 -31.5 81.5 -2.5 Fp1
158 31.5 81.5 -2.5 Fp2
159 0 86.5 -0.5 Fpz
160 0 58 67 Fz
161 -29.5 -111.5 -34 I1
162 29.5 -111.5 -34 I2
163 -83.5 -17.5 -38.5 LPA
164 0 32 -179 Nk1
165 0 -113 -154.5 Nk2
166 62.5 -41 -168 Nk3
167 -62.5 -41 -168 Nk4
168 0 83.5 -41 Nz
169 -31 -114.5 7.5 O1
170 31 -114.5 7.5 O2
171 -30.5 -114.5 -12.5 OI1
172 -15.5 -119 -11.5 OI1h
173 30.5 -114.5 -12.5 OI2
174 15.5 -119 -11.5 OI2h
175 0 -119 12 Oz
176 -31.5 -83.5 75.5 P1
177 71.5 -71 -37.5 P10
178 31.5 -83.5 75.5 P2
179 -56 -80.5 57.5 P3
180 56 -80.5 57.5 P4
181 -70.5 -75 31 P5
182 70.5 -75 31 P6
183 -74.5 -70.5 2.5 P7
184 74.5 -70.5 2.5 P8
185 -71.5 -71 -37.5 P9
186 -20 -107 44.5 PO1
187 54 -95.5 -36 PO10
188 20 -107 44.5 PO2
189 -38 -105 35.5 PO3
190 -29 -106 41.5 PO3h
191 38 -105 35.5 PO4
192 29 -106 41.5 PO4h
193 -44 -103.5 30 PO5h
194 44 -103.5 30 PO6h
195 -57.5 -96.5 5 PO7
196 57.5 -96.5 5 PO8
197 -54 -95.5 -36 PO9
198 -13.5 -114.5 28.5 POO1
199 44.5 -107 -14 POO10h
200 13.5 -114.5 28.5 POO2
201 -26.5 -113 24 POO3
202 26.5 -113 24 POO4
203 -37.5 -110.5 15.5 POO5
204 37.5 -110.5 15.5 POO6
205 -44.5 -107 -14 POO9h
206 0 -108 47.5 POz
207 -24.5 -97.5 61 PPO1
208 67 -84.5 -16 PPO10h
209 -12 -97.5 65 PPO1h
210 24.5 -97.5 61 PPO2
211 12 -97.5 65 PPO2h
212 -36.5 -96 56 PPO3h
213 36.5 -96 56 PPO4h
214 -61.5 -89 27.5 PPO5
215 61.5 -89 27.5 PPO6
216 -68 -83.5 3 PPO7
217 -65.5 -86.5 15.5 PPO7h
218 68 -83.5 3 PPO8
219 65.5 -86.5 15.5 PPO8h
220 -67 -84.5 -16 PPO9h
221 0 -84.5 81 Pz
222 83.5 -17.5 -38.5 RPA
223 -84.5 -14.5 -1.5 T7
224 84.5 -14.5 -1.5 T8
225 -84.5 -43 0 TP7
226 84.5 -43 0 TP8
227 -79.5 -57.5 18 TPP7h
228 79.5 -57.5 18 TPP8h
229 -85.5 -29 17.5 TTP7h
230 85.5 -29 17.5 TTP8h
231 0 -117 -30.5 Iz
Loading

0 comments on commit 08b83bd

Please sign in to comment.