[Mne_analysis] Volume morphing and labels

Alexandre Gramfort alexandre.gramfort at inria.fr
Wed Sep 5 09:49:02 EDT 2018
Search archives:

        External Email - Use Caution        

hi,

I would try to do it with:

https://nilearn.github.io/modules/generated/nilearn.input_data.NiftiMasker.html
https://nilearn.github.io/modules/generated/nilearn.regions.img_to_signals_labels.html

these functions can take care of the resampling if needs be.

You'll need to work with nibabel images and not STCs though

HTH
Alex

On Wed, Sep 5, 2018 at 3:25 PM Christian Kiefer <ch.kiefer at fz-juelich.de> wrote:
>
>         External Email - Use Caution
>
> Dear mne community,
>
> I am experimenting with the new class mne.compute_source_morph() which was just added to the mne-python master. My goal is to morph volume source time courses to fsaverage and to create a list containing the vertices which belong to the different volume labels.
>
> I have stc_from and src_from both with 11359 vertices. I morphed stc_from to fsaverage using mne.compute_source_morph(). The resulting stc_fsaverage has in total 23568 vertices.
>
> I would like to separate these 23568 vertices into groups based on freesurfer volume labels. The names of the volume labels I can get using volume_labels = mne.get_volume_labels_from_aseg('path/to/fsaverage/mri/aseg.mgz').
>
> Now I need to find out which vertices belong to which label, which is where the problem lies.
>
> Using srcs = mne.setup_volume_source_space(...,volume_labels=volume_labels) I get a list of one volume source space per label. For the ith label in volume_labels, I can get the source space with src_label = srcs[i]. src_label[0]["vertno"] contains a list of all vertices belonging to that label.
>
> However, I do not know how I can get the correct src_fsaverage which has the same 23536 vertices as stc_fsaverage. For example, using the argument pos=5 in mne.setup_volume_source_space() the resulting source space has 14629 vertices which is obviously wrong since we need 23536 vertices. I could try and adjust pos in such a way that the resulting source space has 23536 vertices but even then I could not be sure that these vertices are actually the same ones as in stc_fsaverage.
>
> So how can I get the correct src_fsaverage which corresponds to the morphed stc_fsaverage and how do I know which of these vertices belong to which label?
>
> I created some sample code which you can find here.
>
> Kind regards,
>
> Christian Kiefer
>
>
>
> ------------------------------------------------------------------------------------------------
> ------------------------------------------------------------------------------------------------
> Forschungszentrum Juelich GmbH
> 52425 Juelich
> Sitz der Gesellschaft: Juelich
> Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
> Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
> Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender),
> Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
> Prof. Dr. Sebastian M. Schmidt
> ------------------------------------------------------------------------------------------------
> ------------------------------------------------------------------------------------------------
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>
>
> The information in this e-mail is intended only for the person to whom it is
> addressed. If you believe this e-mail was sent to you in error and the e-mail
> contains patient information, please contact the Partners Compliance HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in error
> but does not contain patient information, please contact the sender and properly
> dispose of the e-mail.



More information about the Mne_analysis mailing list