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

Conversion of dicom structure to nii.gz doesn't retain holes in structure #244

Closed
nickhardcastle opened this issue Nov 21, 2023 · 8 comments · Fixed by #271
Closed

Conversion of dicom structure to nii.gz doesn't retain holes in structure #244

nickhardcastle opened this issue Nov 21, 2023 · 8 comments · Fixed by #271
Assignees

Comments

@nickhardcastle
Copy link

Hi team,

When using convert_rtstruct, if there's a hole in the structure in the dicom, this isn't retained. The resultant nii.gz fills in the hole in the structure.

I noticed this while converting ring structures.

Cheers,

Nick

@rnfinnegan rnfinnegan self-assigned this Nov 22, 2023
@pchlap
Copy link
Contributor

pchlap commented Nov 23, 2023

Thanks for reporting this @nickhardcastle! We will look into it.

@kirbyju
Copy link
Contributor

kirbyju commented May 17, 2024

Hi, any update on this? We've got some new datasets in TCIA where this is an issue.

Btw, it's super cool that you built in support to pull data from us directly! I'm planning to advertise this in of our social media posts sometime soon :-)

@pchlap
Copy link
Contributor

pchlap commented May 20, 2024

Hi @kirbyju, thanks for reaching out. To be honest both @rnfinnegan and I have been caught up with other things. But hopefully this is something that would be fairly straightforward to resolve.

@rnfinnegan when we catch up in a couple of weeks can we discuss how to do this? It would be good to have a sample RTSTRUCT to use for development? Perhaps you could generate something on a phantom? Once we have that I think it should be fairly easy to adapt our function to support this.

@kirbyju we'll keep you posted on how it goes :)

@pchlap
Copy link
Contributor

pchlap commented Jun 12, 2024

Hi @kirbyju, @nickhardcastle,

Sorry for the delay in fixing this issue. @rnfinnegan and I had a chance to meet yesterday to debug this. Turns out the solution was pretty simple! (See #271).

Rob created a test dataset using Eclipse for us to test this. But it might be good to get some more test data to confirm this fixes the issue entirely. Do either of you have data you might be able to share? Alternatively would it be feasible to test out the fix before we build a release? I will aim to generate some test data using MIM and RF AutoContour this weekend.

Rob and I will address a few other minor issues and will prepare a new release of platipy including this fix in about 3-4 weeks.

@kirbyju
Copy link
Contributor

kirbyju commented Jun 13, 2024

Check out https://github.com/brianmanderson/Slicer_RT_Target_Issue/blob/main/Slicer_Target_Issue.ipynb, which I believe was put together to help test this same issue in SlicerRT. I will take a look at some of the tumor segmentation RTSTRUCT data we have in TCIA to see if I can find a few examples for you to test from there as well.

@kirbyju
Copy link
Contributor

kirbyju commented Jun 13, 2024

I think this one would be useful to try. You can download it here: https://nbia.cancerimagingarchive.net/nbia-search/?saved-cart=nbia-31061718290468281

Screenshot 2024-06-13 at 10 05 44 AM

@pchlap
Copy link
Contributor

pchlap commented Jun 15, 2024

I think this one would be useful to try. You can download it here: https://nbia.cancerimagingarchive.net/nbia-search/?saved-cart=nbia-31061718290468281

Thanks @kirbyju, this TCIA example seems to convert fine. However there isn't a hole in this particular structure, just 2d islands which platipy is converting to a mask fine. Or have I missed something?

I also tested this today with an RTSTRUCT generated in MIM and RF AutoContour where I created a strucutre with a hole inside. These holes are now appearing in the masks generated.

@kirbyju
Copy link
Contributor

kirbyju commented Jun 16, 2024

My mistake, wasn't thinking straight. Glad it seems to be working in all circumstances though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants