nibabel icon indicating copy to clipboard operation
nibabel copied to clipboard

applying affine is creating some distortion or an illusion

Open satra opened this issue 3 years ago • 5 comments

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.

satra avatar Jan 28 '22 03:01 satra

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.        ]]

satra avatar Jan 28 '22 03:01 satra