diff options
Diffstat (limited to 'src/argaze.test/AreaOfInterest/AOIFeatures.py')
-rw-r--r-- | src/argaze.test/AreaOfInterest/AOIFeatures.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/argaze.test/AreaOfInterest/AOIFeatures.py b/src/argaze.test/AreaOfInterest/AOIFeatures.py index 6df33ca..cb8fb52 100644 --- a/src/argaze.test/AreaOfInterest/AOIFeatures.py +++ b/src/argaze.test/AreaOfInterest/AOIFeatures.py @@ -208,6 +208,23 @@ class TestAOISceneClass(unittest.TestCase): self.assertEqual(len(aoi_2d_scene_AB.items()), 4) self.assertEqual(list(aoi_2d_scene_AB.keys()), ["A", "B", "C", "D"]) self.assertEqual(len(vars(aoi_2d_scene_AB)), 2 + len(aoi_2d_scene_AB.items())) + + def test_expand(self): + """Test AOIScene expand method.""" + + # Create 2D scene + aoi_2d_scene = AOIFeatures.AOIScene(2,) + aoi_2d_scene["A"] = AOIFeatures.AreaOfInterest([[0, 0], [0, 1], [1, 1], [1, 0]]) + aoi_2d_scene["B"] = AOIFeatures.AreaOfInterest([[0, 0], [0, 2], [2, 2], [2, 0]]) + + # Expand to 3D scene + aoi_3d_scene = aoi_2d_scene.expand() + + self.assertEqual(aoi_3d_scene.dimension, 3) + self.assertEqual(len(aoi_3d_scene.items()), 2) + self.assertEqual(list(aoi_3d_scene.keys()), ["A", "B"]) + self.assertEqual(aoi_3d_scene["A"].shape[1], 3) + self.assertEqual(aoi_3d_scene["B"].shape[1], 3) def test___repr__(self): """Test AOIScene string representation.""" |