vtkDICOMReader->Update() endless loop
OS: Windows 10 VTK: v9.0.1
I've got a single-frame DICOM image, which when read by the
vtkDICOMReader results in an endless loop within the internal
mvtkDICOMParser, specifically within the
while loop in vtkDICOMParser.cxx line 2141-2257.
Unfortunatelly I cannot provide the DICOM file due to privacy policies. Each attempt to anonymize the DICOM image (rewriting the metaData, obfuscating the pixel data) which requires a re-safe of the image will result in a properly working DICOM file.
I found out, that the DICOM file has 3 bytes of trailing zeros (hex:
00 00 00 00 00 00) in it. Removing those 3 bytes solves the issue.
Is this file just corrupted, or are there any DICOM formats out there, which have those trailing zero bytes? I strongly think that the implementation of the
vtkDICOMReader works as intended, but maybe someone could give me some kind of hint what's wrong with my use case.
Sincerely, Philipp Weißenbacher