EyeTrace Class Reference

An eye movement trace. More...

#include <Psycho/EyeTrace.H>

Collaboration diagram for EyeTrace:
Collaboration graph
[legend]

List of all members.

Classes

struct  RawEyeData

Public Member Functions

Constructors, destructor and initialization

 EyeTrace (const std::string &filename, const PixRGB< byte > &color)
 Constructor from a file on disk, use given display color.
 ~EyeTrace ()
 Destructor.
Data access functions

bool hasData (const size_t index, const SimTime &t) const
 Did sample of given index happen before given time?
bool hasData (const size_t index) const
 Do we have a sample for the given index?
rutz::shared_ptr< EyeDatadata (const size_t index) const
 Get the data for a given index.
PixRGB< bytecolor () const
 Get our display color.
size_t size () const
 Get number of available (non-trash) samples.
size_t numEvents () const
 Get number of parsed events (if any).
size_t numSaccades () const
 Deprecated command, as new markup may apply to more than saccades.
Metadata access functions

SimTime period () const
 Get sampling period.
std::string filename () const
 Get filename.
std::string basename () const
 Get filename, without extension if any.
PixPerDeg ppd () const
 Get pixels-per-degree of the display.

Detailed Description

An eye movement trace.

This class encapsulates a simple eye movement trace and provides I/O functions.

Definition at line 54 of file EyeTrace.H.


Constructor & Destructor Documentation

EyeTrace::EyeTrace ( const std::string filename,
const PixRGB< byte > &  color 
)

Constructor from a file on disk, use given display color.

Definition at line 50 of file EyeTrace.C.

References SimTime::fromString(), join(), SimTime::msecs(), and split().

EyeTrace::~EyeTrace (  ) 

Destructor.

Definition at line 208 of file EyeTrace.C.


Member Function Documentation

std::string EyeTrace::basename (  )  const

Get filename, without extension if any.

Definition at line 414 of file EyeTrace.C.

PixRGB< byte > EyeTrace::color (  )  const

Get our display color.

Definition at line 410 of file EyeTrace.C.

rutz::shared_ptr< EyeData > EyeTrace::data ( const size_t  index  )  const

Get the data for a given index.

Note that this will throw a fatal error if we don't have data for that index; so be sure to check with hasData() first.

Definition at line 220 of file EyeTrace.C.

References rutz::shared_ptr< T >::reset(), SACSTATE_FIX, SACSTATE_SAC, SACSTATE_SMO, and SACSTATE_UNK.

std::string EyeTrace::filename (  )  const

Get filename.

Definition at line 406 of file EyeTrace.C.

bool EyeTrace::hasData ( const size_t  index  )  const

Do we have a sample for the given index?

This will return true as long as the index is not past the available amount of data.

Definition at line 216 of file EyeTrace.C.

bool EyeTrace::hasData ( const size_t  index,
const SimTime t 
) const

Did sample of given index happen before given time?

Typically one would keep incrementing the index until we return false here, at which point it would be time to increment the time. Note that we will always return false after the index gets past all available samples in the trace.

Definition at line 212 of file EyeTrace.C.

size_t EyeTrace::numEvents (  )  const

Get number of parsed events (if any).

Definition at line 391 of file EyeTrace.C.

size_t EyeTrace::numSaccades (  )  const

Deprecated command, as new markup may apply to more than saccades.

Definition at line 395 of file EyeTrace.C.

SimTime EyeTrace::period (  )  const

Get sampling period.

Definition at line 402 of file EyeTrace.C.

PixPerDeg EyeTrace::ppd (  )  const

Get pixels-per-degree of the display.

Definition at line 423 of file EyeTrace.C.

size_t EyeTrace::size (  )  const

Get number of available (non-trash) samples.

Definition at line 387 of file EyeTrace.C.


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