mne-python icon indicating copy to clipboard operation
mne-python copied to clipboard

[BUG, MRG] Fix wrong affine used in T1/CT manual registration

Open alexrockhill opened this issue 3 years ago • 5 comments

I was using this pipeline for my own research and noticed on the manual registration, we used the T1 affine to transform back but since it's not aligned this doesn't make any sense; it needs to go back to RAS coordinates of the CT. I've tested and this works but it's tough to test in the documentation because it would require manual input in freesurfer.

alexrockhill avatar Aug 09 '22 20:08 alexrockhill

I just realized it was fairly trivial to add the starting_affine to mne.transforms.compute_volume_registration so I cleaned that up a bit as well.

alexrockhill avatar Aug 09 '22 22:08 alexrockhill

Empirically, I found that you get better results running the full rigid registration with the different sigmas rather than just the no smoothing and no zoom factored version as well.

alexrockhill avatar Aug 09 '22 22:08 alexrockhill

I just ran through all the commented code and it works so this is good to go by me.

alexrockhill avatar Aug 09 '22 23:08 alexrockhill

Not sure why test forward dipole is failing, I reran it once as well... seems unrelated

alexrockhill avatar Aug 10 '22 19:08 alexrockhill

Not sure why test forward dipole is failing, I reran it once as well... seems unrelated

#11023

drammock avatar Aug 10 '22 20:08 drammock

Just some minor kw-only and versionadded stuff from me, will merge once green other than what should be fixed by #11034, thanks in advance @alexrockhill !

larsoner avatar Aug 15 '22 14:08 larsoner

Thanks @alexrockhill !

larsoner avatar Aug 15 '22 16:08 larsoner