Skip to content

Commit bfe6c9d

Browse files
Y-BezsYulia Bezsudnova
and
Yulia Bezsudnova
authored
upgraded evoked source to fit new function (#6)
* not important/ testing purpuses Added some spaces in the text * upgrade evoked source to fit new function added to the function one more set of reference points --------- Co-authored-by: Yulia Bezsudnova <[email protected]>
1 parent dc8d2fa commit bfe6c9d

File tree

4 files changed

+51
-40
lines changed

4 files changed

+51
-40
lines changed

docs/assets/figures/opm/coreg_new.png

101 KB
Loading
305 KB
Loading
Loading

docs/tutorials/opm/evoked_source/index.md

+51-40
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,17 @@ When we do not have an MRI for a participant we can register the MNI template sc
5959

6060
<figure markdown>
6161
<div class="center">
62-
<img src="../../../assets/figures/opm/coreg_template.png" style="width:160mm" />
62+
<img src="../../../assets/figures/opm/coreg_template_new.png" style="width:160mm" />
6363
</div>
6464
</figure>
6565

6666
Before we run the coregistration code we need to mark a number of fiducial points on our meshes. We will need to mark
6767

68-
1. 3 points on the helmet file (`S.helmetref`).
69-
2. 3 corresponding points on the mesh with the head and helmet present (`S.headhelmetref`).
70-
3. 3 points on the head shape mesh (`S.headfid`).
71-
4. 3 point on the corresponding mesh file with the head and helmet present (`S.headhelmetfid`).
68+
1. 3 points on the helmet file (`S.helmetref1`).
69+
2. 3 corresponding points on the mesh with the head and helmet present (`S.headhelmetref1`).
70+
3. 3 points on the head shape mesh (`S.headref2`).
71+
4. 3 point on the corresponding mesh file with the head and helmet present (`S.headhelmetref2`).
72+
5. 3 fiducial points, should be in order nas - lpa - rpa (`S.fiducials`).
7273

7374

7475
To mark these points we can use [`spm_mesh_selct`](https://www.fil.ion.ucl.ac.uk/spm/docs/tutorials/opm/coreg/#manually-marking-fiducials-on-meshes).
@@ -79,32 +80,37 @@ S = [];
7980
S.D = eD;
8081
S.headfile = 'head.obj';
8182
82-
S.helmetref = ...
83-
[0,133.9,-24;... %point 1
84-
-114,30.5,-61;... %point 2
85-
116,29,-59]; %point 3
83+
S.helmetref1 = ...
84+
[0,133.9,-24;... % point 1
85+
-114,30.5,-61;... % point 2
86+
116,29,-59]; % point 3
8687
87-
S.headhelmetref = ...
88-
[77,-23,608;... %point 1
89-
31,90,715;... %point 2
90-
26,-141,692]; %point 3
88+
S.headhelmetref2 = ...
89+
[77,-23,608;... % point 1
90+
31,90,715;... % point 2
91+
26,-141,692]; % point 3
9192
92-
S.headfid = ...
93+
S.headref2 = ...
94+
[105, -60, 530.6;... % point 4
95+
120.2, -10, 503.8;... % point 5
96+
122.3, 44.7, 533.5]; % point 6
97+
98+
S.headhelmetref2 = ...
99+
[29.8, -66.5, 670.6;... % point 4
100+
40.8, -19.4, 653.9;... % point 5
101+
37.7, 32.7, 689]; % point 6
102+
103+
S.fiducials = ...
93104
[111.626,-9,504;... % nas
94105
97, 54, 551;... % lpa
95-
84, -67, 548]; % rpa
96-
97-
S.headhelmetfid = ...
98-
[33,-22.6,654;... % nas
99-
14.7, 38.9, 699;... % lpa
100-
5,-82,693]; %rpa
106+
84, -67, 548]; % rpa
101107
102108
cD = spm_opm_opreg(S);
103109
```
104110

105111
<figure markdown>
106112
<div class="center">
107-
<img src="../../../assets/figures/opm/coreg.png" style="width:160mm" />
113+
<img src="../../../assets/figures/opm/coreg_new.png" style="width:160mm" />
108114
</div>
109115
<figcaption>Template Coregistration</figcaption>
110116
</figure>
@@ -170,7 +176,7 @@ The output, by default, is in MNI space and you can now view the result in your
170176

171177
<figure markdown>
172178
<div class="center">
173-
<img src="../../../assets/figures/opm/source_evoked_t.png" style="width:160mm" />
179+
<img src="../../../assets/figures/opm/source_evoked_t_new.png" style="width:160mm" />
174180
</div>
175181
<figcaption>Source level evoked response</figcaption>
176182
</figure>
@@ -229,33 +235,39 @@ S = [];
229235
S.D = eD;
230236
S.headfile = 'head.obj';
231237
232-
S.helmetref = ...
233-
[0,133.9,-24;... %nas
234-
-114,30.5,-61;... %lpa
235-
116,29,-59]; %rpa
238+
S.helmetref1 = ...
239+
[0,133.9,-24;... % point 1
240+
-114,30.5,-61;... % point 2
241+
116,29,-59]; % point 3
242+
243+
S.headhelmetref2 = ...
244+
[77,-23,608;... % point 1
245+
31,90,715;... % point 2
246+
26,-141,692]; % point 3
236247
237-
S.headhelmetref = ...
238-
[77,-23,608;... %nas
239-
31,90,715;... %lpa
240-
26,-141,692]; %rpa
248+
S.headref2 = ...
249+
[105, -60, 530.6;... % point 4
250+
120.2, -10, 503.8;... % point 5
251+
122.3, 44.7, 533.5]; % point 6
241252
242-
S.headfid = ...
253+
S.headhelmetref2 = ...
254+
[29.8, -66.5, 670.6;... % point 4
255+
40.8, -19.4, 653.9;... % point 5
256+
37.7, 32.7, 689]; % point 6
257+
258+
S.fiducials = ...
243259
[111.626,-9,504;... % nas
244-
97, 54, 551;...% lpa
245-
84, -67, 548]; % rpa
260+
97, 54, 551;... % lpa
261+
84, -67, 548]; % rpa
246262
247-
S.headhelmetfid = ...
248-
[33,-22.6,654;... % nas
249-
14.7, 38.9, 699;...% lpa
250-
5,-82,693]; %rpa
251-
eD = spm_opm_opreg(S);
263+
cD = spm_opm_opreg(S);
252264
253265
% daiss data setup
254266
%--------------------------------------------------------------------------
255267
bfDir = 'C:\Users\path\to\folder';
256268
257269
S = [];
258-
S.D = fname(eD);
270+
S.D = fname(cD);
259271
S.dir = bfDir;
260272
S.space = 'Head';
261273
[BF] = bf_wizard_data(S);
@@ -295,4 +307,3 @@ bf_stat_evoked_t(S);
295307
```
296308

297309
--8<-- "addons/abbreviations.md"
298-
s

0 commit comments

Comments
 (0)