Closed crcrewso closed 3 years ago
Should the line be
{name: {'avg value': val.pixel_value, 'cnr': val.cnr,
'difference': val.value_diff, 'nominal value': val.nominal_val,
'passed': val.passed} for name, val in self.ctp404.rois.items()}
The results_data will be a hierarchy of dataclasses. I'm about to release a release candidate for v3.0. Accessing data will be like so:
data = ct.results_data()
data.ctp404.hu_rois['Air'].value
or as a dict:
data = ct.results_data(as_dict=True)
data['ctp404']['hu_rois']['Air']['value']
Let me know how this structure works for you and reopen if need be. Release candidate coming shortly.
https://github.com/jrkerns/pylinac/blob/90f261b2754c7a5f7f2f1bcefc822bc339c43109/pylinac/ct.py#L1303-L1305
myCBCT['CTP404 HU ROI values']
is hard to parse because the returned object is a list of dictionaries each with a single key