Unify MRI images to the same voxel and real space

I have around 2000 MRI images with different shapes. I want to map all of them to the same real space (mm space) and unify their shape. So, I picked an MRI image at random and I choose its shape and affine transform as a basis for the subsequent analysis.

For each image in the dataset I have, I dd the following:

new_nifti = image.resample_img(old_nifti, target_affine=basis_affine, target_shape=basis_shape,
                                    interpolation='nearest')

My approach sounds reasonable to me. However, I am afraid of subtleties that I am not aware of. For instance, I am afraid I will end up with something like this. It is hard to keep track for all the 2000 images to ensure their resampled version looks good and reasonable.

  1. Do you think my approach make sense? Are there subtleties that I did not pay attention to?
  2. Is there a better approach for choosing the base shape of the MRI image instead of random. The same question also applies on choosing the base affine transform.

Hello,

Why not register to a standard space, such as MNI? Also, I would consider a more robust interpolation scheme (either cubic or sinc).

Best,
Steven

Because it will take time. I need the minimal preprocessing time.