I’m quite new to MNE python and I’m trying to migrate to it from Fieldtrip for MEG analysis.
My question regards the anatomical reconstructions.
I have a large dataset with anatomy (surfaces t co) extracted with the Computational anatomy Toolbox (CAT12). There is a way to use those anatomical reconstructions in MNE python, without re-running everything in FreeSurfer?
MNE is really meant to work smoothly with freesurfer. It’s not impossible but it’s clearly
not easy and would require a deep understanding of the MNE internals. I would suggest
to rerun with freesurfer.
Actually, the dataset consists in something like 1200 subjects … so it will be very difficult to re-run everything in FreeSurfer !
Do you think it is very complex? There are guides on the topic? What about using low level anatomical objects loading and then run the analysis? I’m quite good in programming, coming from C++, and I’m not afraid of “complex things”.
Otherwise I’m afraid that re-running everything n FreeSurfer will be not possible and therefore impossible for me to switch to MNE Python (something I would really do :(((( … ).
(caveat: I have no experience with CAT12 so I may say something naive).
My feeling is that if @DavideTabarelli is able and motivated to work on this, it would be a useful thing to have in MNE to be able to read CAT12 surfaces. But I wonder if it’s already possible? I poked around on CAT12 Manual and found a section called
Surfaces in (normalized) template space (after resampling and smoothing; saved in subfolder “surf” by default)
and there they say there is a surface
RESAMP resampling to 164k (Freesurfer) or 32k (HCP) mesh [ resampled | resampled_32k ]
It sounds like you can probably/hopefully use the surf files. I don’t know if CAT12 provides everything you need like lh.white, lh.sphere, lh.sphere.reg, etc. but hopefully it does! That would cover the surface source space end of things.
Then from the BEM end of things if they create suitably smooth and decimated freesurfer-format inner/outer skull and scalp surfaces then you should be good to go, but I doubt it. MNE-Python can create these surfaces for you using mne.bem.make_watershed_bem — MNE 1.3.1 documentation for example.
The main topic here is how to analyze big datasets (like the CamCAN or others) that provides MEG and need for reconstructing surfaces from a large amount of MRI data (~700 or more).
I tried the FreeSurfer approach but is not feasible fr two reasons:
The time required for computation is too large
FreeSurfer (at least on CamCAN data) dial reconstructions usually contains defects, especially in the somatosensory part of the cortex. These pail defects can not be automatically (in my experience) solved by using, for example, a T2 image for dial surface reconstruction improvement. A manual correction with more than 700 subjects is, of course, impossible.
I tried FastSurfer (a deep learning based approach that provides the same output as FreeSurfer with a computational time comparable to the one of CAT12) but the problem 2) still holds.
In my experience, the best approach was the SPM based Computational Anatomy Toolbox (CAT12).
I was successful in using the CAT12 surfaces reconstructions for inverse modeling in Brainstorm and in Fieldtrip but, so far, not in MNE python, which is the tool I aim to use right now.
CAT12 extract a “central” surface, i.e: a mesh of the cortical mantle in between the pial and the white surfaces, in native space. It also provides white surface, the registered spheres in a fully FreeSurfer compatible format etc …
The name of the files are lh.central, lh.white, lh.sphere, lh.sphere.reg etc …
My aim, now, is to
Use those surfaces as a source model in MNE python
Find a way (avoiding a full recon-all) to generate the other BEM surfaces (skull and scalp)
Understand which MNE python functions I can use to put everything together and compute a forward/inverse model in MNE python.
have you tried to put these files in a subject directory mapping freesurfer layout of the files?
then try the mne forward model and let me know what error you get.
yes I tried but it was terribly complicated (lot of errors). I think Alexander was right. MNE is really intended to work with FreeSurfer outputs. finally I re-run my analysis using FastSurfer to obtain a fully compatible FreeSurfer anatomica output.
If someone can run CAT12 on MNE-Python’s sample subject that might help. Then we could see if it’s possible to create a reasonable BEM + forward + inverse using those files.