What is happening
NIfTI supports a single header-plus-data file or a dual HDR/IMG representation. If dimensions, datatype, endianness, voxel offset, qform, sform, or gzip boundaries are wrong, readers can reject the file or misinterpret an otherwise present payload.