Misalignment after resample_to_img

Hi everyone!

I’m trying to downsample my Template image to Anatomical one in order to register Anatomical to Template. Both images are in the same orientation (LAS, i’m doing rodent fMRI). After using resample_to_image(Template, Anat, interpolation = ‘nearest’), I end up having downsampled Template with same shape as Anat image. But when I plot it, it appears as white noise as some area of FOV. When I try instead to upsample Anat to Template, image of upsampled Anat appears like as FOV was shifted up and right, so the image s cropped by the FOV at the bottom left corner.

This could look as a dummy question, but i’m stuck in here, any idea ?

hi, could you share a minimal example to reproduce the problem? a small script, the images, and the plots?

I’m sorry for late reply. I’ve solved this issue by introducing shifts into affine matrix.