jrkerns / pylinac

An image analysis library for medical physics
https://pylinac.readthedocs.io/en/latest/
MIT License
153 stars 98 forks source link

Result passing property added for other projects. #316

Closed crcrewso closed 3 years ago

crcrewso commented 4 years ago

The intent of this patch is to create a easy to maintain self building dictionary, that can be called by external classes or frameworks.

Basic format would be:

analyzed_cbct[<module>][<result type or sub module>]

I.e.

analyzed_cbct['CTP404']['HUs']['Air'] 

would store the analyzed measure for the air volume of the CTP404 module.

At all points the indices would be human readable, and for modules with more or less roi's then the function could be redefined from the inherited module.

Documentation of the human readable names would have to be added to the readthedocs of course.

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-0.5%) to 83.321% when pulling 5308c4a42816091183668068265337460f17282c on crcrewso:Develop into 14a5296ae4ee0ecb01865d08f15070c82e19fc45 on jrkerns:master.

jrkerns commented 3 years ago

Corrected: Thanks for the pull request. If I'm reading this right, you'll need to actually call myct.results_dict['CTP404']..., correct?

If indeed this is what you want, you'll need to add unit tests (probably here) or per-phantom (probably here) and update the docs (I'd put it in the "view the results" section here.

crcrewso commented 3 years ago

Corrected: Thanks for the pull request. If I'm reading this right, you'll need to actually call myct.results_dict['CTP404']..., correct?

If indeed this is what you want, you'll need to add unit tests (probably here) or per-phantom (probably here) and update the docs (I'd put it in the "view the results" section here.

Yes, I do intend to support all phantoms in the same way, creating a unified consistent jsonable object for any cbct analysis. Will amend this pull request as I have time.

jrkerns commented 3 years ago

Good news on this front. I'm working on adding integration via APIs, so a dict of results (converted to JSON) can be helpful here. I'll tackle this once I can unify the workflow.

jrkerns commented 3 years ago

Closed in #360