title: Align two NIFTI files with different origins and sizes?
body: <p>I have two fMRI NIFTI (.nii) files (a region of interest (ROI) mask and an SPM T-contrast), both of which I can read into Matlab using load_nii, giving me two structures. The actual image data within these structures are different sizes and oriented around different origins:</p>
  
  <pre><code>SPM = 79*95*69 voxels centered on [40, 57, 26]
  ROI = 91*109*91 voxels centered on [46, 64, 37]
  </code></pre>
  
  <p>I need to align these two matrices such that the ROI file corresponds to the correct section of the contrast file. There are several NIFTI-specific functions I can use (pad_nii to add zeros, clip_nii to remove values, from any/several edges), but I'm not sure how to align the two coordinate systems.</p>