External Email - Use Caution
Sorry, I don't have your previous email so I don't know what the context is. Can you resend this email with the previous exchanges included at the bottom? Also, please remember to send to the FS list instead of us personally.Thanks for the suggestion! The two fov indeed don't align in freeview. I played a little with the --no-resample option but did not acheive what I wanted.
Here I simplified the problem to two single-slice images (run1.nii.gz and run2.nii.gz attached) acquired the same way (same resolution) but in two different positions in scanner space. In freeview it looks like this:freeview anat.nii.gz run1.nii.gz run4.nii.gz
I need the fov to align, but the data to not change at all (because the fov moved with the patient's head during the experiment).
To get the transformation, I rantkregister2 --mov run4.nii.gz --targ run1.nii.gz --regheader --reg run4to1and clicked "save reg" without touching anything. It spits out the following matrix0.99988 -0.01117 0.01053 -0.63259;0.01065 0.99879 0.04792 -0.70029;-0.01105 -0.04780 0.99880 -3.93196;0.00000 0.00000 0.00000 1.00000;Is this indeed the run4 to run1 transformation matrix? Do you know of a way to get that transformation without user information?
Then I thoughtmri_vol2vol --mov run4.nii.gz --targ run1.nii.gz --reg run4to1 --no-resample --o run4to1.nii.gzwould do the trick but no, the run1.nii.gz and run4to1.nii.gz don't align, just like in the image above, as if the transformation is not actually applied.
Allowing resamplemri_vol2vol --mov run4.nii.gz --targ run1.nii.gz --reg run4to1 --o run4to1.nii.gzmakes the two field of view align in freeview but the data is altered.
It looks like the transformation is not actually applied so that only the intersecting voxels are effectively resampled.
There is no error message.
I tried the dev environment and stable711.
I tried renaming the run4to1 registration file to run4to1.lta and I get the folloing error from mri_vol2vol:regio_read_register: loading ltaerror: Cannot allocate memoryerror: LTAalloc(675792816): could not allocate xforms
I tried renaming the run4to1 registration file to run4to1.xfm and nothing changes (no error but the registration still does not seem to be applied).
Any idea what's going on?
Thanks a lot for your help andGood evening!Sebastien