198
Comment:
|
11750
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
## page was renamed from Tutorials/DuneuroMunsterData '''[TUTORIAL UNDER CONSTRUCTION]''' |
|
Line 5: | Line 8: |
We may keep the previous tutorial as a basic and this tutorial is an advanced version. | We may keep the previous tutorial as a basic and this tutorial is an advanced and complete version. = FEM tutorial: MEG/EEG Median nerve stimulation = ''Authors: Takfarinas Medani, Juan Garcia-Prieto, Wayne Mead.'' This tutorial introduces the FEM modeling in the Brainstorm environment. Note that the operations used here are not detailed, the goal of this tutorial is not to introduce Brainstorm to new users. For in-depth explanations of the interface and theoretical foundations, please refer to the [[http://neuroimage.usc.edu/brainstorm/Tutorials#Get_started|introduction tutorials]]. <<TableOfContents(3,2)>> == License == This tutorial dataset (MEG/EEG and MRI data) remains proprietary of xxxxyyyy. Its use and transfer outside the Brainstorm tutorial, e.g. for research purposes, is xxxx yyy. '''''__Download the dataset__''''' * Get the open access reference data set from''' '''here''' : '''[[https://urldefense.com/v3/__https://zenodo.org/record/3888381__;!!LIr3w8kk_Xxm!6KhbFOL7K9swpYSnYrC6ZOtj6uGhoULw9qgkmW75irYricc0ITrt_Do95QkqIQ$|https://zenodo.org/record/3888381]] * The following data are used in the advanced tutorial [[https://neuroimage.usc.edu/brainstorm/Tutorials/DuneuroMunsterData|FEM head modeling]] * Requirement Brainstom SimNibs BrainSuite Iso2mesh == Description of the experiment (todo) : only one file == The experiment consists of two stimulation protocols being conducted during a single scanning session in a MEG laboratory with an Elekta Triux (Megin, Finland) scanner. The subject is a a right-handed 46 years old male. The two stimulation protocols consist of a unilateral median nerve stimulation and an eyes-close resting-state recording. Median nerve stimulation: * The stimulation signal was a square-wave pulse with 2Hz frequency and a duration of 0.2ms. * An ISI (inter-stimulus interval) of 500ms with a variation of ±20ms in order to be able to average out time-locked noise to the stimulation, while remaining unnoticeable by the subject. * The stimulation was performed on both hands/wrists, independently, with a Digitimer DS7A stimulator. An electrode was placed on each current values were tuned to match the motor threshold of the subject on the stimulated hand, with a result of 10~12mA aproximately. * Initially, the left wrist was stimulated for aproximately 2 minutes (this corresponds with the file containing L1 in its name). After a 2-minute rest, while sitting in the MSR and with his head in the helmet, the stimulation was repeated (L2 file). After this stimulation the subject was asked to have a 10 minutes rest, during which he was allowed to sit calmly with his head out of the helmet, although remaining hooked to the scanner at all times. Finally, two subsequents runs of right wrist stimulation (R1 and R2 files) with an intermediate 2-minute rest were performed. * Recordings were performed with a 1kHz sampling rate. Continuous HPI was disabled during these recordings. And high-pass filters were set to DC for MEG channels and 0.03Hz for EEG channels. * All files underwent a MaxFilter (version 2.3.13) tsss post-processing. Resting-State protocol: * The subject was recorded for aproximately 80 minutes. Due to a 2GB maximum-size limitation for FIFF files, this translates into the recording being saved in files 'epi1' to 'epi4'. * The subject had his eyes closed. * Recordings were performed with a 1kHz sampling rate. Continuos HPI was enabled. High-pass filterse were set to DC for MEG channels and 0.03Hz for EEG channels. * All files underwent a MaxFilter (version 2.3.13) tsss post-processing, with motion compensation active. == Download and installation == * Requirements: You have already followed all the introduction tutorials and you have a working copy of Brainstorm installed on your computer. * Go to the [[http://neuroimage.usc.edu/bst/download.php|Download]] page of this website, and download the file: '''sample_tutoFEMadvance.zip''' * Unzip it in a folder that is not in any of the Brainstorm folders (program or database folder) * Start Brainstorm (Matlab scripts or stand-alone version) * Select the menu File > Create new protocol. Name it "'''tutoFEMadvanced'''" and select the options: * "'''No, use individual anatomy'''", * "'''No, use one channel file per condition'''". == Import the MRIs == * Switch to the "anatomical data" view, the left button in the toolbar above the database explorer. * Right-click on the tutoFEMadvanced folder > New subject > '''Subject01''' * Leave the default options you set for the protocol * Right-click on the subject node > Import anatomy mri: Navigate to the selected folder and then select the T1 mri, with the name "T1.nii" * Set the 6 required fiducial points (indicated in MRI coordinates). Fiducials points not always have to be located where we recommend in our [[https://neuroimage.usc.edu/brainstorm/Tutorials/ImportAnatomy#Fiducial_points|introductory]] and our [[https://neuroimage.usc.edu/brainstorm/CoordinateSystems?highlight=(auricular)|coordinate systems]] tutorials. Every subject is different and sometimes things get on the way, and it is not possible to follow canonical recommendations. That is fine! As long as there is a correct correspondence between fiducial points in the fif file and in the MRI, everything works fine. * * For the following subject you can use these values :<<BR>> . . | |- NAS: [120.9375, 213.75, 49.9995] . | |- LPA: [45, 110.625, 30.9997] . | |- RPA: [173.693, 113.9063, 55.7813] . | |- AC: [120.3123, 130.3868, 74.903] . | |- PC: [120.4354, 101.4424, 73.2598] . | |- IH: [119.5711, 109.7343, 132.1452] * Click on the link "'''Click here to compute MNI transformation'''" and keep the default values. * Load the the T2, by folowing the same process as previous, then select the T2 mri with the name "m46wap_t2.nii". Brainstorm will ask you to registed the T2 to the T1, select the SPM option (require to have SPM installed), then reslice the T2, select "Yes". This process will take few minutes. == Head model construction == === FEM head model === The first step require the generattin of the FEM head model, where the MRIs are segmented into the main tissues and then tesselated into hexahedral or tetraheral elements. The available methods within Brainstorm are listed in [[https://neuroimage.usc.edu/brainstorm/Tutorials/FemMesh|this page]]. In the following tutorial, the SimNibs method is used * Select both the T1 and the T2 MRIs, using the mouse and the "Shift" key * Right click on and then select the "Generate FEM mesh" * Select the SimNIbs method from the panel and keep the default options. In order to use the call SimNibs you need to have it installed in your computer, please follow the instruction as explained in [[https://neuroimage.usc.edu/brainstorm/Tutorials/FemMesh#SimNIBS|here]]. Keep all the option to their default values. Depending on your computer performance, this process can take 2 to 4 hours, so be patient. {{attachment:generateFEMmeshSimNibs||height="250",width="650"}} At the end of this computation, Brainstorm will populate the windows wit the following nodes * tissues: the segmentation output of the MRIs * FEM 72358V (simnibs, 5 layers) : the FEM mesh of the MRIs with 72353 vertices, generated with the method SimNibs and the model has 5 layers (wm, gm, csf, skull and scalp). * Head mask : the outer surface of the scalp (or the head) * cortex_fem : the outer surface mesh of the grey matter * cortex_280753V : the pial surface genertaed by spm/cat withn the SimNibs process * cortex_15002V : low version of the cortex_280753 At the end of the process, make sure that the file "cortex_15002V" is selected (downsampled pial surface, which will be used for the source estimation). If it is not, double-click on it to select it as the default cortex surface. === FEM tensors === The FEM has the ability to incorportae the anosotropic conductivity. Brainstom offers the known methods to estimae the tensors from the DWI data. For more detailled example please [[https://neuroimage.usc.edu/brainstorm/FemTensors|refere to this page.]] There is two main phasesto compute the tensors, the first is the computation of the DTI from the DWI. The second is the estimation of the conductivity tensors from the DTI on each of the FEM mesh elements. '''Phase one: ''' * Right-click on the '''Subject01 '''> "Convert DWI to DTI" * Select the DWI data from the folder, "dwi.nii", the associated files "dwi.bvec" and "dwi.bval" mus be in the same folder BrainStorm will call internally the Brainsuite Software to compute the the DTI. This process can take up to 20 minutes. At the end of this process a node will apear in the Brainstorm database explorer under the name "DTI-EIG", this is a volume data that contains the 12 values of the eigen values and eigen vectors at each voxel. '''Phase two:''' Once the DTI are computed, * Richt click on the FEM mesh and then '''"Compute FEM tensors"''' * From the panel select the options as shown in the following figure, then hit "Ok" This process can take up to 5min, depending on the resolution of the FEM mesh. Explanation of the options: Brainstorm recognise the tissue listed on the FEM had and asssign the default isotropic conductivies, as shown on the panel, users can change and use their own values. When the DWI data are computed, the conductivity tensors can be estimated on the white matter tissues using the Effective Medium Approach (EMA), Brinstorm offers two option, the EMA with a fixed factor k=0.736, or the EMA with the volume constraint (EMA+VC), please refer to this tutorial and the cited publication for further information. '''Visualisation of the FEM mesh and tensors''' Brainstorm include the possibilities to display the FEM head models and the tensors, users can also overlay the display with the MRI as well as with the differents surfaces. === BEM head model === We will generate also the BEM surfaces for this subject and we will follow the same step as expect in [[https://neuroimage.usc.edu/brainstorm/Tutorials/TutBem?highlight=(bem)#Brainstorm|this page]]. The obtained surfaces will be used later for the BEM computation. == Access the recordings == === Link the recordings === * Switch to the "functional data" view, the middle button in the toolbar above the database explorer. * Right-click on the subject folder > '''Review raw file''': * === Prepare the channel file === * === Refine the MRI registration === * * === Read the stimulation information === * == Pre-processing == === Evaluate the recordings === * === Frequency filters === * == Review the recordings == === MEG: Default montages === === MEG: Bad channels === * === EEG: Average reference === * == Artifacts cleaning with ICA == === Detect heartbeats and blinks === * === EEG: Heartbeats and eye movements === * * === MEG: Heartbeats and eye movements === * == Epoching and averaging == === Import the recordings === === Averaging === * == Source estimation == === Head model === * === Noise covariance matrix === * === Inverse model === * * * === Regions of interest === * Create two scouts S1 and S2 to represent the primary and secondary somatosensory cortex of the left hemisphere. * == Scripting == |
[TUTORIAL UNDER CONSTRUCTION]
Will be completed soon
In this tutorial we describe the full FEM process as described in the SPIE paper
We may keep the previous tutorial as a basic and this tutorial is an advanced and complete version.
FEM tutorial: MEG/EEG Median nerve stimulation
Authors: Takfarinas Medani, Juan Garcia-Prieto, Wayne Mead.
This tutorial introduces the FEM modeling in the Brainstorm environment.
Note that the operations used here are not detailed, the goal of this tutorial is not to introduce Brainstorm to new users. For in-depth explanations of the interface and theoretical foundations, please refer to the introduction tutorials.
Contents
License
This tutorial dataset (MEG/EEG and MRI data) remains proprietary of xxxxyyyy. Its use and transfer outside the Brainstorm tutorial, e.g. for research purposes, is xxxx yyy.
Download the dataset
Get the open access reference data set from here : https://zenodo.org/record/3888381
The following data are used in the advanced tutorial FEM head modeling
Requirement
Brainstom
SimNibs
BrainSuite
Iso2mesh
Description of the experiment (todo) : only one file
The experiment consists of two stimulation protocols being conducted during a single scanning session in a MEG laboratory with an Elekta Triux (Megin, Finland) scanner. The subject is a a right-handed 46 years old male. The two stimulation protocols consist of a unilateral median nerve stimulation and an eyes-close resting-state recording.
Median nerve stimulation:
- The stimulation signal was a square-wave pulse with 2Hz frequency and a duration of 0.2ms.
- An ISI (inter-stimulus interval) of 500ms with a variation of ±20ms in order to be able to average out time-locked noise to the stimulation, while remaining unnoticeable by the subject.
- The stimulation was performed on both hands/wrists, independently, with a Digitimer DS7A stimulator. An electrode was placed on each current values were tuned to match the motor threshold of the subject on the stimulated hand, with a result of 10~12mA aproximately.
- Initially, the left wrist was stimulated for aproximately 2 minutes (this corresponds with the file containing L1 in its name). After a 2-minute rest, while sitting in the MSR and with his head in the helmet, the stimulation was repeated (L2 file). After this stimulation the subject was asked to have a 10 minutes rest, during which he was allowed to sit calmly with his head out of the helmet, although remaining hooked to the scanner at all times. Finally, two subsequents runs of right wrist stimulation (R1 and R2 files) with an intermediate 2-minute rest were performed.
- Recordings were performed with a 1kHz sampling rate. Continuous HPI was disabled during these recordings. And high-pass filters were set to DC for MEG channels and 0.03Hz for EEG channels.
All files underwent a MaxFilter (version 2.3.13) tsss post-processing.
Resting-State protocol:
- The subject was recorded for aproximately 80 minutes. Due to a 2GB maximum-size limitation for FIFF files, this translates into the recording being saved in files 'epi1' to 'epi4'.
- The subject had his eyes closed.
- Recordings were performed with a 1kHz sampling rate. Continuos HPI was enabled. High-pass filterse were set to DC for MEG channels and 0.03Hz for EEG channels.
All files underwent a MaxFilter (version 2.3.13) tsss post-processing, with motion compensation active.
Download and installation
- Requirements: You have already followed all the introduction tutorials and you have a working copy of Brainstorm installed on your computer.
Go to the Download page of this website, and download the file: sample_tutoFEMadvance.zip
- Unzip it in a folder that is not in any of the Brainstorm folders (program or database folder)
- Start Brainstorm (Matlab scripts or stand-alone version)
Select the menu File > Create new protocol. Name it "tutoFEMadvanced" and select the options:
"No, use individual anatomy",
"No, use one channel file per condition".
Import the MRIs
- Switch to the "anatomical data" view, the left button in the toolbar above the database explorer.
Right-click on the tutoFEMadvanced folder > New subject > Subject01
- Leave the default options you set for the protocol
Right-click on the subject node > Import anatomy mri: Navigate to the selected folder and then select the T1 mri, with the name "T1.nii"
Set the 6 required fiducial points (indicated in MRI coordinates). Fiducials points not always have to be located where we recommend in our introductory and our coordinate systems tutorials. Every subject is different and sometimes things get on the way, and it is not possible to follow canonical recommendations. That is fine! As long as there is a correct correspondence between fiducial points in the fif file and in the MRI, everything works fine.
For the following subject you can use these values :
- | |- NAS: [120.9375, 213.75, 49.9995]
- | |- LPA: [45, 110.625, 30.9997]
- | |- RPA: [173.693, 113.9063, 55.7813]
- | |- AC: [120.3123, 130.3868, 74.903]
- | |- PC: [120.4354, 101.4424, 73.2598]
- | |- IH: [119.5711, 109.7343, 132.1452]
Click on the link "Click here to compute MNI transformation" and keep the default values.
- Load the the T2, by folowing the same process as previous, then select the T2 mri with the name "m46wap_t2.nii". Brainstorm will ask you to registed the T2 to the T1, select the SPM option (require to have SPM installed), then reslice the T2, select "Yes". This process will take few minutes.
Head model construction
FEM head model
The first step require the generattin of the FEM head model, where the MRIs are segmented into the main tissues and then tesselated into hexahedral or tetraheral elements. The available methods within Brainstorm are listed in this page.
In the following tutorial, the SimNibs method is used
- Select both the T1 and the T2 MRIs, using the mouse and the "Shift" key
- Right click on and then select the "Generate FEM mesh"
- Select the SimNIbs method from the panel and keep the default options.
In order to use the call SimNibs you need to have it installed in your computer, please follow the instruction as explained in here.
Keep all the option to their default values.
Depending on your computer performance, this process can take 2 to 4 hours, so be patient.
At the end of this computation, Brainstorm will populate the windows wit the following nodes
- tissues: the segmentation output of the MRIs
FEM 72358V (simnibs, 5 layers) : the FEM mesh of the MRIs with 72353 vertices, generated with the method SimNibs and the model has 5 layers (wm, gm, csf, skull and scalp).
- Head mask : the outer surface of the scalp (or the head)
- cortex_fem : the outer surface mesh of the grey matter
cortex_280753V : the pial surface genertaed by spm/cat withn the SimNibs process
- cortex_15002V : low version of the cortex_280753
At the end of the process, make sure that the file "cortex_15002V" is selected (downsampled pial surface, which will be used for the source estimation). If it is not, double-click on it to select it as the default cortex surface.
FEM tensors
The FEM has the ability to incorportae the anosotropic conductivity. Brainstom offers the known methods to estimae the tensors from the DWI data. For more detailled example please refere to this page.
There is two main phasesto compute the tensors, the first is the computation of the DTI from the DWI. The second is the estimation of the conductivity tensors from the DTI on each of the FEM mesh elements.
Phase one:
Right-click on the Subject01 > "Convert DWI to DTI"
- Select the DWI data from the folder, "dwi.nii", the associated files "dwi.bvec" and "dwi.bval" mus be in the same folder
BrainStorm will call internally the Brainsuite Software to compute the the DTI. This process can take up to 20 minutes.
At the end of this process a node will apear in the Brainstorm database explorer under the name "DTI-EIG", this is a volume data that contains the 12 values of the eigen values and eigen vectors at each voxel.
Phase two:
Once the DTI are computed,
Richt click on the FEM mesh and then "Compute FEM tensors"
- From the panel select the options as shown in the following figure, then hit "Ok"
This process can take up to 5min, depending on the resolution of the FEM mesh.
Explanation of the options:
Brainstorm recognise the tissue listed on the FEM had and asssign the default isotropic conductivies, as shown on the panel, users can change and use their own values.
When the DWI data are computed, the conductivity tensors can be estimated on the white matter tissues using the Effective Medium Approach (EMA), Brinstorm offers two option, the EMA with a fixed factor k=0.736, or the EMA with the volume constraint (EMA+VC), please refer to this tutorial and the cited publication for further information.
Visualisation of the FEM mesh and tensors
Brainstorm include the possibilities to display the FEM head models and the tensors, users can also overlay the display with the MRI as well as with the differents surfaces.
BEM head model
We will generate also the BEM surfaces for this subject and we will follow the same step as expect in this page. The obtained surfaces will be used later for the BEM computation.
Access the recordings
Link the recordings
- Switch to the "functional data" view, the middle button in the toolbar above the database explorer.
Right-click on the subject folder > Review raw file:
Prepare the channel file
Refine the MRI registration
Read the stimulation information
Pre-processing
Evaluate the recordings
Frequency filters
Review the recordings
MEG: Default montages
MEG: Bad channels
EEG: Average reference
Artifacts cleaning with ICA
Detect heartbeats and blinks
EEG: Heartbeats and eye movements
MEG: Heartbeats and eye movements
Epoching and averaging
Import the recordings
Averaging
Source estimation
Head model
Noise covariance matrix
Inverse model
Regions of interest
- Create two scouts S1 and S2 to represent the primary and secondary somatosensory cortex of the left hemisphere.