- MNE version: 1.1.0
- operating system: 4.19.0-16-amd64
Below code creates a volumetric source space that located under inner skull surface. I want to know how to find out all source belong to certain ROI, that is, to know the label of each source.
surface = os.path.join(subjects_dir, sub_code, 'bem', 'inner_skull.surf') src = mne.setup_volume_source_space(subject=sub_code, subjects_dir=subjects_dir, surface=surface）
<SourceSpaces: [<volume, shape=(29, 37, 30), n_used=10479>] MRI (surface RAS) coords, subject ‘someone’, ~72.0 MB>. So the coordinate of each source is in surface RAS coordination. It is an individual specific space.
I have tried with surface-based space, mne.read_labels_from_annot could be used to find the label and corrsponding vertices index. However, I could not find a way to use in volmatric source space.
I also tried to use label to create volumetric source space (as below) so that I could have the information of the roi and the corresponding source index:
fname_aseg_aparc = join(subjects_dir, sub_code, 'mri', 'aparc+aseg.mgz') label_names = mne.get_volume_labels_from_aseg( fname_aseg_aparc )#fname_aseg label_use =[label for label in label_names if label[0:3]=='ctx'] surface = os.path.join(subjects_dir, sub_code, 'bem', 'inner_skull.surf') src = mne.setup_volume_source_space( subject = sub_code , subjects_dir = subjects_dir, surface = surface, bem=None ,sphere=None, mri = fname_aseg_aparc, pos=5.0, #default volume_label= label_use, #default not specific roi but all brain )
The src created above is a list of (more than 20, depending on the labels you choose) volumetric source space.
The problem is it is too large ( more than 2G) , could not be saved and when I plot stc using this source space, error occrus “src should be a instance of Volmatic SourceSpaces not a list”. Besides, I am not sure whether the coordinate in aparc+aseg.mgz in in surface RAS coordination and whether it is individual specific.
I wonder does volumatic source space we get has to be converted to MNI space, and then we need to find a parcellation in MNI space to get label?
May I ask what is the suggested way to get the label of each source in volumetric space?
Thanks a lot for helping!