Open robmarkcole opened 7 years ago
Great that you found a workaround. I poked around in your notebook and resizing the image is one way to achieve the desired result.
Another way that can work is resizing the whole dose grid to match via interpolation. You can see that approach here: https://github.com/dicompyler/dicompyler-plugins/blob/master/plugins/plansum/plansum.py
Although it is more complicated, it might produce a more consistent result.
Also to answer your original question, you can look into the the Image Position Patient tag as well as the Pixel Spacing tag to see what the discrepancies are. It's most likely due to the way that AXB might score voxels leading to 1 more row (or column) than AAA.
Great for completeness here are those tags.
Interestingly when I try the plansum plugin with these images I get an error, since the SeriesInstanceUID do not match in both. Cheers
Adapting the function in plansum for my purpose has been successful, and I have modified it to calculate the dose difference. Next step, gamma analysis. Cheers
Wow that is great! I am glad you were able to repurpose the code!
It would be interesting to roll this code back into dicompyler-core somehow. Maybe a new module for dose grid comparison?
Happy to contribute a module once everything is working well :-) I still have an issue with the resized image, not sure why it appears blocky, see below. Perhaps using scipy would produce a better result? e.g. https://docs.scipy.org/doc/scipy/reference/tutorial/interpolate.html#two-dimensional-spline-representation-procedural-bisplrep
Made some more progress, and have 3d gamma working too, although with a slight fudge on the array size for the time being.. Cheers
Wow that is great! We'll have to see how to integrate this.
I have loaded data from a single plan which has been calculated with AAA and again with AXB. Since it is the same plan I expect the dose grid size to be identical. However I have found that the grid shape and scaling is different. How could this be? Is there a way to check the dicom files to see these factors? Cheers Robin