-
Notifications
You must be signed in to change notification settings - Fork 57
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 shorthand function to merge two pre-existing RTStruct structure sets #70
Conversation
Merge two structure sets belonging to same image series to one resulting structure set Check DICOM metadata for compatibility with one another and with image series Append ROIContourSequence, StructureSetROISequence and RTROIObservationsSequence of first dataset to array of second dataset and save merged dataset as new RTStruct file afterwards Edit ROI reference number to avoid ambiguity, check datasets for name duplication
Had to merge two RTStructs (one for OARs, one for targets) and stumbled across your repository. First solution with the already existing functions was to create masks from one existing dataset and then re-add the mask to the second dataset. But with that solution the other metadata such as the color of the ROI got lost, so I coded my own version keeping all metadata and just working on the level of the data resulting from |
…rent ROI name previously, accidently 'iterated' over only the name of the StructureSetROISequence object which is not defined and led to an AttributeError
Hey Robin! Thanks for looking into this :) I think this is a great addition to the library but will need some modifications before we're able to bring it in. A few notes:
|
It would probably be also good to add some documentation in the readme so people know that this exists. |
- read existing structure set files as RTStruct class object with the RTStructBuilder - remove saving and export of resulting file, just return merged RTStruct object instead
Hey, thanks to both of you for the fast detailed and constructive feedback! That sounds very reasonable to me :) Asim, I think I fulfilled your second and third point in my recent commit. I also switched to the usage of the I also understand the request to use On your fourth point: Are you speaking of these automatic GitHub routines that are checked on each commit? I would be happy to get some help or advice on this, because I am not experienced at all with those workflows :) At the end of this, I can of course add some documentation and examples to the readme, thank you for the proposal, Adam! |
Thanks for making those changes @rheg49! I think this is a fair middle ground solution. If you can, would you mind submitting a ticket to this repo with all of the information that would be missing from a call to add_roi? We should support adding those values within the tool. In terms of tests, I was referring to the unit tests we have for the project found https://github.com/qurit/rt-utils/tree/main/tests. Maybe a few tests demonstrating the following merge cases:
|
Thanks for merging my code into your project! I recently submitted an issue on the DICOM tag missing in the |
ROIContourSequence
,StructureSetROISequence
andRTROIObservationsSequence
of first dataset to array of second dataset and save merged dataset as new RTStruct file afterwards