dcm files are binary files with structured binary segments. https://docs.fileformat.com/image/dcm/ . The first 128 bytes are reserved for comments, or binary 0 if unused. You are reading starting from byte 0, so you are reading the comments as-if they are data.
The easiest explanation for that error would be if SPECTinfo.Rows, SPECTinfo.Columns, and SPECTinfo.NumberOfFrames are all non-scalar.