Gdcm::reader can check for file size (detect and fail when reading truncated file)
Cross-platform DICOM implementation
Brought to you by:
malat
At the moment, gdcm::reader (or gdcm::imagereader) won't fail if the file to read is truncated.
As explained in a thread, "This is a 'feature' in GDCM. Technically we had case were the only
existing DICOM file was truncated (broken archiver, cancelled C-STORE
...). In all cases we could not ask the patient to come back and have
a new set of files. So the default behavior was indeed to allow
reading those technically illegal images."
However, it would be great if the expected behavior could be set (something as read(...,bool failsIfFileTruncated=false)
Vincent
postponed