aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThéo de la Hogue2022-09-14 16:29:42 +0200
committerThéo de la Hogue2022-09-14 16:29:42 +0200
commit2e909d67876c47d497653102a07b7dc913b83f3d (patch)
tree0bee2ae9e0930dd978c67b786ff29b593acf7d65 /src
parentf0346f70bf2badb46bed882402a38762e3bcdc4a (diff)
downloadargaze-2e909d67876c47d497653102a07b7dc913b83f3d.zip
argaze-2e909d67876c47d497653102a07b7dc913b83f3d.tar.gz
argaze-2e909d67876c47d497653102a07b7dc913b83f3d.tar.bz2
argaze-2e909d67876c47d497653102a07b7dc913b83f3d.tar.xz
Adding a AOIScene copy method with exclude parameter.
Diffstat (limited to 'src')
-rw-r--r--src/argaze/AreaOfInterest/AOIFeatures.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/argaze/AreaOfInterest/AOIFeatures.py b/src/argaze/AreaOfInterest/AOIFeatures.py
index f74920e..087b3f3 100644
--- a/src/argaze/AreaOfInterest/AOIFeatures.py
+++ b/src/argaze/AreaOfInterest/AOIFeatures.py
@@ -186,6 +186,19 @@ class AOIScene():
return max_bounds - min_bounds
+ def copy(self, exclude=[]):
+ """Copy scene partly excluding aoi by name."""
+
+ scene_copy = type(self)()
+
+ for name, area in self.areas.items():
+
+ if name not in exclude:
+
+ scene_copy[name] = numpy.array(area).astype(numpy.float32).view(AreaOfInterest)
+
+ return scene_copy
+
class TimeStampedAOIScenes(DataStructures.TimeStampedBuffer):
"""Define timestamped buffer to store AOI scenes in time."""