diff options
Diffstat (limited to 'src/argaze/GazeFeatures.py')
-rw-r--r-- | src/argaze/GazeFeatures.py | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/src/argaze/GazeFeatures.py b/src/argaze/GazeFeatures.py index 82c3e50..677e9bb 100644 --- a/src/argaze/GazeFeatures.py +++ b/src/argaze/GazeFeatures.py @@ -300,9 +300,10 @@ GazePositionCalibratorType = TypeVar('GazePositionCalibrator', bound="GazePositi class GazePositionCalibrator(DataFeatures.PipelineStepObject): """Abstract class to define what should provide a gaze position calibrator algorithm.""" - def __init__(self): + @DataFeatures.PipelineStepInit + def __init__(self, **kwargs): - super().__init__() + super().__init__(**kwargs) def store(self, observed_gaze_position: GazePosition, expected_gaze_position: GazePosition): """Store observed and expected gaze positions. @@ -565,9 +566,10 @@ class TimeStampedGazeStatus(DataFeatures.TimestampedObjectsList): class GazeMovementIdentifier(DataFeatures.PipelineStepObject): """Abstract class to define what should provide a gaze movement identifier.""" - def __init__(self): + @DataFeatures.PipelineStepInit + def __init__(self, **kwargs): - super().__init__() + super().__init__(**kwargs) @DataFeatures.PipelineStepMethod def identify(self, timestamped_gaze_position: GazePosition, terminate:bool=False) -> GazeMovementType: @@ -840,9 +842,10 @@ class ScanPath(list): class ScanPathAnalyzer(DataFeatures.PipelineStepObject): """Abstract class to define what should provide a scan path analyzer.""" - def __init__(self): + @DataFeatures.PipelineStepInit + def __init__(self, **kwargs): - super().__init__() + super().__init__(**kwargs) self.__properties = [name for (name, value) in self.__class__.__dict__.items() if isinstance(value, property)] @@ -866,20 +869,21 @@ class ScanPathAnalyzer(DataFeatures.PipelineStepObject): class AOIMatcher(DataFeatures.PipelineStepObject): """Abstract class to define what should provide an AOI matcher algorithm.""" - def __init__(self, exclude: list[str] = [], **kwargs): + @DataFeatures.PipelineStepInit + def __init__(self, **kwargs): super().__init__(**kwargs) - self.__exclude = exclude + self.__exclude = [] @property def exclude(self): - """Get list of AOI to exclude from matching.""" + """List of AOI to exclude from matching.""" return self.__exclude @exclude.setter def exclude(self, exclude: list[str]): - """Set list of AOI to exclude from matching.""" + self.__exclude = exclude def match(self, aoi_scene: AOIFeatures.AOIScene, gaze_movement: GazeMovement) -> Tuple[str, AOIFeatures.AreaOfInterest]: @@ -1202,9 +1206,10 @@ class AOIScanPath(list): class AOIScanPathAnalyzer(DataFeatures.PipelineStepObject): """Abstract class to define what should provide a aoi scan path analyzer.""" - def __init__(self): + @DataFeatures.PipelineStepInit + def __init__(self, **kwargs): - super().__init__() + super().__init__(**kwargs) self.__properties = [name for (name, value) in self.__class__.__dict__.items() if isinstance(value, property)] |