MetaImage: M_ReadElementsROI: data not read completely


I am using SimpleITK 2.0.2 and Python 3.7.9 to read a 3D CT image in the compressed mhd format (ct.mhd, ct.zraw). When I run the code below, I am getting the following message. “data not read completely”. So, I saved the read image back to file, opened in a viewer and I got the correct image. So, it seems like there is no issue for the code… Anyone has any clue why I am getting this message?


MetaImage: M_ReadElementsROI: data not read completely
ideal = 1069833 : actual = 633067

file_reader = sitk.ImageFileReader()
img = file_reader.Execute()

That might be true for an image that is mostly zero, so the last 40% of it which was not read only contained zeroes. This is practically possible with label images.

I can’t quite imaging that being the case for a CT image though. Can you share your image?

Did you manage to find a resoluton to this issue?, I am having the same one as well.