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

MCS and MI #1

Closed yograjyog closed 3 years ago

yograjyog commented 4 years ago

Hello Victor! Is there any possibility to calculate other metrics like MCS, MI with this script? I really appreciate your help. Many Thanks.

victorgabr commented 4 years ago

The list of implemented metrics is located at:

https://github.com/victorgabr/ApertureComplexity/blob/master/complexity/PyComplexityMetric.py

I am not sure what you mean by MCS, but there are many on the file above.

yograjyog commented 4 years ago

Thanks. Can u plz give a sample code on how to calculate MeanApertureAreaMetric. Appreciate your help.

I have tried this

`from complexity.PyComplexityMetric import MeanApertureAreaMetric from complexity.dicomrt import RTPlan

if name == 'main':

pfile ='E:\MedPhy\Medical Physics Library\Research\Aperture Shape Controller Evaluation\High.dcm' plan_info = RTPlan(filename=pfile) plan_dict = plan_info.get_plan() beams = [beam for k, beam in plan_dict['beams'].items()] complexity_obj = MeanApertureAreaMetric() mean_aperture_area = complexity_obj.Calculate`????

I am stuck.

victorgabr commented 4 years ago

I have added more examples. Other metrics inherited from PyComplexityMetric. So the API for usage is the same. Check the README.md.

There are also more complex metrics on the file: https://github.com/victorgabr/ApertureComplexity/blob/master/complexity/misc.py

Including MCS.

yograjyog commented 4 years ago

Thanks a lot