When creating a Integer valued nifti:
ni = NIVolume(Int16.(round.(rand(2,2,2))))
its type is
NIVolume{Float32,3,Array{Int16,3}}
I am not sure why, but it may have to do with the return type of getindex being Float32
Then when writing the nifti it becomes corrupted, as the header always says Float32 datatype
When creating a Integer valued nifti:
ni = NIVolume(Int16.(round.(rand(2,2,2))))its type is
NIVolume{Float32,3,Array{Int16,3}}I am not sure why, but it may have to do with the return type of getindex being Float32
Then when writing the nifti it becomes corrupted, as the header always says Float32 datatype