[Eeglablist] Group analysis with dipole fitting results from custom head model
Jacobsen,Noelle A
jacobsen.noelle at ufl.edu
Mon Aug 9 17:00:55 PDT 2021
Arno,
Thanks for giving feedback on my pipeline. I also realized that it was unnecessary to realign to CTF space, and after keeping the head model in MNI space everything worked fine. However, a colleague of mine and I were discussing which coordinate space it is better to do dipole fitting. Do you think it's better to A) do dipole fitting in the subject CTF space (prior to any normalizing) so that the volume conduction model has not been warped in any way, and then later transform the dipole positions to MNI space or B) just do dipole fitting in MNI coordinate space using a subject MRI and head model that's been normalized to the MNI template? We're not sure if and at what stage the head model is being warped, or how this would affect results. Any thoughts? Does ft_dipolefitting perform in the original coordinate space and then transform to MNI at the very last step?
Regarding co-registration:
There are two reasons why I am using this fiducial method to realign electrodes to the head model. First, the dipfit GUI you suggested does not work for my mesh. I receive this error:
Error using coregister (line 292)
Unknown Matlab mesh file
My guess is this because I'm using an FEM mesh, not a BEM mesh. Second, I do not want to manually co-register all my custom subject electrodes, as this is very time consuming and subjective. An FEM mesh also seems to cause issues when trying to identify dipoles outside of the brain using ft_sourcedepth. I used my segmented subject MRI as an atlas for identifying dipoles outside of the brain instead. I used ft_volumerealign to obtain fiducial coordinates on the normalized MRI, without actually realigning the MRI. Alternatively you could obtain these fiducial locations using ft_sourceplot and manually storing coordinates you click on. Then I warped these fiducial coordinates to MNI space using the transform matrix that is contained in the normalized MRI.
vox2head = mri_norm.transform; %transformation matrix to get from individual-->MNI space
nas = ft_warp_apply(vox2head, nas_orig, 'homogenous'); % transforms coordinate of nasion [1x3] to a position in MNI space
lhj = ft_warp_apply(vox2head, lhj_orig, 'homogenous');
rhj = ft_warp_apply(vox2head, rhj_orig, 'homogenous');
This worked for me. I plotted these fiducials both on the normalized subject MRI and on the template MRI to verify it was marking roughly the same spots on the MNI template.
Regarding DIPFIT-Fieldtrip functionalities:
I do not think the functions ft_prepare_vol_sens and ft_prepare_leadfield are performing properly in DIPFIT 4.1. At the rate it was going, it was going to take nearly 30 days to run pop_multifit with a custom MRI vs. 16 hours total when I first ran those two functions myself in fieldtrip and then fed results into dipfit. Again, I think this is because the transfer matrix and/or other info was not being stored properly, and it was recalculating values for each component even though those values relate only to the headmodel (i.e. are independent of the specific component). Please correct me if I'm wrong, but I do not think the head model transfer matrix and leadfield need to be recomputed for each component. I have not yet check if this has been fixed in DIPFIT 4.2.
Thank you so much,
Noelle
-----Original Message-----
From: eeglablist <eeglablist-bounces at sccn.ucsd.edu> On Behalf Of Delorme, Arnaud via eeglablist
Sent: Friday, August 6, 2021 1:12 PM
Cc: eeglablist at sccn.ucsd.edu
Subject: Re: [Eeglablist] Group analysis with dipole fitting results from custom head model
[External Email]
Dear Noelle,
> Here are the steps I used to create a custom 5-layer FEM head model from a subject MRI using Fieldtrip:
> 1) MRI normalized to MNI space
This part is good. This can also be done with SPM with a user graphic interface.
> 2) MRI resliced using ft_volumereslice
In SPM this part is not necessary (a new volume in MNI space is saved).
> 3) MRI realigned to the CTF coordinate system by marking fiducials (nas, lhj, rhj; same fiducials used to coregister EEG electrode locations) and using ft_volumerealign
The MRI should be in MNI space so this step should not be necessary because DIPFIT can handle electrode and MRI alignment. In fact, DIPFIT will mainly work in MNI space for this type of application, and has not been tested in CTF space.
> 4)MRI segmented and used to create mesh (ft_volumesegment, ft_prepare_mesh)
Very good.
> 5) Electrodes co-registered to MRI based on fiducials (nas, lhj, rhj) using ft_electroderealign
Once you have the mesh, you can use DIPFIT to align electrodes with the mesh.
DIPFIT menu “Head model and settings”
- Select the mesh
- Select the MRI
> 6) Created head model and source model (ft_prepare_headmodel, ft_prepare_sourcemodel, ft_prepare_vol_sens)
This can be done in DIPFIT.
DIPFIT (4.2) menu “Distributed source leadfield matrix"
> 7) Computed leadfield matrix (ft_prepare_leadfield)
See above
> Dipole results:
> Currently, the resulting dipoles seem to be localized accurately when plotted on the subject MRI, but do not appear to be oriented correctly when plotted with the template MRI (avg152t1.mat) as the background image.
Dipole orientation will vary in each subject, and it is fine.
EEGLAB will allow you to cluster dipoles based on location (and optionally orientation).
Overall, you pipeline seems OK, except the alignment with CTF coordinates, which I think is an unnecessary complication (DIPFIT will align the head model and channel coordinate for you). The result should be the same though.
Arno
_______________________________________________
Eeglablist page: https://urldefense.proofpoint.com/v2/url?u=http-3A__sccn.ucsd.edu_eeglab_eeglabmail.html&d=DwIGaQ&c=sJ6xIWYx-zLMB3EPkvcnVg&r=D6vo-sTwTKQ4CnETni9CUC32PkfvCsmxJRnYG2rwADQ&m=6to-j7JQqxPPfiq4_AcB6qmpBJDDs2GTUEsDoPxN_lc&s=xmbUhh7hZSWDoodS4OKPa0eEq6uKp_VghrC9eb0KxlY&e=
To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.ucsd.edu
For digest mode, send an email with the subject "set digest mime" to eeglablist-request at sccn.ucsd.edu
More information about the eeglablist
mailing list