brainglobe / brainglobe-utils

Shared general purpose tools for the BrainGlobe project
MIT License
11 stars 1 forks source link

Image data with type int64 will error in future. #35

Closed adamltyson closed 5 months ago

adamltyson commented 2 years ago
 imio.save.py:31: FutureWarning: Image data has type int64, which may cause incompatibilities with other tools. This will error in NiBabel 5.0. This warning can be silenced by passing the dtype argument to Nifti1Image().
    img = nib.Nifti1Image(img, affine_transform)
adamltyson commented 5 months ago

Looking into this, I don't think we should do anything about this because int64 nii files do cause issues with other software.

I can't remember when this warning was raised, but I think it's unlikely that software should be saving int64 niis. Anyway this will now error with the latest version of nibabel, so if it occurs, we can address it.