-
Notifications
You must be signed in to change notification settings - Fork 16
/
setOrientationRefpts.m
36 lines (26 loc) · 1.08 KB
/
setOrientationRefpts.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
function [headvol, headsurf, pialsurf, labelssurf, probe, fwmodel, imgrecon, hbconc] = ...
setOrientationRefpts(refpts, headvol, headsurf, pialsurf, labelssurf, probe, fwmodel, imgrecon, hbconc)
if refpts.isempty(refpts)
return;
end
if isempty(refpts.orientation)
[nz,iz,rpa,lpa,cz] = getLandmarks(refpts);
[refpts.orientation, refpts.center] = getOrientation(nz,iz,rpa,lpa,cz);
end
headvol = saveHeadvolOrient(headvol, refpts);
headsurf.orientation = refpts.orientation;
headsurf.center = refpts.center;
pialsurf.orientation = refpts.orientation;
pialsurf.center = refpts.center;
labelssurf.orientation = refpts.orientation;
labelssurf.center = refpts.center;
if isPreRegisteredProbe(probe, refpts)
probe.orientation = refpts.orientation;
end
probe.center = refpts.center;
fwmodel.orientation = refpts.orientation;
fwmodel.center = refpts.center;
imgrecon.orientation = refpts.orientation;
imgrecon.center = refpts.center;
hbconc.orientation = refpts.orientation;
hbconc.center = refpts.center;