aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/argaze/AreaOfInterest/AOI2DScene.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/argaze/AreaOfInterest/AOI2DScene.py b/src/argaze/AreaOfInterest/AOI2DScene.py
index a726b23..f8599c5 100644
--- a/src/argaze/AreaOfInterest/AOI2DScene.py
+++ b/src/argaze/AreaOfInterest/AOI2DScene.py
@@ -67,11 +67,12 @@ class AOI2DScene(AOIFeatures.AOIScene):
# Convert rect element into dict
rect_dict = {
- 'shape': 'rectangle',
- 'x': float(rect.getAttribute('x')),
- 'y': float(rect.getAttribute('y')),
- 'width': float(rect.getAttribute('width')),
- 'height': float(rect.getAttribute('height'))
+ "Rectangle": {
+ 'x': float(rect.getAttribute('x')),
+ 'y': float(rect.getAttribute('y')),
+ 'width': float(rect.getAttribute('width')),
+ 'height': float(rect.getAttribute('height'))
+ }
}
new_areas[rect.getAttribute('id')] = AOIFeatures.AreaOfInterest.from_dict(rect_dict)
@@ -81,10 +82,11 @@ class AOI2DScene(AOIFeatures.AOIScene):
# Convert circle element into dict
circle_dict = {
- 'shape': 'circle',
- 'cx': float(circle.getAttribute('cx')),
- 'cy': float(circle.getAttribute('cy')),
- 'radius': float(circle.getAttribute('r'))
+ "Circle": {
+ 'cx': float(circle.getAttribute('cx')),
+ 'cy': float(circle.getAttribute('cy')),
+ 'radius': float(circle.getAttribute('r'))
+ }
}
new_areas[circle.getAttribute('id')] = AOIFeatures.AreaOfInterest.from_dict(circle_dict)