EyeTrackerISCAN Class Reference

Interface to an ISCAN RK-464 eye-tracker. More...

#include <Psycho/EyeTrackerISCAN.H>

Inheritance diagram for EyeTrackerISCAN:
Inheritance graph
[legend]
Collaboration diagram for EyeTrackerISCAN:
Collaboration graph
[legend]

List of all members.

Classes

struct  EyePosEvent

Public Member Functions

 EyeTrackerISCAN (OptionManager &mgr, const std::string &descrName="Eye Tracker ISCAN", const std::string &tagName="EyeTrackerISCAN")
 Constructor.
virtual ~EyeTrackerISCAN ()
 Destructor.
virtual void calibrate (nub::soft_ref< PsychoDisplay > d)
 Calibrate the tracker, full calibration.
virtual void recalibrate (nub::soft_ref< PsychoDisplay > d, int repeats)
 Calibrate the tracker, quick re-calibration.
virtual void calibrateOnline (nub::soft_ref< PsychoDisplay > d)
 Perform an online calibration.
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.
virtual Point2D< int > getCalibEyePos ()
 Get the current calibrated eye position.
virtual CalibrationTransform::Data getCalibrationSet (nub::soft_ref< PsychoDisplay > d) const
 Get the calibration set.
void requestQuickEyeS ()
 save a direct eyeS file using online calib

Protected Member Functions

virtual void startTracking ()
 Start the tracker.
virtual void stopTracking ()
 Stop the tracker.
virtual void start1 ()
 device filename for parallel port
virtual void start2 ()
 get started

Protected Attributes

OModelParam< bool > itsParTrig
 Use parallel-port start/stop trigger.
OModelParam< std::stringitsSerDev
OModelParam< std::stringitsParDev
 device filename for serial port
bool itsRequestQuickEyeS

Detailed Description

Interface to an ISCAN RK-464 eye-tracker.

There are two modes of operation which can be used with the ISCAN tracker: trigger via serial port and no data streaming, or trigger via parallel port and data streaming over serial.

Definition at line 52 of file EyeTrackerISCAN.H.


Constructor & Destructor Documentation

EyeTrackerISCAN::EyeTrackerISCAN ( OptionManager mgr,
const std::string descrName = "Eye Tracker ISCAN",
const std::string tagName = "EyeTrackerISCAN" 
)

Constructor.

Definition at line 57 of file EyeTrackerISCAN.C.

References ModelComponent::addSubComponent().

EyeTrackerISCAN::~EyeTrackerISCAN (  )  [virtual]

Destructor.

Definition at line 75 of file EyeTrackerISCAN.C.


Member Function Documentation

void EyeTrackerISCAN::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 101 of file EyeTrackerISCAN.C.

void EyeTrackerISCAN::calibrateOnline ( nub::soft_ref< PsychoDisplay d  )  [virtual]

Perform an online calibration.

Reimplemented from EyeTracker.

Definition at line 136 of file EyeTrackerISCAN.C.

References getCalibrationSet().

Point2D< int > EyeTrackerISCAN::getCalibEyePos (  )  [virtual]

Get the current calibrated eye position.

Reimplemented from EyeTracker.

Definition at line 322 of file EyeTrackerISCAN.C.

References rutz::ix86_atomic_int::atomic_get(), OModelParam< T >::getVal(), and itsParTrig.

CalibrationTransform::Data EyeTrackerISCAN::getCalibrationSet ( nub::soft_ref< PsychoDisplay d  )  const [virtual]

Get the calibration set.

Implements EyeTracker.

Definition at line 341 of file EyeTrackerISCAN.C.

References abs(), stats< T >::findS(), Image< T >::getDims(), getEyePos(), Dims::h(), Point2D< T >::i, stats< T >::mean(), stats< T >::S2, sformat(), Dims::w(), and ZEROS.

Referenced by calibrateOnline().

Point2D< int > EyeTrackerISCAN::getEyePos (  )  const [virtual]

Get current eye position.

TODO: we need to think about calibration

Implements EyeTracker.

Definition at line 274 of file EyeTrackerISCAN.C.

References Point2D< T >::i.

Referenced by getCalibrationSet().

Point2D< int > EyeTrackerISCAN::getFixationPos (  )  const [virtual]

Get current fixation position.

TODO: we need to think about calibration

Implements EyeTracker.

Definition at line 315 of file EyeTrackerISCAN.C.

bool EyeTrackerISCAN::isFixating (  )  [virtual]

Is the subject fixating?

TODO: This only works in parallel trigger mode. We check that eye position remains within a tolerance over a period of time (see model parameters).

Implements EyeTracker.

Definition at line 260 of file EyeTrackerISCAN.C.

bool EyeTrackerISCAN::isSaccade (  )  [virtual]

Is the subject in a saccade?

TODO: give this some functionality

Implements EyeTracker.

Definition at line 267 of file EyeTrackerISCAN.C.

void EyeTrackerISCAN::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 116 of file EyeTrackerISCAN.C.

void EyeTrackerISCAN::requestQuickEyeS (  )  [virtual]

save a direct eyeS file using online calib

Reimplemented from EyeTracker.

Definition at line 488 of file EyeTrackerISCAN.C.

void EyeTrackerISCAN::start1 (  )  [protected, virtual]

device filename for parallel port

get started

Reimplemented from EyeTracker.

Definition at line 79 of file EyeTrackerISCAN.C.

References OModelParam< T >::getVal(), and itsParDev.

void EyeTrackerISCAN::start2 (  )  [protected, virtual]

get started

Reimplemented from ModelComponent.

Definition at line 91 of file EyeTrackerISCAN.C.

References OModelParam< T >::getVal(), and itsParTrig.

void EyeTrackerISCAN::startTracking (  )  [protected, virtual]

Start the tracker.

If serial trigger is selected, we send a single byte of value 132 to start the ISCAN tracker. Otherwise, we violently set all pins of the parallel port to 0 to start the tracker.

Implements EyeTracker.

Definition at line 148 of file EyeTrackerISCAN.C.

References OModelParam< T >::getVal(), and itsParTrig.

void EyeTrackerISCAN::stopTracking (  )  [protected, virtual]

Stop the tracker.

If serial trigger is selected, we send a single byte of value 136 to stop the ISCAN tracker. Otherwise, we violently set all pins of the parallel port to 1 to stop the tracker.

Implements EyeTracker.

Definition at line 184 of file EyeTrackerISCAN.C.

References OModelParam< T >::getVal(), itsParTrig, sec(), and sformat().


Member Data Documentation

device filename for serial port

Definition at line 118 of file EyeTrackerISCAN.H.

Referenced by start1().

Use parallel-port start/stop trigger.

Definition at line 116 of file EyeTrackerISCAN.H.

Referenced by getCalibEyePos(), start2(), startTracking(), and stopTracking().


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:21:36 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3