nibabel
nibabel copied to clipboard
applying affine is creating some distortion or an illusion
i'm taking an image and simply changing the zoom with this:
epi_2mm_nii = resample_to_output(epi0, (2,2,2))
and then plotting the before and after with the niworkflows display module. this results in this image:
https://dl.dropbox.com/s/tvx6c1wsbatdhgv/test.svg?dl=0 (couldn't figure out a way to display this in github - you will have to download and open with a browser).
i wasn't expecting any visual differences, so now i'm contemplating if this is just an illusion.
orig affine
[[ 3.5940001 0. 0. -65.4303894 ]
[ 0. 3.5940001 0. -96.33889008]
[ 0. 0. 4. -86.82946777]
[ 0. 0. 0. 1. ]]
new affine
[[ 2. 0. 0. -65.4303894 ]
[ 0. 2. 0. -96.33889008]
[ 0. 0. 2. -86.82946777]
[ 0. 0. 0. 1. ]]