Skip to content

Instantly share code, notes, and snippets.

@jrkerns
Created March 14, 2023 21:24
Show Gist options
  • Save jrkerns/d52f87af500c89c761f5ce4667e5132d to your computer and use it in GitHub Desktop.
Save jrkerns/d52f87af500c89c761f5ce4667e5132d to your computer and use it in GitHub Desktop.
Center Unif ROI
import pylinac
ct = pylinac.CatPhan504.from_demo_images()
ct.analyze()
data = ct.results_data()
center_unif_roi = data.ctp486.rois['Center']
for name, roi in data.ctp486.rois.items():
if name == 'Center':
continue
if abs(roi.value - center_unif_roi.value) > 30:
print(f"ROI {name} was over the threshold of 30 HU")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment