Hi, Paul
I am trying to follow-up the discussion here. Is there any way that you can apply an affine transform but without resampling the data? In my opinion, you can just do like
new_img_affine = affine_xfm * old_img_affine,
where old_img_affine is the geometry info you can read from the file header. Then you can just update old_img_affine to new_img_affine such in the file header. In this case you do not need to resample the data at all. Maybe I miss something here.. but it seems that this is the simplest way to do it.
Best
Ruyuan