aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThéo de la Hogue2023-05-23 09:36:02 +0200
committerThéo de la Hogue2023-05-23 09:36:02 +0200
commitaae90716b0a45262177d0247ea5ae3b778194e8b (patch)
treec566a25ba0d5ceae222b19c27ac3ebd989a3d2a8
parentb7658a8e2f77dcf4e426315a3cd53972d618b368 (diff)
downloadargaze-aae90716b0a45262177d0247ea5ae3b778194e8b.zip
argaze-aae90716b0a45262177d0247ea5ae3b778194e8b.tar.gz
argaze-aae90716b0a45262177d0247ea5ae3b778194e8b.tar.bz2
argaze-aae90716b0a45262177d0247ea5ae3b778194e8b.tar.xz
Adding AOIStep letter managment.
-rw-r--r--src/argaze/GazeFeatures.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/argaze/GazeFeatures.py b/src/argaze/GazeFeatures.py
index a26b1f1..31290b5 100644
--- a/src/argaze/GazeFeatures.py
+++ b/src/argaze/GazeFeatures.py
@@ -558,6 +558,7 @@ class AOIScanPath(list):
self.__current_aoi = ''
self.__index = ord('A')
self.__aoi_letter = {}
+ self.__letter_aoi = {}
def __repr__(self):
"""String representation."""
@@ -577,6 +578,11 @@ class AOIScanPath(list):
self.__index += 1
return letter
+ def get_letter_aoi(self, letter):
+ """Get which aoi is related to an unique letter."""
+
+ return self.__letter_aoi[letter]
+
def __str__(self) -> str:
"""Convert aoi scan path into a string with unique letter per aoi step."""
@@ -611,8 +617,14 @@ class AOIScanPath(list):
try:
+ # Edit unique letter per aoi
+ letter = self.__get_aoi_letter(self.__current_aoi)
+
+ # Remember which letter identify which aoi
+ self.__letter_aoi[letter] = self.__current_aoi
+
# Edit new step
- new_step = AOIScanStep(self.__movements, self.__current_aoi, self.__get_aoi_letter(self.__current_aoi))
+ new_step = AOIScanStep(self.__movements, self.__current_aoi, letter)
# Append new step
super().append(new_step)