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!
doug

On 8/24/2023 6:01 PM, Proulx, Jean Sebastien wrote:
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 ran
tkregister2 --mov run4.nii.gz --targ run1.nii.gz --regheader --reg run4to1
and clicked "save reg" without touching anything. It spits out the following matrix
 0.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 thought
mri_vol2vol --mov run4.nii.gz --targ run1.nii.gz --reg run4to1 --no-resample --o run4to1.nii.gz would 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 resample
mri_vol2vol --mov run4.nii.gz --targ run1.nii.gz --reg run4to1 --o run4to1.nii.gz
makes 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 lta
error: Cannot allocate memory
error: 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 and
Good evening!
Sebastien
_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is 
addressed.  If you believe this e-mail was sent to you in error and the e-mail 
contains patient information, please contact the Mass General Brigham 
Compliance HelpLine at https://www.massgeneralbrigham.org/complianceline 
<https://www.massgeneralbrigham.org/complianceline> .
Please note that this e-mail is not secure (encrypted).  If you do not wish to 
continue communication over unencrypted e-mail, please notify the sender of 
this message immediately.  Continuing to send or respond to e-mail after 
receiving this message means you understand and accept this risk and wish to 
continue to communicate over unencrypted e-mail. 

Reply via email to