diff options
author | Théo de la Hogue | 2024-04-03 14:42:47 +0200 |
---|---|---|
committer | Théo de la Hogue | 2024-04-03 14:42:47 +0200 |
commit | aad9fa2cb413aa8d2f5c8755d52a91662b9978de (patch) | |
tree | 7925d994b2e8ab78916ad0465f3d50db1bb362e5 /src | |
parent | 10fe9b798e56193c8fa655bdd50916e4c07e3a00 (diff) | |
download | argaze-aad9fa2cb413aa8d2f5c8755d52a91662b9978de.zip argaze-aad9fa2cb413aa8d2f5c8755d52a91662b9978de.tar.gz argaze-aad9fa2cb413aa8d2f5c8755d52a91662b9978de.tar.bz2 argaze-aad9fa2cb413aa8d2f5c8755d52a91662b9978de.tar.xz |
Storing analysis using class path. Removing useless enter and exit methods.
Diffstat (limited to 'src')
-rw-r--r-- | src/argaze/ArFeatures.py | 58 |
1 files changed, 2 insertions, 56 deletions
diff --git a/src/argaze/ArFeatures.py b/src/argaze/ArFeatures.py index 2c8fcd0..b29136b 100644 --- a/src/argaze/ArFeatures.py +++ b/src/argaze/ArFeatures.py @@ -280,7 +280,7 @@ class ArLayer(DataFeatures.SharedObject, DataFeatures.PipelineStepObject): for analyzer in self.__aoi_scan_path_analyzers: - analysis[type(analyzer)] = analyzer.analysis() + analysis[DataFeatures.get_class_path(analyzer)] = analyzer.analysis() return analysis @@ -674,7 +674,7 @@ class ArFrame(DataFeatures.SharedObject, DataFeatures.PipelineStepObject): for analyzer in self.__scan_path_analyzers: - analysis[type(analyzer)] = analyzer.analysis() + analysis[DataFeatures.get_class_path(analyzer)] = analyzer.analysis() return analysis @@ -700,20 +700,6 @@ class ArFrame(DataFeatures.SharedObject, DataFeatures.PipelineStepObject): return d - @DataFeatures.PipelineStepEnter - def __enter__(self): - - for name, layer in self._layers.items(): - - layer.__enter__() - - @DataFeatures.PipelineStepExit - def __exit__(self, exception_type, exception_value, exception_traceback): - - for name, layer in self._layers.items(): - - layer.__exit__(exception_type, exception_value, exception_traceback) - @DataFeatures.PipelineStepMethod def look(self, timestamped_gaze_position: GazeFeatures.GazePosition = GazeFeatures.GazePosition()) -> Iterator[Union[object, type, dict]]: """ @@ -1037,28 +1023,6 @@ class ArScene(DataFeatures.PipelineStepObject): "distance_tolerance": self.__distance_tolerance } - @DataFeatures.PipelineStepEnter - def __enter__(self): - - for name, layer in self._layers.items(): - - layer.__enter__() - - for name, frame in self.__frames.items(): - - frame.__enter__() - - @DataFeatures.PipelineStepExit - def __exit__(self, exception_type, exception_value, exception_traceback): - - for name, layer in self._layers.items(): - - layer.__exit__(exception_type, exception_value, exception_traceback) - - for name, frame in self.__frames.items(): - - frame.__exit__(exception_type, exception_value, exception_traceback) - @DataFeatures.PipelineStepMethod def estimate_pose(self, detected_features: any) -> tuple[numpy.array, numpy.array, any]: """Define abstract estimate scene pose method. @@ -1266,24 +1230,6 @@ class ArCamera(ArFrame): layer.aoi_matcher.exclude = excluded_aoi_list - @DataFeatures.PipelineStepEnter - def __enter__(self): - - super().__enter__() - - for name, scene in self._scenes.items(): - - scene.__enter__() - - @DataFeatures.PipelineStepExit - def __exit__(self, exception_type, exception_value, exception_traceback): - - super().__exit__(exception_type, exception_value, exception_traceback) - - for name, scene in self._scenes.items(): - - scene.__exit__(exception_type, exception_value, exception_traceback) - @DataFeatures.PipelineStepMethod def watch(self, image: numpy.array): """Detect AR features from image and project scenes into camera frame. |