rexcardan/ESAPIX

Banging on DVH quieries: Min returns zero, Mean off by factor of two

fizxmike opened this issue · 2 comments

Using esapi137 branch. Using ESAPI "live" (linked up behind facade).
Output from my verification tests:
untitled

other queries seem to work fine:

passed: Test Max[Gy] <64 Goal
passed: Test Max[Gy] <60 Variation
passed: Test Max[Gy] <60 Not met
passed: Test Max[cGy] <6400 Goal
passed: Test Max[cGy] <6000 Variation
passed: Test Max[cGy] <6000 Not met
FAILED: Test Min[Gy] >50 Goal
FAILED: Test Min[Gy] >54 Variation
FAILED: Test Min[Gy] >54 Not met
FAILED: Test Min[cGy] >5000 Goal
FAILED: Test Min[cGy] >5400 Variation
FAILED: Test Min[cGy] >5400 Not met
FAILED: Test Mean[Gy] >50 Goal
FAILED: Test Mean[Gy] <60 Variation
FAILED: Test Mean[Gy] <54 Not met
FAILED: Test Mean[cGy] >5000 Goal
FAILED: Test Mean[cGy] <6000 Variation
FAILED: Test Mean[cGy] <5400 Not met
passed: Test D66cc[Gy] >57 Goal
passed: Test D66cc[Gy] >60 Variation
passed: Test D66cc[Gy] >60 Not met
...
passed: Test D66cc[cGy] >5700 Goal
passed: Test D66cc[cGy] >6000 Variation
passed: Test D66cc[cGy] >6000 Not met
passed: Test D95%[%] >98 Goal
passed: Test D95%[%] >99 Variation
passed: Test D95%[%] >99 Not met
passed: Test D66cc[%] >95 Goal
passed: Test D66cc[%] >98 Variation
passed: Test D66cc[%] >98 Not met
passed: Test V57Gy[cc] >60 Goal
passed: Test V57Gy[cc] >70 Variation
passed: Test V57Gy[cc] >70 Not met
passed: Test V5700cGy[cc] >60 Goal
passed: Test V5700cGy[cc] >70 Variation
passed: Test V5700cGy[cc] >70 Not met
...

Thanks! This is great input. I will investigate.

Fixed in Commit bb71466. The issue is I was averaging the dose from the cumulative DVH (dumb). Now I correctly convert to differential and take Sum(Volume*Dose)/Total volume. Thanks for the heads up and sorry it took so long.

Code can be see at https://github.com/rexcardan/ESAPIX/blob/master/ESAPIX/Extensions/DVHDataExtensions.cs

Lines 227 - 244