aboutsummaryrefslogtreecommitdiff
path: root/src/argaze/AreaOfInterest/AOIFeatures.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/argaze/AreaOfInterest/AOIFeatures.py')
-rw-r--r--src/argaze/AreaOfInterest/AOIFeatures.py24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/argaze/AreaOfInterest/AOIFeatures.py b/src/argaze/AreaOfInterest/AOIFeatures.py
index ff33a29..d97cda6 100644
--- a/src/argaze/AreaOfInterest/AOIFeatures.py
+++ b/src/argaze/AreaOfInterest/AOIFeatures.py
@@ -20,6 +20,7 @@ import matplotlib.path as mpath
import numpy
from shapely.geometry import Polygon
from shapely.geometry.point import Point
+from colorama import Style, Fore
AreaOfInterestType = TypeVar('AreaOfInterest', bound="AreaOfInterest")
# Type definition for type annotation convenience
@@ -268,7 +269,7 @@ class AreaOfInterest(numpy.ndarray):
AOISceneType = TypeVar('AOIScene', bound="AOIScene")
# Type definition for type annotation convenience
-class AOIScene(DataFeatures.PipelineStepObject):
+class AOIScene():
"""Define AOI scene as a dictionary of AOI."""
def __init__(self, dimension: int, areas: dict = None):
@@ -531,6 +532,27 @@ class AOIScene(DataFeatures.PipelineStepObject):
return scene_copy
+ def clear(self):
+ """Clear scene."""
+
+ self.__areas.clear()
+
+ def __str__(self) -> str:
+ """
+ String representation of pipeline step object.
+
+ Returns:
+ String representation
+ """
+
+ output = ''
+
+ for name, area in self.__areas.items():
+
+ output += f'{Fore.BLUE}{Style.BRIGHT}{name}{Style.RESET_ALL} '
+
+ return output
+
class TimeStampedAOIScenes(DataFeatures.TimeStampedBuffer):
"""Define timestamped buffer to store AOI scenes in time."""