GazeDataHandler that prints all events to console. When subscribed to fixation events, also prints them to console.
Наследование: GazeDataHandler
Пример #1
0
        static void EyetrackerFound(object sender, EyetrackerInfoEventArgs e)
        {
            EyetrackerConnector connector = new EyetrackerConnector(e.EyetrackerInfo);
            connector.Connect();

            // sync CPU and Eyetracker clocks
            SyncManager syncManager = new SyncManager(clock, e.EyetrackerInfo, EventThreadingOptions.BackgroundThread);

            // detect fixations
            GazeDataFixationHandler fixations = new GazeDataFixationHandler(syncManager);
            connector.AddGazeDataHandler(fixations.GazeDataReceived);

            // print to console
            GazeDataConsolePrintHandler printer = new GazeDataConsolePrintHandler(syncManager);
            //connector.AddGazeDataHandler(printer.GazeDataReceived);
            fixations.FixationDetector.FixationEnd += printer.FixationEnd;
        }
Пример #2
0
        static void EyetrackerFound(object sender, EyetrackerInfoEventArgs e)
        {
            EyetrackerConnector connector = new EyetrackerConnector(e.EyetrackerInfo);

            connector.Connect();

            // sync CPU and Eyetracker clocks
            SyncManager syncManager = new SyncManager(clock, e.EyetrackerInfo, EventThreadingOptions.BackgroundThread);

            // detect fixations
            GazeDataFixationHandler fixations = new GazeDataFixationHandler(syncManager);

            connector.AddGazeDataHandler(fixations.GazeDataReceived);

            // print to console
            GazeDataConsolePrintHandler printer = new GazeDataConsolePrintHandler(syncManager);

            //connector.AddGazeDataHandler(printer.GazeDataReceived);
            fixations.FixationDetector.FixationEnd += printer.FixationEnd;
        }