-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsv_cortex_plot.m
More file actions
107 lines (78 loc) · 2.64 KB
/
sv_cortex_plot.m
File metadata and controls
107 lines (78 loc) · 2.64 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
function sv_cortex_plot(cortex,locs,th,phi,wts)
%% plot brain and look at locations
figure
k=60; % amount of transparency
brain_handle=kjm_ctmr_gauss_plot(cortex,[0 0 0],0);
brain_handle.FaceAlpha=k/100;
% el_add(locs,[0 0 0],30)
% el_add(locs,[.5 1 .5],25)
loc_view(90,45)
%%
rb_dot_surf_view_SEEG(cortex,locs,wts,th,phi)
%%
function rb_dot_surf_view_SEEG(brain,locs,wts,th,phi)
% this function plots the colored dots off of the brain in the direction
% that they will be viewed
lcm=max(abs(wts));
if lcm>0 % need to just have all gray if none significant
for k=1:size(locs,1)% add activity colorscale
if abs(wts(k))<(.05*lcm)
hold on, plot3(locs(k,1),locs(k,2),locs(k,3),'.',...
'MarkerSize',23,...
'Color',.01*[1 1 1])
%
hold on, plot3(locs(k,1),locs(k,2),locs(k,3),'.',...
'MarkerSize',20,...
'Color',.35*[1 1 1])
%
elseif wts(k)>=(.05*lcm)
%
hold on, plot3(locs(k,1),locs(k,2),locs(k,3),'.',...
'MarkerSize',30*abs(wts(k))/lcm+23,...
'Color',.01*[1 1 1])
%
hold on, plot3(locs(k,1),locs(k,2),locs(k,3),'.',...
'MarkerSize',30*abs(wts(k))/lcm+20,...
'Color',.99*[1 1-wts(k)/lcm 1-wts(k)/lcm])
%
elseif wts(k)<=(-.05*lcm)
%
hold on, plot3(locs(k,1),locs(k,2),locs(k,3),'.',...
'MarkerSize',30*abs(wts(k))/lcm+23,...
'Color',.01*[1 1 1])
%
hold on, plot3(locs(k,1),locs(k,2),locs(k,3),'.',...
'MarkerSize',30*abs(wts(k))/lcm+20,...
'Color',.99*[1+wts(k)/lcm 1+wts(k)/lcm 1])
end
end
else % all gray dots if none significant
for k=1:size(locs,1)
hold on, plot3(locs(k,1),locs(k,2),locs(k,3),'.',...
'MarkerSize',23,...
'Color',.01*[1 1 1])
%
hold on, plot3(locs(k,1),locs(k,2),locs(k,3),'.',...
'MarkerSize',20,...
'Color',.35*[1 1 1])
end
end
if exist('chan')% add in electrode used for coherence with
% hold on, plot3(locs(chan,1),locs(chan,2),locs(chan,3),'.',...
% 'MarkerSize',30,...
% 'Color',[0 0 0])
% hold on, plot3(locs(chan,1),locs(chan,2),locs(chan,3),'.',...
% 'MarkerSize',25,...
% 'Color',[0 .5 0])
% end
hold on, plot3(locs(chan,1),locs(chan,2),locs(chan,3),'.',...
'MarkerSize',30,...
'Color',[0 0 0])
hold on, plot3(locs(chan,1),locs(chan,2),locs(chan,3),'.',...
'MarkerSize',25,...
'Color',.99*[1 1 1])
hold on, plot3(locs(chan,1),locs(chan,2),locs(chan,3),'k*',...
'MarkerSize',15,...
'Color',[0 0 0])
end
loc_view(th,phi)