2432
Comment:
|
11592
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
## page was renamed from brainsuite = Estimation of brain's tissues anisortopy using Brainsuite Diffusion Pipline = Describe brainsuite here : here we will describe the process of the brain tissues anisotrpy estimation and the different functions that brainstorm offers. |
'''[TUTORIAL UNDER CONSTRUCTION: NOT READY FOR PUBLIC USE]''' |
Line 5: | Line 3: |
'''[TUTORIAL UNDER REVISION/CORRECTION: NOT READY FOR PUBLIC USE]''' | ---- |
Line 7: | Line 5: |
= FEM tensors estimation with BrainSuite = | |
Line 9: | Line 8: |
This tutorial explains how to use Brainsuite to estimate the anisotropy of the brain tissues. | In this tutorial, we describe the estimation of realistic conductivity tensors of living brain tissues using the [[http://brainsuite.org/|BrainSuite software]]. These results are used in FEM forward modeling, as described in the tutorials: [[https://neuroimage.usc.edu/brainstorm/Tutorials/Duneuro#DUNEuro_options:_Advanced|FEM with DUNEuro]] and [[https://neuroimage.usc.edu/brainstorm/Tutorials/FemMedianNerve#FEM_tensors|FEM median nerve example]]. |
Line 11: | Line 10: |
refer to this page | The realistic tensors are estimated from the Diffusion-Weighted Images (DWI): Brainstorm calls the BrainSuite software to compute the diffusion tensors on each brain MRI voxel (DTI), then Effective Medium Approach (EMA) is applied to estimate the conductivity tensors for each element of a tetrahedral FEM mesh. This is particularly interesting for the modeling the anisotropy of the white matter. |
Line 13: | Line 12: |
[[https://neuroimage.usc.edu/brainstorm/Tutorials/SegBrainSuite?highlight=(anand)|https://neuroimage.usc.edu/brainstorm/Tutorials/SegBrainSuite?highlight=%28anand%29]] --(model using the '''finite element method''' ('''FEM'''). The FEM methods use the realistic volume mesh of the head generated from the segmentation of the MRI. The FEM models provides more accurate results than the spherical forward models, and more realistic geometry and tissue propriety than the BEM methods.)-- --(The scope of this page is limited to a '''basic example''' (head model with 3 layers), more advanced options for head model generation and forward model options are discussed in the tutorial about FEM mesh generation. We assume that you have already followed the introduction tutorials (or at least the head modeling tutorial), we will not discuss the general principles of forward modeling here.)-- |
BrainSuite is also used for other purposes in Brainstorm, particularly the T1 MRI segmentation, as documented in this tutorial: [[Tutorials/SegBrainSuite|MRI segmentation: BrainSuite]]. |
Line 21: | Line 16: |
== Installation == 1. Download the latest version of BrainSuite from http://www.brainsuite.org/download. |
== Download and installation == ==== Requirements ==== * You have already followed all the introduction tutorials. * You have a working copy of Brainstorm installed on your computer. * For the DWI data, only the NIfTI files (.nii) are supported. ==== Install Brainsuite ==== 1. Download the latest version of BrainSuite from http://forums.brainsuite.org/download/. |
Line 24: | Line 26: |
1. Note that you will be using Surface/Volume Registration (SVReg) to do the surface segmentation, so you need to install a compatible [[http://www.mathworks.com/products/compiler/mcr|MATLAB Compiler Runtime]](2015b for BrainSuite 18a). You may ignore any instructions about "Setting up BDP" if you are not planning on using BrainSuite for diffusion imaging. 1. Start BrainSuite (if it is not already open following installation). |
|
Line 27: | Line 27: |
== Requirement == | 1. You will be using BrainSuite Diffusion Pipeline (BDP), so you need to install a compatible [[https://www.mathworks.com/products/compiler/matlab-runtime.html|MATLAB Runtime]] (2019b for BrainSuite 21a). |
Line 29: | Line 29: |
1. In Brainstorm, menu File > Edit preferences > Enter the BrainSuite installation folder:<<BR>><<BR>> {{attachment:brainsuiteInstall.gif}} | |
Line 30: | Line 31: |
== Import data == | ==== Download the dataset ==== * Download the files: [[http://brainsuite.org/WebTutorialData/BrainSuiteTutorialSVReg_Sept16.zip|MRI T1w]] and [[http://brainsuite.org/WebTutorialData/DWI_Feb15.zip|MRI DWI]] (from the [[http://brainsuite.org/tutorials/dtiexercise/|BrainSuite diffusion tutorial]]). |
Line 32: | Line 34: |
== BDP == | * Unzip it outside of any of the Brainstorm folders (program folder or database folder). * Start Brainstorm (Matlab scripts or stand-alone version) * Select the menu File > Create new protocol. Name it "'''TutorialTensors'''" and select: * No, use individual anatomy * No, use one channel file per condition |
Line 34: | Line 40: |
== From diffusion tensor to conductivity tensor == | == Import the anatomy == === T1 MRI === * Switch to the "anatomical data" view, the left button in the toolbar above the database explorer. * Right-click on the TutorialFem folder > New subject > '''Subject01''' * Keep the default options you set for the protocol. |
Line 36: | Line 46: |
== FEM head model == | * Right-click on the subject node > '''Import MRI''': * Set the file format: '''All MRI files (subject space)''' |
Line 38: | Line 49: |
== Simulated tensors == | * Select the T1 file: BrainSuiteTutorialSVReg/'''2523412.nii.gz''' |
Line 40: | Line 51: |
* Click on the link "'''Click here to compute MNI normalization'''": option "'''maff8'''". This estimates an affine transformation to the [[https://neuroimage.usc.edu/brainstorm/CoordinateSystems#MNI_coordinates|MNI space]] and sets default positions for the anatomical fiducials. The NAS/LPA/RPA fiducials are needed for defining the Brainstorm [[CoordinateSystems|subject coordinate system]], in which the surfaces and FEM meshes are stored. <<BR>><<BR>> {{attachment:importT1.gif}} | |
Line 41: | Line 53: |
=== Diffusion imaging === This computes the This requires BrainSuite to be installed on your computer, with the bdp program available in the system path. * Right-click on Subject01''' '''> '''Convert DWI to DTI''' * Select the DWI file: DWI/'''2523412.dwi.nii.gz''' * The associated text files '''*.bvec''' (orientation of the gradient) and '''*.bval''' (value of the gradient) must be in the same folder, with the same file name. Theses files are created from for the DWI acquisition. If you don't have them, ask the person who programmed your DWI sequence and get the files that are specific to your use case. * The process can take up to 30min. At the end, a new file '''DTI-EIG''' appears in the database (DTI=diffusion tensors images, EIG=eigenvalue). This file contains 12 volumes, ie. 12 values for each voxel. From 1 to 9: components of the three eigenvectors; from 10 to 12: the values of their norm to the eigenvalue. <<BR>><<BR>> {{attachment:importDTI.gif}} == FEM mesh == The FEM approach requires a segmentation of the head volume in different tissues, represented as hexahedral or tetrahedral 3D meshes. The methods available within Brainstorm are listed in the tutorial [[https://neuroimage.usc.edu/brainstorm/Tutorials/FemMesh|FEM mesh generation]]. Here we illustrate only the use of '''Brain2mesh''': this is not the most accurate solution for MRI segmentation but it is probably the fastest solution to obtain a tetrahedral mesh of the head with 5 tissues (gray matter, white matter, CSF, skull, skin). For more accurate results, we recommend using SimNIBS, as illustrated in the tutorial [[https://neuroimage.usc.edu/brainstorm/Tutorials/FemMedianNerve#FEM_mesh_with_SimNIBS|FEM median nerve example]]. * Right-click on the T1 MRI > MRI segmentation > '''Generate FEM mesh''' > '''Brain2mesh'''. * After less than 15 minutes, you will obtain a new FEM mesh in the database. <<BR>><<BR>>{{attachment:femMesh.gif}} === Conductivity tensor generation from DTI === The Effective Medium Approach is applied to convert the diffusion tensors to the conductivity tensors. www.pnas.org/content/98/20/11697 ==== FEM mesh head model ==== {{attachment:Mri&femMeshView.JPG|Mri&femMeshView.JPG|width="260",height="300"}} {{attachment:femMeshView.JPG||width="280",height="300"}} Note that this mesh is obtained only from the T1, the use of the T2 is highly recommended if it's available, as recommended in the [[https://neuroimage.usc.edu/brainstorm/Tutorials/FemMesh|FEM mesh tutorial]]. ==== Computation of FEM mesh tensors ==== Once the FEM mesh and the DTI tensors are available in the Brainstorm database, the next step for the FEM tensors can be performed by the following: - Right-click on the FEM mesh - Compute FEM tensors {{attachment:menuGenerateFemTensors.png||width="250",height="280"}} Brainstorm checks the available tissues in the FEM head model and displays the following panel {{attachment:FEMConductivitiesIsoPanel.JPG||width="250",height="220"}} This panel lists the tissues available in the FEM head model and assigns a default value of the conductivity for each compartment. Users can change these values to their own if needed. DTI values can be used to generate conductivity tensors for the white matter (and in some cases for the grey matter). Please, note that the DWI can be used only for the brain tissues and not for the outers compartments (skull and skin) In this tutorial (and in most cases) we select the white matter. Select the WM anisotropy and keep all the other tissues as isotropic, then these additional options appear asking for the method to use. {{attachment:FEMConductivitiesAnisoPanel.JPG||width="250",height="300"}} The available methods are: - Effective Medium approach (EMA) - Effective Medium approach with volume constraints (EMA + VC) - Simulated or the artificial anisotropy Only the two first methods require the DTI. More information about these methods can be found on these references [ref1][ref2] and in our main paper [link] In this tutorial, we use the method "EMA + VC", where the final tensors are constrained to fits the volume of the equivalent isotropic tensor volume. ==== Visulation of FEM mesh tensors ==== Once the FEM tensors are successfully computed, they are stored in the FEM head node. By right-clicking on the FEM head, new menu items are added that gives the possibilities to display the FEM tensors either as ellipsoids or as vectors in the direction of the main eigenvector. {{attachment:menuDisplayTensors.jpg||width="250",height="300"}} The tensors can be displayed either on the FEM mesh or overlaid on the MRI. The following figures show an example of the obtained tensors displayed on the white matter. {{attachment:meshViewTensorsLines.JPG||width="350",height="300"}} {{attachment:meshViewTensorsTensorsTops.JPG||width="350",height="300"}} On the left, the tensors as a line on the direction of the main eigenvector. On the right, the tensors displayed as ellipsoids. The orientation of the tensor is color-coded as follows: red for right-left, green for anterior-posterior, and blue for superior-inferior. Note that the quality of the tensors depends on the DWI data and the number of acquisition direction. Users can also display the tensors on specific tissues, for example on the white matter (left figure) or overlay on the MRI (right figure). {{attachment:meshViewTensorsLinesWM2.JPG||width="350",height="300"}} {{attachment:tensorsOnMri.JPG||width="300",height="300"}} ==== Recommendation ==== In the case where the user wants to use generate isotropic tensors, then the DTI is not required. For that case, keep all the options to 'isotropic', the recommended display is the 'Ellipsoids', and the final shape will be a sphere (isotropic direction). In the case where more than one FEM head model is in the database, the highlighted one in the green color will be used. <<TAG(Advanced)>> == Simulated conductivity tensor == In the case where the DWI is not available, or in the case where the users desire to evaluate the effect of the conductivity change on the head model, the artificial conductivity can be used. Users can reach this option by following this tutorial and select the third method in this panel. {{attachment:artificialTensors.JPG||width="280",height="450"}} Two approaches are integrated within Brainstorm. Either Wang's constraint or the volume's constraint (Wolters). The common feature between these methods is the ratio between the transversal and longitudinal conductivity ratio. A common example is the skull anisotropy simulation, where the longitudinal conductivity can be higher than the transversal conductivity, the ratio can vary from 2 to 10 [ref]. In this tutorial, we keep all the tissue as isotropic, except the skull, we use a ratio of 0.1 and select the volume constraint. The following figures show the results of this example. "eigenvalues parallel (longitudinal) and perpendicular (transverse) to the fiber directions" for 1:10 anisotropy (transverse:longitudinal) {{attachment:skullAniso.JPG||width="300",height="250"}} {{attachment:skullAniso2.JPG||width="300",height="250"}} == Troubleshooting == To be completed soon and linked to BrainSuite website |
|
Line 43: | Line 150: |
===TODO=== Check the error in the simnibs mesh in X direction and overlay on mri check the error with the brain2mesh Correct the ratio from integer to float check the meaning of transversal/longitidunal in the code add an interactive way yo change the size of the tensor.. important correct the name of the simulated method, correct the EMC and remove the VC and change the coefficcient |
[TUTORIAL UNDER CONSTRUCTION: NOT READY FOR PUBLIC USE]
FEM tensors estimation with BrainSuite
Authors: Takfarinas Medani, Francois Tadel, Anand Joshi and Richard Leahy
In this tutorial, we describe the estimation of realistic conductivity tensors of living brain tissues using the BrainSuite software. These results are used in FEM forward modeling, as described in the tutorials: FEM with DUNEuro and FEM median nerve example.
The realistic tensors are estimated from the Diffusion-Weighted Images (DWI): Brainstorm calls the BrainSuite software to compute the diffusion tensors on each brain MRI voxel (DTI), then Effective Medium Approach (EMA) is applied to estimate the conductivity tensors for each element of a tetrahedral FEM mesh. This is particularly interesting for the modeling the anisotropy of the white matter.
BrainSuite is also used for other purposes in Brainstorm, particularly the T1 MRI segmentation, as documented in this tutorial: MRI segmentation: BrainSuite.
Contents
Download and installation
Requirements
- You have already followed all the introduction tutorials.
- You have a working copy of Brainstorm installed on your computer.
- For the DWI data, only the NIfTI files (.nii) are supported.
Install Brainsuite
Download the latest version of BrainSuite from http://forums.brainsuite.org/download/.
Install it on your computer by following the instructions in BrainSuite's quick start installation guide.
You will be using BrainSuite Diffusion Pipeline (BDP), so you need to install a compatible MATLAB Runtime (2019b for BrainSuite 21a).
In Brainstorm, menu File > Edit preferences > Enter the BrainSuite installation folder:
Download the dataset
Download the files: MRI T1w and MRI DWI (from the BrainSuite diffusion tutorial).
- Unzip it outside of any of the Brainstorm folders (program folder or database folder).
- Start Brainstorm (Matlab scripts or stand-alone version)
Select the menu File > Create new protocol. Name it "TutorialTensors" and select:
- No, use individual anatomy
- No, use one channel file per condition
Import the anatomy
T1 MRI
- Switch to the "anatomical data" view, the left button in the toolbar above the database explorer.
Right-click on the TutorialFem folder > New subject > Subject01
- Keep the default options you set for the protocol.
Right-click on the subject node > Import MRI:
Set the file format: All MRI files (subject space)
Select the T1 file: BrainSuiteTutorialSVReg/2523412.nii.gz
Click on the link "Click here to compute MNI normalization": option "maff8". This estimates an affine transformation to the MNI space and sets default positions for the anatomical fiducials. The NAS/LPA/RPA fiducials are needed for defining the Brainstorm subject coordinate system, in which the surfaces and FEM meshes are stored.
Diffusion imaging
This computes the This requires BrainSuite to be installed on your computer, with the bdp program available in the system path.
Right-click on Subject01 > Convert DWI to DTI
Select the DWI file: DWI/2523412.dwi.nii.gz
The associated text files *.bvec (orientation of the gradient) and *.bval (value of the gradient) must be in the same folder, with the same file name. Theses files are created from for the DWI acquisition. If you don't have them, ask the person who programmed your DWI sequence and get the files that are specific to your use case.
The process can take up to 30min. At the end, a new file DTI-EIG appears in the database (DTI=diffusion tensors images, EIG=eigenvalue). This file contains 12 volumes, ie. 12 values for each voxel. From 1 to 9: components of the three eigenvectors; from 10 to 12: the values of their norm to the eigenvalue.
FEM mesh
The FEM approach requires a segmentation of the head volume in different tissues, represented as hexahedral or tetrahedral 3D meshes. The methods available within Brainstorm are listed in the tutorial FEM mesh generation. Here we illustrate only the use of Brain2mesh: this is not the most accurate solution for MRI segmentation but it is probably the fastest solution to obtain a tetrahedral mesh of the head with 5 tissues (gray matter, white matter, CSF, skull, skin). For more accurate results, we recommend using SimNIBS, as illustrated in the tutorial FEM median nerve example.
Right-click on the T1 MRI > MRI segmentation > Generate FEM mesh > Brain2mesh.
After less than 15 minutes, you will obtain a new FEM mesh in the database.
Conductivity tensor generation from DTI
The Effective Medium Approach is applied to convert the diffusion tensors to the conductivity tensors.
www.pnas.org/content/98/20/11697
FEM mesh head model
Note that this mesh is obtained only from the T1, the use of the T2 is highly recommended if it's available, as recommended in the FEM mesh tutorial.
Computation of FEM mesh tensors
Once the FEM mesh and the DTI tensors are available in the Brainstorm database, the next step for the FEM tensors can be performed by the following:
- Right-click on the FEM mesh - Compute FEM tensors
Brainstorm checks the available tissues in the FEM head model and displays the following panel
This panel lists the tissues available in the FEM head model and assigns a default value of the conductivity for each compartment. Users can change these values to their own if needed.
DTI values can be used to generate conductivity tensors for the white matter (and in some cases for the grey matter). Please, note that the DWI can be used only for the brain tissues and not for the outers compartments (skull and skin)
In this tutorial (and in most cases) we select the white matter. Select the WM anisotropy and keep all the other tissues as isotropic, then these additional options appear asking for the method to use.
The available methods are:
- Effective Medium approach (EMA)
- Effective Medium approach with volume constraints (EMA + VC)
- Simulated or the artificial anisotropy
Only the two first methods require the DTI. More information about these methods can be found on these references [ref1][ref2] and in our main paper [link]
In this tutorial, we use the method "EMA + VC", where the final tensors are constrained to fits the volume of the equivalent isotropic tensor volume.
Visulation of FEM mesh tensors
Once the FEM tensors are successfully computed, they are stored in the FEM head node. By right-clicking on the FEM head, new menu items are added that gives the possibilities to display the FEM tensors either as ellipsoids or as vectors in the direction of the main eigenvector.
The tensors can be displayed either on the FEM mesh or overlaid on the MRI. The following figures show an example of the obtained tensors displayed on the white matter.
On the left, the tensors as a line on the direction of the main eigenvector. On the right, the tensors displayed as ellipsoids. The orientation of the tensor is color-coded as follows: red for right-left, green for anterior-posterior, and blue for superior-inferior.
Note that the quality of the tensors depends on the DWI data and the number of acquisition direction.
Users can also display the tensors on specific tissues, for example on the white matter (left figure) or overlay on the MRI (right figure).
Recommendation
In the case where the user wants to use generate isotropic tensors, then the DTI is not required. For that case, keep all the options to 'isotropic', the recommended display is the 'Ellipsoids', and the final shape will be a sphere (isotropic direction). In the case where more than one FEM head model is in the database, the highlighted one in the green color will be used.
Simulated conductivity tensor
In the case where the DWI is not available, or in the case where the users desire to evaluate the effect of the conductivity change on the head model, the artificial conductivity can be used.
Users can reach this option by following this tutorial and select the third method in this panel.
Two approaches are integrated within Brainstorm. Either Wang's constraint or the volume's constraint (Wolters). The common feature between these methods is the ratio between the transversal and longitudinal conductivity ratio.
A common example is the skull anisotropy simulation, where the longitudinal conductivity can be higher than the transversal conductivity, the ratio can vary from 2 to 10 [ref]. In this tutorial, we keep all the tissue as isotropic, except the skull, we use a ratio of 0.1 and select the volume constraint. The following figures show the results of this example.
"eigenvalues parallel (longitudinal) and perpendicular (transverse) to the fiber directions" for 1:10 anisotropy (transverse:longitudinal)
Troubleshooting
To be completed soon and linked to BrainSuite website
References
===TODO===
Check the error in the simnibs mesh in X direction and overlay on mri check the error with the brain2mesh Correct the ratio from integer to float check the meaning of transversal/longitidunal in the code add an interactive way yo change the size of the tensor.. important correct the name of the simulated method, correct the EMC and remove the VC and change the coefficcient