Diff for "AnalyzingData/MNE_MRI_processing" - Meg Wiki
location: Diff for "AnalyzingData/MNE_MRI_processing"
Differences between revisions 3 and 11 (spanning 8 versions)
Revision 3 as of 2010-06-09 14:03:20
Size: 1339
Editor: YaaraErez
Comment:
Revision 11 as of 2010-06-09 15:25:28
Size: 1488
Editor: YaaraErez
Comment:
Deletions are marked like this. Additions are marked like this.
Line 9: Line 9:
Then run the following scripts.
Line 21: Line 22:
        # creates surfaces necessary for BEM head models
Line 22: Line 24:

 rm $SUBJECTS_DIR/$SUBJECT/bem/inner_skull.surf
 rm $SUBJECTS_DIR/$SUBJECT/bem/outer_skull.surf
 rm $SUBJECTS_DIR/$SUBJECT/bem/outer_skin.surf
 rm $SUBJECTS_DIR/$SUBJECT/bem/brain_surface.surf
Line 34: Line 30:
        # creates fiff-files for MNE describing MRI data
Line 36: Line 33:
        # create a source space from the cortical surface created in Freesurfer
Line 37: Line 35:

 mri_convert -ot cor $SUBJECTS_DIR/$SUBJECT/mri/T1.mgz $SUBJECTS_DIR/$SUBJECT/mri/T1/

 mkheadsurf -subjid $SUBJECT
Line 44: Line 38:

You should now realign the MRI and MEG coordinate systems, otherwise the following analyses (forward solution, inverse operator etc.) won't make sense. The procedure is described in the MNE manual, e.g. chapter 12.11. (sample data set).

Head Model and Source Space Creation in MNE

Make sure you've typed

  • mne_setup_2.6.0

and

  • setenv SUBJECTS_DIR </myMRIdirectory/>

in your Linux command window.

Then run the following scripts.

SUBJECTS_DIR='</myMRIdirectory/>'


for SUBJECT in Subject1 Subject2Subject3  # use your subject names here
do 

        cd ${SUBJECTS_DIR}

        # creates surfaces necessary for BEM head models
        mne_watershed_bem --overwrite --subject $SUBJECT

        ln -s $SUBJECTS_DIR/$SUBJECT/bem/watershed/$SUBJECT'_inner_skull_surface' $SUBJECTS_DIR/$SUBJECT/bem/inner_skull.surf
        ln -s $SUBJECTS_DIR/$SUBJECT/bem/watershed/$SUBJECT'_outer_skull_surface' $SUBJECTS_DIR/$SUBJECT/bem/outer_skull.surf
        ln -s $SUBJECTS_DIR/$SUBJECT/bem/watershed/$SUBJECT'_outer_skin_surface'  $SUBJECTS_DIR/$SUBJECT/bem/outer_skin.surf
        ln -s $SUBJECTS_DIR/$SUBJECT/bem/watershed/$SUBJECT'_brain_surface'       $SUBJECTS_DIR/$SUBJECT/bem/brain_surface.surf

        # creates fiff-files for MNE describing MRI data
        mne_setup_mri --overwrite --subject $SUBJECT

        # create a source space from the cortical surface created in Freesurfer
        mne_setup_source_space --spacing 5 --overwrite --subject $SUBJECT

done

You should now realign the MRI and MEG coordinate systems, otherwise the following analyses (forward solution, inverse operator etc.) won't make sense. The procedure is described in the MNE manual, e.g. chapter 12.11. (sample data set).

CbuMeg: AnalyzingData/MNE_MRI_processing (last edited 2024-04-10 14:27:41 by OlafHauk)