2D nifti sagittal slice won't open in 3DSlicer

Thank you, this shows what the problem is. The first value of dim field is 2 and so only the first two components of the srow matrix are used. Therefore the image axis directions are [0., 0.] and [-0.7813, 0.]. The [0., 0.] axis direction is invalid.

If your image lives in the 3D space then it does not matter how many slices your image has, you must set dimension to 3.

Probably nibabel just ignores the image dimension. This may or may not be correct. Probably nobody really knows what is the correct behavior. This kind of issues are very typical for nifti: the format is poorly defined, ambiguous, and therefore developers who implement it make arbitrary decisions that lead to incompatibilities and misinterpretations. Stay away from nifti. This kind of issues very rarely if ever happen if you use other file formats, such as nrrd. It is really just nifti that has all these problems.