mne-python
mne-python copied to clipboard
[BUG, MRG] Fix wrong affine used in T1/CT manual registration
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.
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.
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.
I just ran through all the commented code and it works so this is good to go by me.
Not sure why test forward dipole is failing, I reran it once as well... seems unrelated
Not sure why test forward dipole is failing, I reran it once as well... seems unrelated
#11023
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 !
Thanks @alexrockhill !