Commit f5e76b74 authored by James Desjardins's avatar James Desjardins
Browse files

fix flagging components interactively: ve_edit and ve_update

parent 9fa5bf2f
......@@ -118,13 +118,29 @@ switch udf.data_type
end
end
case 'ICA'
for ml_i=1:length(EEG.marks.comp_info)
manual_ind_marks=ml_i;%find(strcmp('manual',{EEG.marks.comp_info.label}));
manual_ind_g=find(strcmp(EEG.marks.comp_info(ml_i).label,{udf.chan_marks_struct.label}));
for i=1:length(udf.eloc_file);
EEG.marks.comp_info(manual_ind_marks).flags(udf.eloc_file(i).index,1)=udf.chan_marks_struct(manual_ind_g).flags(i,1);
for udfl_i=1:length(udf.chan_marks_struct)
%manual_ind_marks=ml_i;%find(strcmp(EEG.marks.chan_info{i}.label,{EEG.marks.chan_info.label}));
eegl_i=find(strcmp(udf.chan_marks_struct(udfl_i).label,{EEG.marks.comp_info.label}));
if isempty(eegl_i)
EEG.marks=marks_add_label(EEG.marks,'comp_info', ...
{udf.chan_marks_struct(udfl_i).label, ...
udf.chan_marks_struct(udfl_i).line_color, ...
udf.chan_marks_struct(udfl_i).tag_color, ...
udf.chan_marks_struct(udfl_i).order, ...
zeros(EEG.nbchan,1)});
eegl_i=length(EEG.marks.comp_info);
end
end
for i=1:length(udf.eloc_file);
EEG.marks.comp_info(eegl_i).flags(udf.eloc_file(i).index,1)=udf.chan_marks_struct(udfl_i).flags(i,1);
end
end
% for ml_i=1:length(EEG.marks.comp_info)
% manual_ind_marks=ml_i;%find(strcmp('manual',{EEG.marks.comp_info.label}));
% manual_ind_g=find(strcmp(EEG.marks.comp_info(ml_i).label,{udf.chan_marks_struct.label}));
% for i=1:length(udf.eloc_file);
% EEG.marks.comp_info(manual_ind_marks).flags(udf.eloc_file(i).index,1)=udf.chan_marks_struct(manual_ind_g).flags(i,1);
% end
% end
end
%switch datoric
% case 1
......
......@@ -91,9 +91,8 @@ if nargin < 5
elseif ~isempty(g.quick_chanflag);
mark_ind=find(strcmp(g.quick_chanflag, {udf.chan_marks_struct.label}));
if isempty(mark_ind);
if strcmp(udf.data_type,'EEG');info_type='chan_info';else info_type='comp_info';end;
tmp_marks_struct.chan_info=udf.chan_marks_struct;
tmp_marks_struct=pop_marks_add_label(tmp_marks_struct,'info_type',info_type, ...
tmp_marks_struct=pop_marks_add_label(tmp_marks_struct,'info_type','chan_info', ...
'label',g.quick_chanflag, ...
'action','add', ...
'message','Fill in the missing information for the mark that you are adding.');
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment