nicetoolbox.visual.media.components.GazeIndividualComponent

class nicetoolbox.visual.media.components.GazeIndividualComponent(visualizer_config: Dict, io, logger, component_name: str, calib: Dict, eyes_middle_3d_data: ndarray | None = None, look_at_data_tuple: bool | None = None)[source]

Bases: Component

Class for visualizing individual gaze data.

calib

The calibration parameters.

Type:

dict

camera_names

The camera names.

Type:

List[str]

subject_names

The subject names.

Type:

List[str]

landmarks_2d

The 2D landmarks data.

Type:

np.ndarray

eyes_middle_3d_data

The 3D eyes middle data.

Type:

np.ndarray

camera_view_subjects_middle_point_dict

The camera view subjects middle point dictionary.

Type:

Dict

look_at_data

The look at data.

Type:

np.ndarray

look_at_labels

The look at labels.

Type:

List[str]

projected_gaze_data_algs

The projected gaze data for the algorithms.

Type:

List[Dict]

Initialize the GazeIndividualComponent.

Parameters:
  • visualizer_config (Dict) – The visualizer configuration settings.

  • io – The input/output object.

  • logger (viewer.Viewer) – The viewer rerun object.

  • component_name (str) – The name of the component.

  • calib (Dict) – The calibration parameters.

  • eyes_middle_3d_data (np.ndarray, optional) – The 3D eyes middle data. Defaults to None.

  • look_at_data_tuple (bool, optional) – The look at data tuple. Defaults to None.

Methods

visualize

Visualize the gaze individual component.

visualize(frame_idx: int) None[source]

Visualize the gaze individual component.

Combines the _log_data method to visualize the gaze individual component in either 2D or 3D.

Parameters:

frame_idx (int) – The frame index.