Hi,
I have a problem when I want to use the .analyze() function, or .results_data() on a .dcm object. When I run the test it fails and returns the following error :
AttributeError: 'DicomImage' object has no attribute 'copy'.
I also tested with the demo given on pylinac but I got the same error.
I've attached the two examples of LeedsTOR ghosts I'm using.
Here is the code I use :
import io
import pylinac
from pylinac import LeedsTOR
# import pydicom
# leeds = pylinac.LeedsTOR.from_demo_image()
# image = pydicom.dcmread(BIN_FILE, force=True)
leeds = pylinac.LeedsTOR(BIN_FILE.path)
leeds.analyze()
data = leeds.results_data()
leeds_upload_analysis = {
"low_contrast_rois": data.num_contrast_rois_seen,
"median_cnr": data.median_cnr,
"median_contrast": data.median_contrast,
}
data = io.BytesIO()
leeds.publish_pdf(data)
UTILS.write_file("leeds.pdf", data)
Best regards.
Simon Douillard