-
Notifications
You must be signed in to change notification settings - Fork 176
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
[BUG] Recalculating a plan in matRad imported from Eclipse yields dosimetric differences when MLCs are present. #769
Comments
Hi @edwardwang1 |
Hi @wahln I very much appreciate all of your help along the way! There is one caveat with using the kernel that I've created. I've had to change line 62 of matRad_calcPhotonDoseBixel.m from ExportedEclipsePlansAndDoses.zip Also, for your convenience here is a script to compare dose profiles
You can use it like so after loading in the mat file
|
Thanks.
By the way, the usePrimaryPhotonFluence setting has no effect because when fields are imported and recalculated, matRad is no longer in "beamlet mode", but calculates the field as a whole (indicated by |
Thanks for taking a look so quickly! I remember adjusting the FWHM of the kernel, but I recall it didn't have a significant effect. However, I didn't do this rigorously, so I can definitely go back and look at it again. I am hoping to create a simple test case that I can use to test the DICOM exporter you sent me previously, however in order to do so I need to ensure that a plan exported from Eclipse and into matRad matches. I have a question about "field" vs "beamlet" mode. I understand that when I import an open field into matRad, it simply performs a field calculation. However, in the case of a collimated beam (please see attached image), the MLCs form a non-rectangular shape, so I don't understand how a "field" calculation is appropriate, as certain bixels would be blocked by the MLCs. Since we're using a cube as a target, this is not the best demonstration, but if you look at the corners, you can see that the opening by the MLCs is not fully square. Lastly, I forgot to mention in my previous comment that we are using a Varian Truebeam equipped with HDMLCs. There are 60 leaf pairs. The first 14 and last 14 leaf pairs have 5mm width, and the middle 32 have 2.5mm width. |
Hi Niklas, Thanks for pointing this out to me. The SCD should definitely not be 0, that's a mistake on my part. I asked our physics associate and apparently for the Varian TrueBeam it's 550mm. I will note that the results are much less sensitive to the SCD than the FWHM. To determine the FWHM, I iterated through a list of values at 0.1 increment for the single collimated beam case and found it to be 5.4. The results are much better for both the single and double collimated beam cases (pretty similar to what you have). For the next test, I imported another collimated 2-beam case, but this time the collimation is much more complex. Here is how I obtained it:
As you can see first, this added collimation worsens the results quite drastically. Do you have any thoughts as to why this would be the case? I have attached the .mat file (in zip format) as well as a zip of the raw DICOM. Thanks! |
I need some time to look into it. |
Hi Niklas, I have added my experience to the discussion. Also, it was a good idea to natively calculate an IMRT plan in Eclipse, the results are pretty good. Now I just need to figure out why my other plan doesn't work. To clarify, in the other plan, I obtained MLC leaf positions through loading an RTPlan generated with matRad. Then, I calculate the dose in Eclipse using loaded plan. From here, I export the dose and plan generated from Eclipse and import back into matRad. Except for how the MLCs were determined, there is nothing else different between the native Eclipse plan and the matRad plan, so I'm not sure why I'm seeing dose discrepancies. |
I've developed a theory as to what could be causing the discrepancy. I noticed that in the native Eclipse plan, each beam had 166 control points, whereas in the plan optimized within matRad, there are only 9 control points. It may be possible that Eclipse and matRad handle interpolating between control points differently. To test this, I modified the matRad RTPlan exporter to interpolate between the control points. Now, the exported plan has 161 control points when importing into Eclipse. When repeating the analysis now the results look much better (although there is still a larger discrepancy than compared to the native Eclipse plan). |
Just bumping this Issue. Is there anything weird still going on / are you at the same state as a month ago? |
I haven't done any additional experiments yet with the water phantom. I did experiment with some lung cases, but there is pretty large discrepancy so I am waiting for the VMC++ license at the moment. |
Describe the bug
When importing an RTPlan (with MLCS) and RTDose from Eclipse, recalculating the RTPlan within matRad will lead to differences in the dose compared to the imported one. The recalculation appears to be correct for open fields, but not for fields with MLCs. We have performed our experiments for a FFF 6MV kernel in using a cubic water phantom.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
For a water phantom, we expected the recalculated doses to be very similar to the imported doses.
Screenshots
1-beam IMRT, 10x10cm field, open field
DVH from imported dose
DVH from recalculated dose
1-beam IMRT, 10x10cm field, MLC fit to target
Gamma pass fraction at 2%/2mm over the phantom = 96.79%
DVH from imported dose
DVH from recalculated dose
2-beam IMRT, 10x10cm field, MLC fit to target
Gamma pass fraction at 2%/2mm over the phantom = 94.69%
DVH from imported Dose
DVH from recalculated dose
Desktop (please complete the following information):
Additional context
When recalculating the dose, we are using
pln.propDoseCalc.useCustomPrimaryPhotonFluence = true;
, but this does not seem to have any effect since the dij calculation is very fast.The text was updated successfully, but these errors were encountered: