Version 0.9

Hello all,
Version 0.9 is here. Changes are below along with a few notes about the web app updates.

Dear James,

Thank you so much for sharing your excellent script, programm, python tool !
I would like to use your gamma analysis tool (very fast calculation) to analyse two PortalD RI.dcm with a RD images.
Could you please help me for this…
Thank you so much

Sorry, maybe it’s more clear

Dear James,
I mean to analyse PortalD RI.dcm with a RD image or RI Image.
Thank you so much

Rachid,
Thanks for the kind words. Can you clarify what images you want to compare? Do you mean you want to compare two portal images with each other, or you want to compare two portal images with an 3D RT Dose file?

If you mean the former that might be possible and I’ll look into creating a generic 2D fluence analysis tool, just let me know.

If you mean the latter, I’m afraid that’s outside the scope of pylinac. If you wanted to compare 3D dose to 2D planar images in a non-cardinal direction (i.e. not AP/LR/SI), I’d start with this answer, where you would rotate the dose array to the angle you want. Then, I’d look at a 2D projection (this answer helps visualize it. Also note comment #1 of the answer). If this is what you want I might be able to write a quick script for you to hack.

James

Dear James,

I want to analyse two portal images each other.
Thank you for your answer
Rachid

The idea is to compare field (00, EDW, Elec) measure at gantry 0 with EPID to other angle 90, 180, 270.
Gamma analysis 1,1% can give me score, simple soustraction is not really adapted in my opinion.
Thank you
Rachid

Rachid,
Currently pylinac isn’t set up to do gamma analysis for two arbitrary images, although it shouldn’t be hard to do. I’ve created an issue for this. In the meantime, you should check out this project, which might do what you want.

James

I was able to add a gamma method to the Image class and I’ll release it in v1.2. In the meantime, I adapted it as a standalone function here.

Super,

Thank you so much James ! I will test it asap.
To get score I will try something like this ?!

valid_gamma = gamma[~np.isinf(gamma)]
np.sum(valid_gamma <= 1) / len(valid_gamma)
have a nice day
Rachid

Close. Replace the ~np.isinf() with ~np.isnan(). I’ve also updated the gist to give an example of how to calculate the passing percentage and the average gamma.