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

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

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

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


% Definition der Datenstruktur
objekt.filename=filename;
if exist('vpdreader.dll')==3
    objekt.data=calllib('vpdreader','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, 'vpdreader');  
else 
    disp('Could not find vpdreader.dll: function not possible')
    disp('Please convert your data to *.mat file instead')
end


Contact us