The error occurs because of the following confluence of situations:
1) If to3d can't guess the image file type from its name, then it tries to read it as a DICOM file.
2) DICOM files don't necessarily have any particular identifying marker in them, so the DICOM reading code just tries to read the DICOM attributes until an error occurs. If no error occurs, the file is assumed to be a DICOM image.
3) However, the DICOM reading code apparently can't recover from all errors.
What format are your images, anyway? That surely isn't obvious from the filenames.
bob cox