You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ENH: Aligning CT to MRI and running iEEG GUI without CT downsampling #11561
Hi,
currently when transformation matrix is applied to CT scans they are interpolated to match the MRI voxel space. However, when original CT has higher resolution then downsampling it to the MRI can make the task of locating contacts harder. More specifically, we are looking for microelectrodes in the CT, and their position is not as vivid as the macro contacts. So locating microelectrodes even in the original CT can be not trivial, and after CT downsampling it can often be challenging.
My general question is if it would be possible to align the CT to MRI without resampling / interpolation and handle both scans in their original resolution in the iEEG GUI?
An easy work-around seems to be just upsampling the MRI so that CT wouldn't be downsampled, but maybe this use case could be handled in mne without such workarounds.
Actually this is currently supported, you just don't pass any freesurfer surface information and pass the full resolution CT as aligned CT. I have been using macro electrodes so I haven't tested it thoroughly but I did think that this would be a nice use-case to support and it was enabled in some recent-ish refactoring. The only thing is that you'll have to handle the coordinate transforms to the MRI on the backend. Would you have time to make an example and I can review (using the sample seeg data)? (You could use micro electrodes at some point as well but that would involve adding another dataset).
EDIT: I realize I didn't address the upsampling MRI question: I don't know if that's super helpful because usually you'll want it to go through freesurfer to use the outputs from that for analysis. I would recommend just finding the coordinates in the MRI frame and then I would store them both as centers and an elec_image (from the warp to template, that could be pulled out of that function also) and warp then register them to the MRI.
Activity
alexrockhill commentedon Mar 15, 2023
Actually this is currently supported, you just don't pass any freesurfer surface information and pass the full resolution CT as aligned CT. I have been using macro electrodes so I haven't tested it thoroughly but I did think that this would be a nice use-case to support and it was enabled in some recent-ish refactoring. The only thing is that you'll have to handle the coordinate transforms to the MRI on the backend. Would you have time to make an example and I can review (using the sample seeg data)? (You could use micro electrodes at some point as well but that would involve adding another dataset).
EDIT: I realize I didn't address the upsampling MRI question: I don't know if that's super helpful because usually you'll want it to go through freesurfer to use the outputs from that for analysis. I would recommend just finding the coordinates in the MRI frame and then I would store them both as centers and an
elec_image(from the warp to template, that could be pulled out of that function also) and warp then register them to the MRI.alexrockhill commentedon Mar 15, 2023
I have a minute, I'll give the example a first pass.
alexrockhill commentedon Mar 15, 2023
Ah actually there were a few things that need to be changed in the GUI in order to support this.