'FileDataset' object has no attribute 'PixelData' - Flatness/Symmetry

Hello Everyone,

I am trying to analyze scanned images (10x10 field) done with gafchromic film and i get this error:

AttributeError: ‘FileDataset’ object has no attribute ‘PixelData’

Can you guys help me fix this issue?

This generally means that the DICOM file is not an image file – I suggest you double-check that you have loaded the right file. If it is, then perhaps the scanner produces a DICOM file without standard pixel data.

Take a look at the SOP class to see what the scanner says it is producing:

ds = dcmread(filename) print(ds.SOPClassUID.name)

Then you can see from the DICOM standard whether that should have pixel data or not.

It’s a .jpg file…

The error message is a pydicom message, so pylinac is trying to open it as a DICOM file. Perhaps the wrong open function is being used, or you need an argument to tell it the file is jpg? I’ve only used DICOM files in pylinac…

Bruno, I fixed this but hasn’t been rolled out to a release yet (see issue here: https://github.com/jrkerns/pylinac/issues/191 and commit fix here: https://github.com/jrkerns/pylinac/commit/7221b08fdf03e0ccadbe2c2d43940f0c593c36da).
You can install a bleeding edge version of pylinac to get around this, do an inplace modification according to the commit, or wait for an update. I’d like to release a bug fix update soon.


Thank you very much James!