victorgabr / ApertureComplexity

Python 3.x port of the Eclipse ESAPI plug-in script used in the study : Predicting deliverability of volumetric-modulated arc therapy (VMAT) plans using aperture complexity analysis
GNU General Public License v3.0
24 stars 8 forks source link

Truebeam - moving jaws #2

Closed brjdenis closed 1 year ago

brjdenis commented 3 years ago

Hi there! I experimented a little and compared the calculations with varian.esapi. For most plans the result is the same, but for plans with moving jaws, there is a small difference. I think ApertureComplexity does not take into account that each control point may have different positions of the jaws.

victorgabr commented 3 years ago

Hey Denis, that's correct.

The implementation I published here was only tested with fixed jaw plans, which were the ones I had available at that time.

Can you provide anonymized DICOM-RTPLAN files with moving jaws alongside the results you got using ESAPI?

I guess it would not be much difficult to compute the complexity using moving jaws.

Many thanks.

brjdenis commented 3 years ago

Hi, sorry for the late reply. Sure, I can give a couple of plans. If it is not too much to ask, would it be possible to make ApertureComplexity compatible with Halcyon MLCs as well? Halcyon uses two levels of leaves that are displaced by 0.5 cm laterally. I tried modifying the ESAPI script (https://github.com/umro/Complexity/issues/1) and got some sensible results, but would really like to see the same in your code.

victorgabr commented 3 years ago

Hey, I noticed you put your C# code here, I can translate it to python easily... https://github.com/umro/Complexity/issues/1

But I have a question, are you handling the overlap between Halcyon's two jaw banks? The aperture computation algorithm actually considers jaw, MLC overlaps only:

https://github.com/victorgabr/ApertureComplexity/blob/bf6ad23218e064449121a871173d83f821c236a7/complexity/ApertureMetric.py#L185

When computing the sidePerimeter

https://github.com/victorgabr/ApertureComplexity/blob/bf6ad23218e064449121a871173d83f821c236a7/complexity/ApertureMetric.py#L319

victorgabr commented 1 year ago

Hey @brjdenis, I added Jaw tracking on the complexity computation. Check out the latest commit:

https://github.com/victorgabr/ApertureComplexity/commit/7dbe2f230d0b3b0f3e677fcb7a2a938c720d6621

Can you test that on your plans?

victorgabr commented 1 year ago

Merged pull request for this issue. https://github.com/victorgabr/ApertureComplexity/pull/5