aboutsummaryrefslogtreecommitdiff
path: root/src/argaze.test/AreaOfInterest/AOIFeatures.py
diff options
context:
space:
mode:
authorTheo De La Hogue2023-09-22 22:06:20 +0200
committerTheo De La Hogue2023-09-22 22:06:20 +0200
commitb947573f7dbccb5b2b13b64677192145f2dbb864 (patch)
tree20cd0cb471b245445bd493c3e8e24fa7baf45d8b /src/argaze.test/AreaOfInterest/AOIFeatures.py
parent1f36c34242791145a1b33dd17cf351018456310f (diff)
downloadargaze-b947573f7dbccb5b2b13b64677192145f2dbb864.zip
argaze-b947573f7dbccb5b2b13b64677192145f2dbb864.tar.gz
argaze-b947573f7dbccb5b2b13b64677192145f2dbb864.tar.bz2
argaze-b947573f7dbccb5b2b13b64677192145f2dbb864.tar.xz
Working on AOI frame feature: now 2D AOI in scene frame are merged into 3D AOI in scene layer.
Diffstat (limited to 'src/argaze.test/AreaOfInterest/AOIFeatures.py')
-rw-r--r--src/argaze.test/AreaOfInterest/AOIFeatures.py16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/argaze.test/AreaOfInterest/AOIFeatures.py b/src/argaze.test/AreaOfInterest/AOIFeatures.py
index bced0aa..6df33ca 100644
--- a/src/argaze.test/AreaOfInterest/AOIFeatures.py
+++ b/src/argaze.test/AreaOfInterest/AOIFeatures.py
@@ -118,13 +118,17 @@ class TestAreaOfInterestClass(unittest.TestCase):
aoi_2D = AOIFeatures.AreaOfInterest([[0, 0], [0, 2], [2, 2], [2, 0]])
- self.assertEqual(aoi_2D.inner_axis((1, 1)), (0.5, 0.5))
+ self.assertEqual(aoi_2D.inner_axis(1, 1), (0.5, 0.5))
def test_outter_axis(self):
aoi_2D = AOIFeatures.AreaOfInterest([[0, 0], [0, 2], [2, 2], [2, 0]])
- self.assertEqual(aoi_2D.outter_axis((0.5, 0.5)), (1, 1))
+ self.assertEqual(aoi_2D.outter_axis(0.5, 0.5), (1, 1))
+
+ aoi_3D = AOIFeatures.AreaOfInterest([[1, 0, 0], [1, 0, 2], [1, 2, 2], [1, 2, 0]])
+
+ self.assertEqual(aoi_3D.outter_axis(0.5, 0.5), (1, 1, 1))
def test_circle_intersection(self):
@@ -181,21 +185,15 @@ class TestAOISceneClass(unittest.TestCase):
aoi_2d_scene_AB["A"] = AOIFeatures.AreaOfInterest([[0, 0], [0, 1], [1, 1], [1, 0]])
aoi_2d_scene_AB["B"] = AOIFeatures.AreaOfInterest([[0, 0], [0, 2], [2, 2], [2, 0]])
- print('aoi_2d_scene_AB vars: ', vars(aoi_2d_scene_AB))
-
# Create second scene with C and D aoi
aoi_2d_scene_CD = AOIFeatures.AOIScene(2,)
aoi_2d_scene_CD["C"] = AOIFeatures.AreaOfInterest([[0, 0], [0, 3], [3, 3], [3, 0]])
aoi_2d_scene_CD["D"] = AOIFeatures.AreaOfInterest([[0, 0], [0, 4], [4, 4], [4, 0]])
- print('aoi_2d_scene_CD vars: ', vars(aoi_2d_scene_CD))
-
# Merge first scene and second scene into a third scene
aoi_2d_scene_ABCD = aoi_2d_scene_AB | aoi_2d_scene_CD
- print('aoi_2d_scene_ABCD vars: ', vars(aoi_2d_scene_ABCD))
-
# Check third scene
self.assertEqual(aoi_2d_scene_ABCD.dimension, 2)
self.assertEqual(len(aoi_2d_scene_ABCD.items()), 4)
@@ -205,8 +203,6 @@ class TestAOISceneClass(unittest.TestCase):
# Merge second scene into first scene
aoi_2d_scene_AB |= aoi_2d_scene_CD
- print('aoi_2d_scene_AB vars: ', vars(aoi_2d_scene_AB))
-
# Check first scene
self.assertEqual(aoi_2d_scene_AB.dimension, 2)
self.assertEqual(len(aoi_2d_scene_AB.items()), 4)