image thumbnail

eogui – a software to analyze electro-oculogram (EOG) recordings

by

 

10 Aug 2011 (Updated )

detects blinks and saccadic eye movements in EOG recordings

filterlist(varargin)
function varargout = filterlist(varargin)
% $Id: filterlist.m 6 2004-12-13 12:28:39Z maik $
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @filterlist_OpeningFcn, ...
                   'gui_OutputFcn',  @filterlist_OutputFcn, ...
                   'gui_LayoutFcn',  [] , ...
                   'gui_Callback',   []);
if nargin && ischar(varargin{1})
    gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
    gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT


% --- Executes just before filterlist is made visible.
function filterlist_OpeningFcn(hObject, eventdata, handles, varargin)
% Choose default command line output for filterlist
handles.output = 0;


handles.data=[];
%lade vorhandene Liste
if(exist('dfilter.config')==2)  
   data=load('dfilter.config','liste','-mat');    
   handles.data=data.liste;
end

liste='';
for(i=1:length(handles.data))
    filt=handles.data(i);
    liste{i}=filt.name;    
end
set(handles.lbFilter,'String',liste);

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes filterlist wait for user response (see UIRESUME)
uiwait(handles.figure1);


% --- Outputs from this function are returned to the command line.
function varargout = filterlist_OutputFcn(hObject, eventdata, handles) 
%varargout{1} = handles.output;
if(isfield(handles,'figure1'))      
    close(handles.figure1);    
end


% --- Executes on selection change in listbox1.
function listbox1_Callback(hObject, eventdata, handles)


% --- Executes during object creation, after setting all properties.
function listbox1_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on button press in bAdd.
function bAdd_Callback(hObject, eventdata, handles)

filt=filterdlg();
if(isempty(filt)) return; end;
handles.data=[handles.data filt];
guidata(gcf, handles);
liste='';
for(i=1:length(handles.data))
    filt=handles.data(i);
    liste{i}=filt.name;    
end
set(handles.lbFilter,'String',liste);


% --- Executes on button press in bEdit.
function bEdit_Callback(hObject, eventdata, handles)
pos=get(handles.lbFilter,'Value');
if(pos<=0) return; end;
filt=filterdlg(handles.data(pos));
if(isempty(filt)) return; end;
handles.data(pos) =filt;
guidata(gcf, handles);
liste='';
for(i=1:length(handles.data))
    filt=handles.data(i);
    liste{i}=filt.name;    
end
set(handles.lbFilter,'String',liste);




% --- Executes on button press in bRemove.
function bRemove_Callback(hObject, eventdata, handles)
pos=get(handles.lbFilter,'Value');
if(pos<=0) return; end;
index=[1:pos-1 pos+1:length(handles.data)];

handles.data=handles.data(index);
guidata(gcf, handles);
liste='';
for(i=1:length(handles.data))
    filt=handles.data(i);
    liste{i}=filt.name;    
end
set(handles.lbFilter,'Value',1);
set(handles.lbFilter,'String',liste);




% --- Executes on button press in bOK.
function bOK_Callback(hObject, eventdata, handles)
liste=handles.data;
save('dfilter.config','liste','-mat');
uiresume(handles.figure1);

Contact us