Skip to content

Commit 898609b

Browse files
committed
Fix AttributeError when extracting multiple ROIs on a single image, if more than one image is selected
Fix #121
1 parent 514ae05 commit 898609b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ See DataLab [roadmap page](https://datalab-platform.com/en/contributing/roadmap.
1212

1313
* Fixed [Issue #128](https://github.com./DataLab-Platform/DataLab/issues/128) - Support long object titles in Signal and Image panels
1414
* Image ROI features:
15+
* Fixed [Issue #121](https://github.com./DataLab-Platform/DataLab/issues/121) - `AttributeError` when extracting multiple ROIs on a single image, if more than one image is selected
1516
* Fixed [Issue #122](https://github.com./DataLab-Platform/DataLab/issues/122) - Image masks are not refreshed when removing metadata except for the active image
1617
* Fixed [Issue #123](https://github.com./DataLab-Platform/DataLab/issues/123) - Image masks are not refreshed when pasting metadata on multiple images, except for the last image
1718
* Text and CSV files:

cdl/computation/image/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
from cdl.obj import (
5050
BaseProcParam,
5151
ImageObj,
52+
ImageROI,
5253
ResultProperties,
5354
ResultShape,
5455
ROI2DParam,
@@ -770,7 +771,7 @@ def extract_multiple_roi(src: ImageObj, group: gds.DataSetGroup) -> ImageObj:
770771
dst.roi = None
771772

772773
src2 = src.copy()
773-
src2.roi = src2.roi.from_params(src2, group)
774+
src2.roi = ImageROI.from_params(src2, group)
774775
src2.data[src2.maskdata] = 0
775776
dst.data = src2.data[y0:y1, x0:x1]
776777
return dst

0 commit comments

Comments
 (0)