qurit / rt-utils

A minimal Python library to facilitate the creation and manipulation of DICOM RTStructs.
MIT License
191 stars 56 forks source link

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

Open raffaelespinoni opened 2 years ago

raffaelespinoni commented 2 years ago

HI, i'm experiencing problem with low quality ROI labels (written like this: Heart, heart, HEART), maybe an option to extract case insensitive ROIs could be useful to other also

I have a quick_fix in rtstruct.py:98 if structure_roi.ROIName.casefold() == name.casefold():

maybe a more general option while using ".get_roi__mask_by_name" could be better

asim-shrestha commented 2 years ago

Hi @raffaelespinoni, I'm thinking we add an option in get roi_mask_by_name to enable case insensitivity using the code you've provided. I'll try to get this done for this wednesday but feel free to submit your own pull request if you'd like :)

raffaelespinoni commented 2 years ago

Thank's, i'm opening a PR