-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathea_mercontrol_updateimplanted.m
More file actions
24 lines (24 loc) · 1.06 KB
/
ea_mercontrol_updateimplanted.m
File metadata and controls
24 lines (24 loc) · 1.06 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
function ea_mercontrol_updateimplanted(handles, side_str)
if ~exist('side_str', 'var')
side_str = 'both';
end
[side_strs, side_ids, ~] = ea_detsidestr(side_str);
merstruct = getappdata(handles.mercontrolfig, 'merstruct');
ui_tags = {handles.mainuipanel.Children.Tag};
for sid = side_ids
side_str = side_strs{sid};
b_item = strcmpi(handles.(['popupimplantedtract_' side_str]).String,...
merstruct.DBSImplants(sid).implanted_tract_label);
set(handles.(['popupimplantedtract_' side_str]),...
'Value', find(b_item));
set(handles.(['editimplanteddepth_' side_str]),...
'String', num2str(merstruct.DBSImplants(sid).depth));
% set(handles.(['popupmermarkers_' side_str]),...
% 'Visible', 'off', 'String', '', 'Value', 1);
% TODO: Recording elements handles.(['popupmedial_' side_str])
end
for traj_ix = 1:length(merstruct.MERTrajectories)
traj = merstruct.MERTrajectories(traj_ix);
set(handles.mainuipanel.Children(strcmpi(ui_tags,...
['pos', traj.label, '_', traj.side])), 'String', num2str(traj.depth));
end