diff options
Diffstat (limited to 'src/argaze/ArUcoMarkers/ArUcoScene.py')
-rw-r--r-- | src/argaze/ArUcoMarkers/ArUcoScene.py | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/src/argaze/ArUcoMarkers/ArUcoScene.py b/src/argaze/ArUcoMarkers/ArUcoScene.py index 999fd6f..078c9e2 100644 --- a/src/argaze/ArUcoMarkers/ArUcoScene.py +++ b/src/argaze/ArUcoMarkers/ArUcoScene.py @@ -47,31 +47,10 @@ class ArUcoScene(ArFeatures.ArScene): return self.__aruco_markers_group @aruco_markers_group.setter - def aruco_markers_group(self, aruco_markers_group_value: ArUcoMarkersGroup.ArUcoMarkersGroup): + @DataFeatures.PipelineStepAttributeSetter + def aruco_markers_group(self, aruco_markers_group: ArUcoMarkersGroup.ArUcoMarkersGroup): - if isinstance(aruco_markers_group_value, ArUcoMarkersGroup.ArUcoMarkersGroup): - - new_aruco_markers_group = aruco_markers_group_value - - # str: relative path to file - elif type(aruco_markers_group_value) == str: - - filepath = os.path.join(self.working_directory, aruco_markers_group_value) - file_format = filepath.split('.')[-1] - - # OBJ file format for 3D dimension only - if file_format == 'obj': - - new_aruco_markers_group = ArUcoMarkersGroup.ArUcoMarkersGroup.from_obj(filepath) - - elif file_format == 'json': - - with open(filepath) as file: - - new_aruco_markers_group = ArUcoMarkersGroup.ArUcoMarkersGroup(**json.load(file)) - - # Update value - self.__aruco_markers_group = new_aruco_markers_group + self.__aruco_markers_group = aruco_markers_group # Edit parent if self.__aruco_markers_group is not None: |