Interface to an EyeLink-II eye-tracker. More...
#include <Psycho/EyeTrackerEyeLink.H>
Public Member Functions | |
EyeTrackerEyeLink (OptionManager &mgr, const std::string &descrName="Eye Tracker EyeLink", const std::string &tagName="EyeTrackerEyeLink") | |
Constructor. | |
virtual | ~EyeTrackerEyeLink () |
Destructor. | |
virtual void | calibrate (nub::soft_ref< PsychoDisplay > d) |
Calibrate the tracker, full calibration. | |
virtual void | calibrate2 (nub::soft_ref< PsychoDisplay > d) |
virtual void | setBackgroundColor (nub::soft_ref< PsychoDisplay > d) |
virtual void | recalibrate (nub::soft_ref< PsychoDisplay > d, int repeats) |
Calibrate the tracker, quick re-calibration. | |
virtual void | openSDL () |
Open SDL from eyelink library. | |
virtual void | closeSDL () |
Close SDL from eyelink library. | |
virtual bool | isFixating () |
Is the subject fixating? | |
virtual bool | isSaccade () |
Is the subject in a saccade? | |
virtual Point2D< int > | getEyePos () const |
Get current eye position. | |
virtual Point2D< int > | getFixationPos () const |
Get current fixation position (eliminates blink, saccades, etc.). | |
virtual void | manualDriftCorrection (Point2D< double > eyepos, Point2D< double > targetpos) |
mannual drift correction | |
virtual CalibrationTransform::Data | getCalibrationSet (nub::soft_ref< PsychoDisplay > d) const |
Get the calibration set. | |
Protected Member Functions | |
virtual void | startTracking () |
Start the tracker. | |
virtual void | stopTracking () |
Stop the tracker. | |
virtual void | start1 () |
get started | |
virtual void | stop1 () |
get stopped | |
Protected Attributes | |
OModelParam< std::string > | itsEDFfname |
OModelParam< Dims > | itsDims |
SDL screen resolution. |
Interface to an EyeLink-II eye-tracker.
This requires the EyeLink development kit for Linux, available only from SR-Research to select registered users. NOTE: If you encounter an error message like "Cannot open connection, check TCP/IP settings", this may be due to the way the eyelink library figures out your host's IP address, which is through resolving your hostname (nasty!). Since typically you will have two ethernet cards in your box, one connected to the EyeLink tracker (100.1.1.1) via a crossover cable, you need your hostname to be associated with your IP on that network (e.g., your IP will typically be 100.1.1.2). Check your /etc/nsswich.conf and /etc/hosts to make sure this is the case.
Definition at line 56 of file EyeTrackerEyeLink.H.
EyeTrackerEyeLink::EyeTrackerEyeLink | ( | OptionManager & | mgr, | |
const std::string & | descrName = "Eye Tracker EyeLink" , |
|||
const std::string & | tagName = "EyeTrackerEyeLink" | |||
) |
Constructor.
Definition at line 60 of file EyeTrackerEyeLink.C.
EyeTrackerEyeLink::~EyeTrackerEyeLink | ( | ) | [virtual] |
Destructor.
Definition at line 69 of file EyeTrackerEyeLink.C.
void EyeTrackerEyeLink::calibrate | ( | nub::soft_ref< PsychoDisplay > | d | ) | [virtual] |
Calibrate the tracker, full calibration.
Here we do a 9-point calibration.
Reimplemented from EyeTracker.
Definition at line 225 of file EyeTrackerEyeLink.C.
References Raster::ReadRGB().
void EyeTrackerEyeLink::closeSDL | ( | ) | [virtual] |
Close SDL from eyelink library.
Reimplemented from EyeTracker.
Definition at line 338 of file EyeTrackerEyeLink.C.
CalibrationTransform::Data EyeTrackerEyeLink::getCalibrationSet | ( | nub::soft_ref< PsychoDisplay > | d | ) | const [virtual] |
Point2D< int > EyeTrackerEyeLink::getEyePos | ( | ) | const [virtual] |
Get current eye position.
Implements EyeTracker.
Definition at line 414 of file EyeTrackerEyeLink.C.
Point2D< int > EyeTrackerEyeLink::getFixationPos | ( | ) | const [virtual] |
Get current fixation position (eliminates blink, saccades, etc.).
Implements EyeTracker.
Definition at line 434 of file EyeTrackerEyeLink.C.
bool EyeTrackerEyeLink::isFixating | ( | ) | [virtual] |
Is the subject fixating?
TODO: implement this functionality
Implements EyeTracker.
Definition at line 400 of file EyeTrackerEyeLink.C.
bool EyeTrackerEyeLink::isSaccade | ( | ) | [virtual] |
Is the subject in a saccade?
TODO: implement this functionality
Implements EyeTracker.
Definition at line 407 of file EyeTrackerEyeLink.C.
void EyeTrackerEyeLink::manualDriftCorrection | ( | Point2D< double > | eyepos, | |
Point2D< double > | targetpos | |||
) | [virtual] |
mannual drift correction
Reimplemented from EyeTracker.
Definition at line 293 of file EyeTrackerEyeLink.C.
References Point2D< T >::i.
void EyeTrackerEyeLink::openSDL | ( | ) | [virtual] |
Open SDL from eyelink library.
Reimplemented from EyeTracker.
Definition at line 153 of file EyeTrackerEyeLink.C.
References OModelParam< T >::getVal(), Dims::h(), itsDims, and Dims::w().
Referenced by start1().
void EyeTrackerEyeLink::recalibrate | ( | nub::soft_ref< PsychoDisplay > | d, | |
int | repeats | |||
) | [virtual] |
Calibrate the tracker, quick re-calibration.
Since there is no quick calibration for ISCAN, this is like a full calibration.
Reimplemented from EyeTracker.
Definition at line 311 of file EyeTrackerEyeLink.C.
References Raster::ReadRGB().
void EyeTrackerEyeLink::start1 | ( | ) | [protected, virtual] |
get started
Reimplemented from EyeTracker.
Definition at line 73 of file EyeTrackerEyeLink.C.
References OModelParam< T >::getVal(), Dims::h(), itsDims, openSDL(), and Dims::w().
void EyeTrackerEyeLink::startTracking | ( | ) | [protected, virtual] |
Start the tracker.
Implements EyeTracker.
Definition at line 347 of file EyeTrackerEyeLink.C.
References EyeTracker::getSession(), EyeTracker::itsEventLog, and sformat().
void EyeTrackerEyeLink::stop1 | ( | ) | [protected, virtual] |
get stopped
Reimplemented from ModelComponent.
Definition at line 193 of file EyeTrackerEyeLink.C.
References OModelParam< T >::getVal().
void EyeTrackerEyeLink::stopTracking | ( | ) | [protected, virtual] |
OModelParam<Dims> EyeTrackerEyeLink::itsDims [protected] |
SDL screen resolution.
Definition at line 107 of file EyeTrackerEyeLink.H.