EyeLinkAscParser.H

Go to the documentation of this file.
00001 /*!@file Psycho/EyeLinkAscParser.H EyeLink eye-tracker parses the
00002   *.asc eyetracking file. Usually this comes from the *.edf file that the
00003   eyetracker produces, then processed by EDF2ASC executable.            */
00004 // //////////////////////////////////////////////////////////////////// //
00005 // The iLab Neuromorphic Vision C++ Toolkit - Copyright (C) 2000-2005   //
00006 // by the University of Southern California (USC) and the iLab at USC.  //
00007 // See http://iLab.usc.edu for information about this project.          //
00008 // //////////////////////////////////////////////////////////////////// //
00009 // Major portions of the iLab Neuromorphic Vision Toolkit are protected //
00010 // under the U.S. patent ``Computation of Intrinsic Perceptual Saliency //
00011 // in Visual Environments, and Applications'' by Christof Koch and      //
00012 // Laurent Itti, California Institute of Technology, 2001 (patent       //
00013 // pending; application number 09/912,225 filed July 23, 2001; see      //
00014 // http://pair.uspto.gov/cgi-bin/final/home.pl for current status).     //
00015 // //////////////////////////////////////////////////////////////////// //
00016 // This file is part of the iLab Neuromorphic Vision C++ Toolkit.       //
00017 //                                                                      //
00018 // The iLab Neuromorphic Vision C++ Toolkit is free software; you can   //
00019 // redistribute it and/or modify it under the terms of the GNU General  //
00020 // Public License as published by the Free Software Foundation; either  //
00021 // version 2 of the License, or (at your option) any later version.     //
00022 //                                                                      //
00023 // The iLab Neuromorphic Vision C++ Toolkit is distributed in the hope  //
00024 // that it will be useful, but WITHOUT ANY WARRANTY; without even the   //
00025 // implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      //
00026 // PURPOSE.  See the GNU General Public License for more details.       //
00027 //                                                                      //
00028 // You should have received a copy of the GNU General Public License    //
00029 // along with the iLab Neuromorphic Vision C++ Toolkit; if not, write   //
00030 // to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,   //
00031 // Boston, MA 02111-1307 USA.                                           //
00032 // //////////////////////////////////////////////////////////////////// //
00033 //
00034 // Primary maintainer for this file: Christian Siagian <siagian@usc.edu>
00035 // $HeadURL: svn://isvn.usc.edu/software/invt/trunk/saliency/src/Psycho/EyeLinkAsc.H $
00036 // $Id: $
00037 //
00038 
00039 
00040 // ######################################################################
00041 
00042 #include "Image/Point2D.H"
00043 
00044 #ifndef PSYCHO_EYELINKASCPARSER_H_DEFINED
00045 #define PSYCHO_EYELINKASCPARSER_H_DEFINED
00046 
00047 class EyeLinkAscParser
00048 {
00049 public:
00050   //! Constructor
00051   EyeLinkAscParser(std::string fileName);
00052 
00053   //! Destructor
00054   virtual ~EyeLinkAscParser();
00055 
00056 public:
00057 
00058   std::string itsSubjectName;
00059 
00060   std::vector<int> itsTrialStart;
00061   std::vector<int> itsTrialEnd;
00062 
00063   std::vector<std::vector<int> > itsFlipTime;
00064   std::vector<std::vector<std::vector<Point2D<float> > > > itsFlipFixations;
00065   std::vector<std::vector<int> > itsFlipFrame;
00066 
00067   std::vector<int> itsDriftCorrectionStart;
00068   std::vector<int> itsDriftCorrectionDone;
00069 
00070   std::vector<std::vector<int> > itsSaccadeStart;
00071   std::vector<std::vector<int> > itsSaccadeEnd;
00072   std::vector<std::vector<int> > itsSaccadeDuration;
00073   std::vector<std::vector<Point2D<float> > > itsSaccadeStartLocation;
00074   std::vector<std::vector<Point2D<float> > > itsSaccadeEndLocation;
00075   std::vector<std::vector<float> >           itsSaccadeAmplitude; 
00076   std::vector<std::vector<float> >           itsSaccadePeakVel;
00077  
00078   std::vector<std::vector<int> > itsFixationStart;
00079   std::vector<std::vector<int> > itsFixationEnd;
00080   std::vector<std::vector<int> > itsFixationDuration;
00081   std::vector<std::vector<Point2D<float> > > itsFixationAvgLocation;
00082   std::vector<std::vector<float> >           itsFixationAvgPupilSize;
00083  
00084   std::vector<std::vector<int> > itsGazeTime;
00085   std::vector<std::vector<Point2D<float> > > itsLeftGaze;
00086   std::vector<std::vector<float> > itsLeftGazePupilSize;
00087 
00088   std::vector<std::vector<Point2D<float> > > itsRightGaze;
00089   std::vector<std::vector<float> > itsRightGazePupilSize;
00090 
00091 private:
00092 
00093   //! Parse the input file
00094   void parse(std::string fileName);
00095 
00096   std::vector<std::string> tokenize(std::string line);
00097   std::string trim(std::string str);
00098 
00099 };
00100 
00101 #endif
00102 
00103 // ######################################################################
00104 /* So things look consistent in everyone's emacs... */
00105 /* Local Variables: */
00106 /* mode: c++ */
00107 /* indent-tabs-mode: nil */
00108 /* End: */
Generated on Sun May 8 08:05:32 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3