diff options
author | Théo de la Hogue | 2023-08-15 16:24:49 +0200 |
---|---|---|
committer | Théo de la Hogue | 2023-08-15 16:24:49 +0200 |
commit | 1b8fc172daf2d6bf6fdded278766289aeaf61e06 (patch) | |
tree | 124989c0d5bc147a6c9c18b62213d27f86d8a72f | |
parent | f141200ca4edc72815a0e7bb47eab89f7cd83512 (diff) | |
download | argaze-1b8fc172daf2d6bf6fdded278766289aeaf61e06.zip argaze-1b8fc172daf2d6bf6fdded278766289aeaf61e06.tar.gz argaze-1b8fc172daf2d6bf6fdded278766289aeaf61e06.tar.bz2 argaze-1b8fc172daf2d6bf6fdded278766289aeaf61e06.tar.xz |
guessing dimension if there is at least one area.
-rw-r--r-- | src/argaze/AreaOfInterest/AOIFeatures.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/argaze/AreaOfInterest/AOIFeatures.py b/src/argaze/AreaOfInterest/AOIFeatures.py index a8bab02..65470af 100644 --- a/src/argaze/AreaOfInterest/AOIFeatures.py +++ b/src/argaze/AreaOfInterest/AOIFeatures.py @@ -256,8 +256,13 @@ class AOIScene(): for name, area in aoi_scene_data.items(): areas[name] = AreaOfInterest(area) - # Guess dimension from first area dimension - dimension = list(areas.values())[0].dimension + # Default dimension is 0 + dimension = 0 + + # Guess dimension from first area dimension (default: 2) + if len(areas) > 0: + + dimension = list(areas.values())[0].dimension return AOIScene(dimension = dimension, areas = areas) |