changed pixdim to ensure that it gets all values, not just xyz, in case the nifti data has more than 3 dimensions