jrkerns / pylinac

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

DeviceFieldAnalysis.results_data() fails with AttributeError for Profiler #433

Closed StephenTerry closed 4 months ago

StephenTerry commented 1 year ago

Describe the bug After loading and analyzing a Profiler file using DeviceFieldAnalysis, calling the results_data() method gives an AttributeError because there is no central_roi attribute.

To Reproduce Steps to reproduce the behavior:

  1. Load a Profiler .prm file using DeviceFieldAnalysis, then run analyze().
  2. Call results_data().
  3. Receive error: AttributeError: 'DeviceFieldAnalysis' object has no attribute 'central_roi'

Expected behavior Returning the results_data dictionary.

Additional context Adding a central_roi class to the DeviceFieldAnalysis object with attributes max, mean, std, and min set to None fixes the issue, but I'm not sure if that is the proper way to address this.

jrkerns commented 1 year ago

Confirmed. Fix should be in the next release due April 20th. Thanks for reporting.

jrkerns commented 4 months ago

Fixed in 3.10