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

vhdrreader.m
function objekt = idatreader(filename)
%DATENTYP Konstruktor fuer die Klasse auto
% $Id: idatreader.m 6 2004-12-13 12:28:39Z maik $
if(nargin~=1)
    error('Please hand over filename');
end

if(exist(filename)~=2)
    error('File not found');
end

if ~libisloaded('vhdrreader.dll') && exist('vhdrreader.dll')==3 
	loadlibrary('vhdrreader.dll','vhdrreader.h')
elseif ~exist('vhdrreader.dll')==3    
    disp('Could not find vhdrreader.dll: function not possible')
end


% Definition der Datenstruktur
if exist('vhdrreader.dll')==3       
    objekt.filename=filename;
    objekt.data=calllib('vhdrreader','readFile',filename,'','');
    d=size(objekt.data);
    objekt.samplesperchannel=d(1);
    objekt.channels=d(2);
    objekt.samplerate=round(1000/mean(diff(objekt.data(1:1000,1))));%RS: am 7.6. gendert, gibt realistischere WErte


    % Klassenzugehoerigkeit
    objekt = class(objekt, 'vhdrreader');  
else
    disp('Could not find vhdrreader.dll: function not possible')
     disp('Please convert your data to *.mat file instead')
    return
end    



Contact us