UNPKG

gazeplotter

Version:

Gazeplotter is a Svelte application for visualizing eye-tracking data.

33 lines (32 loc) 1.64 kB
import type { DeserializerOutputType } from '../../../type/DeserializerOutput/DeserializerOutputType.ts'; import { AbstractEyeDeserializer } from './AbstractEyeDeserializer.ts'; /** * This class is used to deserialize eye data from a CSV file which contains segments. * That means it has information about the start and end of each segment. */ export declare class CsvSegmentedEyeDeserializer extends AbstractEyeDeserializer { cFrom: number; cTo: number; cParticipant: number; cStimulus: number; cAoi: number; constructor(header: string[]); /** * Deserializes a single row from a CSV file into a DeserializerOutputType object. * This function checks the validity of required fields in the row. It does not store * any data in memory beyond the scope of this function. * * Note: This deserializer assumes all constants represent fixations, which may be subject to change. * * @param {string[]} row - An array representing a single row from the CSV file. * Expected to contain values for 'from', 'to', 'aoi', 'participant', and 'stimulus'. * @returns {DeserializerOutputType | null} - Returns an object containing deserialized data * if the row is valid. If any required field ('from', 'to', * 'participant', 'stimulus') is empty, returns null. */ deserialize(row: string[]): DeserializerOutputType; /** * @returns null because this deserializer does not need to finalize anything */ finalize(): DeserializerOutputType; }