Skip to content

Commit

Permalink
DICOM Seg Writer operater: Fix for case where input image is already …
Browse files Browse the repository at this point in the history
…a numpy array (#515)

* Fix for case where input image is already a numpy array

Signed-off-by: Chris Bridge <chrisbridge44@googlemail.com>

* Update example apps' test data path, patch hsdk in local env, and ensure correct MD SDK is used in dev env (#516)

* Add post intall action to patch holoscan package, v2.7 and 2.8

Signed-off-by: M Q <mingmelvinq@nvidia.com>

* Update fixed turorials

Signed-off-by: M Q <mingmelvinq@nvidia.com>

* Updated the setup post install action, local sdk version, and notebook examples

Signed-off-by: M Q <mingmelvinq@nvidia.com>

* Updated the doc too

Signed-off-by: M Q <mingmelvinq@nvidia.com>

* Fix linting error

Signed-off-by: M Q <mingmelvinq@nvidia.com>

---------

Signed-off-by: M Q <mingmelvinq@nvidia.com>

---------

Signed-off-by: Chris Bridge <chrisbridge44@googlemail.com>
Signed-off-by: M Q <mingmelvinq@nvidia.com>
Co-authored-by: Ming M Qin <38891913+MMelQin@users.noreply.github.com>
  • Loading branch information
CPBridge and MMelQin authored Jan 23, 2025
1 parent 7de1e62 commit a80f231
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions monai/deploy/operators/dicom_seg_writer_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,10 @@ def process_images(
seg_image_numpy = image.asnumpy()
elif isinstance(image, (Path, str)):
seg_image_numpy = self._image_file_to_numpy(str(image))
elif not isinstance(image, np.ndarray):
raise ValueError("'image' is not a numpy array, Image object, or supported image file.")
else:
if not isinstance(image, np.ndarray):
raise ValueError("'image' is not a numpy array, Image object, or supported image file.")
seg_image_numpy = image

# Pick DICOM Series that was used as input for getting the seg image.
# For now, first one in the list.
Expand Down

0 comments on commit a80f231

Please sign in to comment.