Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ability to retrieve ROI names in a case insensitive way #47

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
solve NPE issue
  • Loading branch information
rspinoni committed Feb 23, 2022
commit cab9a6b7a741f4ec10f561891de7c42e7f865dde
3 changes: 2 additions & 1 deletion rt_utils/rtstruct.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,10 @@ def get_roi_mask_by_name(self, name) -> np.ndarray:
"""
Returns the 3D binary mask of the ROI with the given input name
"""
name = name.casefold() if type(name) is str else name

for structure_roi in self.ds.StructureSetROISequence:
if structure_roi.ROIName.casefold() == name.casefold():
if structure_roi.ROIName.casefold() == name:
contour_sequence = ds_helper.get_contour_sequence_by_roi_number(
self.ds, structure_roi.ROINumber
)
Expand Down