Skip to content

Commit

Permalink
Verify if roi_contour has attribute ContourSequence
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxenceLarose authored and asim-shrestha committed Jan 13, 2023
1 parent bc31474 commit 68ff65c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rt_utils/ds_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@ def get_contour_sequence_by_roi_number(ds, roi_number):

# Ensure same type
if str(roi_contour.ReferencedROINumber) == str(roi_number):
return roi_contour.ContourSequence
if hasattr(roi_contour, "ContourSequence"):
return roi_contour.ContourSequence
else:
return Sequence()

raise Exception(f"Referenced ROI number '{roi_number}' not found")

0 comments on commit 68ff65c

Please sign in to comment.