10777
Comment:
|
12915
|
Deletions are marked like this. | Additions are marked like this. |
Line 4: | Line 4: |
For this tutorial, we will use the 01.nii file from the CTF tutorials. If you do not already have those files on your computer, you can go to the [[http://neuroimage.usc.edu/brainstorm3_register/download.php|Download page]] and get the sample_ctf.zip file. After extracting the zip file, the MRI image we will be using can be found in the Anatomy folder. | For this tutorial, we will use the 01.nii file from the CTF tutorials. If you do not already have those files on your computer, you can go to the [[3_register/download.php|Download page]] and get the sample_ctf.zip file. After extracting the zip file, the MRI image we will be using can be found in the Anatomy folder. |
Line 8: | Line 8: |
To extract head and cortex meshes from a T1 MRI, you can also try to use: [[Tutorials/SegBrainVisa|BrainVISA]] or [[Tutorials/SegFreeSurfer|FreeSurfer]]. | To extract head and cortex meshes from a T1 MRI, you can also try to use: [[Tutorials/SegBrainVisa|BrainVisa]] or [[Tutorials/SegFreeSurfer|FreeSurfer]]. |
Line 11: | Line 11: |
1. Download the latest version of BrainSuite from http://www.loni.ucla.edu/Software/BrainSuite13. | 1. Download the latest version of BrainSuite from http://www.loni.ucla.edu/Software/BrainSuite13. |
Line 13: | Line 14: |
1. Install it on your computer by following the instructions in [[http://brainsuite.loni.ucla.edu/quickstart/installation/|BrainSuite's quick start installation guide]]. Note that you will be using Surface/Volume Registration (SVReg) to do the surface segmentation, so you will need to follow the instructions in the pink box on the top of the page to download a compatible MATLAB Compiler Runtime. You may ignore any instructions about "Setting up BDP" if you are not planning on using BrainSuite for diffusion imaging. | 1. Install it on your computer by following the instructions in [[http://brainsuite.loni.ucla.edu/quickstart/installation/|BrainSuite's quick start installation guide]]. Note that you will be using Surface/Volume Registration (SVReg) to do the surface segmentation, so you will need to follow the instructions in the pink box on the top of the page to download a compatible MATLAB Compiler Runtime. You may ignore any instructions about "Setting up BDP" if you are not planning on using BrainSuite for diffusion imaging. |
Line 15: | Line 17: |
1. Start BrainSuite (if it is not already open following installation). | 1. Start BrainSuite (if it is not already open following installation). |
Line 18: | Line 22: |
1. Open the T1-weighted scan in BrainSuite by going to File > Open Volume... and navigating to the CTF tutorial's 01.nii scan. | 1. Open the T1-weighted scan in BrainSuite by going to File > Open Volume... and navigating to the CTF tutorial's 01.nii scan. |
Line 20: | Line 25: |
1. Check that the scan is in the correct orientation. Some of the modules BrainSuite and SVReg run while processing a scan assume that the scan is in LPI coordinates. Practically, this means the screen should look like below when you open it. | {{attachment:openvolume.png}} 1. Check that the scan is in the correct orientation. Some of the modules BrainSuite and SVReg run while processing a scan assume that the scan is in LPI coordinates. Practically, this means the screen should look like below when you open it. |
Line 22: | Line 29: |
1. Open the Cortical Surface Extraction sequence dialog by clicking on Cortex > Cortical Surface Extraction Sequence | 1. Open the Cortical Surface Extraction sequence dialog by clicking on Cortex > Cortical Surface Extraction Sequence |
Line 31: | Line 39: |
1. Right-click on the subject > Import BrainSuite folder... | 1. Right-click on the subject > Import BrainSuite folder... |
Line 33: | Line 42: |
1. Select the top folder of your subject (i.e. the "Working Directory" from BrainSuite) | 1. Select the top folder of your subject (i.e. the "Working Directory" from BrainSuite) |
Line 37: | Line 47: |
1. Place the six fiducials. If you need help, refer to this page: [[http://neuroimage.usc.edu/brainstorm/CoordinateSystems|CoordinateSystems]] | 1. Place the six fiducials. If you need help, refer to this page: CoordinateSystems |
Line 40: | Line 51: |
1. The files that are imported from the BrainSuite folder are the following: * '''01.nii''' (original T1 MRI volume) |
1. The files that are imported from the BrainSuite folder are the following: |
Line 43: | Line 54: |
* '''01.scalp.dfs''' (head surface) | * '''01.nii''' (original T1 MRI volume) |
Line 45: | Line 57: |
* '''01.inner_skull.dfs''' (inner skull surface) | * '''01.scalp.dfs''' (head surface) |
Line 47: | Line 60: |
* '''01.outer_skull.dfs''' (outer skull surface) | * '''01.inner_skull.dfs''' (inner skull surface) |
Line 49: | Line 63: |
* '''01.left.pial.cortex.svreg.dfs''' (grey/csf interface, left hemisphere) | * '''01.outer_skull.dfs''' (outer skull surface) |
Line 51: | Line 66: |
* '''01.right.pial.cortex.svreg.dfs''' (grey/csf interface, right hemisphere) | * '''01.left.pial.cortex.svreg.dfs''' (grey/csf interface, left hemisphere) |
Line 53: | Line 69: |
* '''01.left.inner.cortex.svreg.dfs''' (white matter, left hemisphere) | * '''01.right.pial.cortex.svreg.dfs''' (grey/csf interface, right hemisphere) |
Line 55: | Line 72: |
* '''01.right.inner.cortex.svreg.dfs''' (white matter, right hemisphere) | * '''01.left.inner.cortex.svreg.dfs''' (white matter, left hemisphere) |
Line 57: | Line 75: |
* '''brainsuite_labeldescription.xml''' (not imported, but required for properly labelling scouts) | * '''01.right.inner.cortex.svreg.dfs''' (white matter, right hemisphere) * '''brainsuite_labeldescription.xml''' (not imported, but required for properly labelling scouts) |
Line 68: | Line 91: |
* '''MRI''': The T1 MRI of the subject | * '''MRI''': The T1 MRI of the subject |
Line 70: | Line 94: |
* '''01.scalp_1082V''': The head surface (downsampled to 1082 vertices) | * '''01.scalp_1082V''': The head surface (downsampled to 1082 vertices) |
Line 72: | Line 97: |
* '''01.outer_skull_642''': The skull surface (downsampled to 642 vertices) | * '''01.outer_skull_642''': The skull surface (downsampled to 642 vertices) |
Line 74: | Line 100: |
* '''01.inner_skull_642''': The inner skull surface (downsampled to 642 vertices) | * '''01.inner_skull_642''': The inner skull surface (downsampled to 642 vertices) |
Line 76: | Line 103: |
* '''cortex_270604V''': High-resolution cortical surface that was generated by BrainSuite. | * '''cortex_270604V''': High-resolution cortical surface that was generated by BrainSuite. |
Line 78: | Line 106: |
* '''cortex_15000V''': Low-resolution cortical surface, downsampled using the '''reducepatch''' function from Matlab (it keeps a meaningful subset of vertices from the original surface). This one appears in green, meaning that it is going to be used as the default by the processes that require a cortex surface.) | * '''cortex_15000V''': Low-resolution cortical surface, downsampled using the '''reducepatch''' function from Matlab (it keeps a meaningful subset of vertices from the original surface). This one appears in green, meaning that it is going to be used as the default by the processes that require a cortex surface.) |
Line 82: | Line 112: |
== Handling errors == | == Handling Errors == |
Line 84: | Line 114: |
It's hard to estimate what would be a good cortical reconstruction. What you are trying to spot at this level is mostly the obvious errors, like when the early stages of the brain extraction didn't perform well, just with a visual inspection. Play with the ''Smooth'' slider in the ''Surface ''tab. If it looks like a brain (two separate hemispheres) in both smooth and original views, it is probably ok. | It's hard to estimate what would be a good cortical reconstruction. What you are trying to spot at this level is mostly the obvious errors, like when the early stages of the brain extraction didn't perform well, just with a visual inspection. Play with the ''Smooth'' slider in the ''Surface'' tab. If it looks like a brain (two separate hemispheres) in both smooth and original views, it is probably ok. |
Line 86: | Line 116: |
Display the cortex surface on top of the MRI slices, to make sure that they are well aligned, that the surface follows well the folds, and that left and right were not flipped: right-click on the low-resolution cortex > MRI registration > Check MRI/surface registration... | Display the cortex surface on top of the MRI slices, to make sure they are well aligned, that the surface follows the folds well, and that the left and right were not flipped: right-click on the low-resolution cortex > MRI registration > Check MRI/surface registration... |
Line 88: | Line 118: |
{{attachment:checkAlign.gif}} | {{/brainstorm//brainstorm//brainstorm//brainstorm//brainstorm//brainstorm//brainstorm/Tutorials/SegBrainSuite%3Faction%3DAttachFile%26do%3Dget%26target%3Dalignmrisurface.png%3Faction%3Dcontent%3Faction%3Dcontent%3Faction%3Dcontent%3Faction%3Dcontent%3Faction%3Dcontent?action=content|Aligned MRI and Cortical Surface|width="100%"}} |
Line 91: | Line 121: |
It is critical to get a good cortex surface for source estimation. If the final cortex surface looks bad, it means that something didn't work well somewhere along the !FreeSurfer pipeline. You can refer to the following page to fix the problems manually:<<BR>>http://surfer.nmr.mgh.harvard.edu/fswiki/RecommendedReconstruction | It is critical to get a good cortex surface for source estimation. If the final cortex surface looks bad, it means that something didn't work well somewhere along the BrainSuite cortical surface extraction sequence. This tutorial is not meant to guide you though troubleshooting BrainSuite results, but most errors in surface generation and segmentation occur at the first step, skull-stripping. If you are ending up with surfaces that include non-brain regions, or are missing large chunks of cortex, this step is where the error occured. |
Line 93: | Line 123: |
If after following those instructions you still don't manage to get good surfaces, you can try to run the [[Tutorials/SegBrainVisa|automatic MRI segmentation from BrainVISA]]. | To fix skull-stripping issues, re-open the original T1 scan in BrainSuite. Open the Cortical Surface Extraction Sequence and check the box next to "Register and label brain" as you did above, but this time uncheck "Skull stripping". Next click on Cortex > Skull Stripping (BSE) to open the skull stripping dialog box, as this will let you step back and forth until you get a result that works. Common paramter settings that work are: * Diffusion Constant: between 20 and 30 (inclusive) * Edge Constant: 0.6, 0.75, 0.8 In general, increasing the edge constant will exclude more areas of the brain (decreasing will include more areas), while increasing the diffusion constant will include more areas. Set the parameters as you want, then click "Step >" until it says "finished skullstripping" above the progress bar. If the results look good, then click "Run All" on the Cortical Surface Extraction Sequence dialog box to run the rest of the segmentation process; if the results do not look good, click "< Back" on the Skull Stripping Tool dialog box until the progress bar returns to 0% and try a different set of parameters. More information can be found in [[http://brainsuite.loni.ucla.edu/processing/surfaceextraction/bse/tuning-the-bse-parameters/|BrainSuite's documentation]]. If after following those instructions you still don't manage to get good surfaces, you can try to run the automatic MRI segmentation from [[Tutorials/SegBrainVisa|BrainVISA]] or [[Tutorials/LabelFreeSurfer|FreeSurfer]]. |
Line 100: | Line 137: |
{{attachment:checkAlignMeg.gif||height="243",width="298"}} |
|
Line 104: | Line 139: |
* '''Number of vertices''': Number of points that are kept from the initial isosurface computed from the MRI. Increasing this number may increase the quality of the final surface. | * '''Number of vertices''': Number of points that are kept from the initial isosurface computed from the MRI. Increasing this number may increase the quality of the final surface. |
Line 106: | Line 142: |
* '''Erode factor''': Number of pixels to erode after the first binary threshold of the MRI. Increasing this number removes small components that are connected to the head. | * '''Erode factor''': Number of pixels to erode after the first binary threshold of the MRI. Increasing this number removes small components that are connected to the head. |
Line 108: | Line 145: |
* '''Fill holes factor''': Number of dimensions in which the holes should be identified and closed. Increasing this number removes more of the cavities of the head surface (0=no correction, 1=removes holes inside the surface, 3=closes all the features that make the surface non-convex) . {{attachment:generateHead.gif}} |
* '''Fill holes factor''': Number of dimensions in which the holes should be identified and closed. Increasing this number removes more of the cavities of the head surface (0=no correction, 1=removes holes inside the surface, 3=closes all the features that make the surface non-convex) |
Line 111: | Line 148: |
== Cortical parcellations == The default analysis pipeline in !FreeSurfer implements an automatic parcellation of the cortical surface in anatomical regions. The description of this feature is available here:<<BR>>http://freesurfer.net/fswiki/CorticalParcellation |
|
Line 114: | Line 149: |
Those atlases are imported in Brainstorm as scouts (cortical regions of interest), and saved directly in the surface files. To check where they are saved: right-click on the low-resolution cortex file > File > View .mat file. You can see that 4 structures "Atlas" are available, the first one that has Name='User scouts', and the second one Name='Destrieux'.<<BR>><<BR>> | You can also try to import manually the original BrainSuite head surface. Right click on the subject > Import surface > 01.scalp.dfs. If the surface has holes, you can right-click on the head surface > Fill holes. Note that BrainSuite's head and skull files have too many vertices for analysis, so you may have to decrease the surface resolution by right-clicking the head file > Less vertices.... The automated folder importation decreases the number of vertices to 1082. |
Line 116: | Line 151: |
{{attachment:viewMat.gif}} <<BR>><<BR>> | == Cortical Parcellations == Checking the box next to "Register and label brain" when running BrainSuite's Cortical Surface Extraction sequence causes BrainSuite to run a companion program called SVReg that implements an automatic parcellation of the cortical surface into anatomical regions. More information on this program can be found here:http://brainsuite.loni.ucla.edu/processing/svreg/ |
Line 118: | Line 154: |
To access them from the interface: | SVReg's labels are imported into BrainStorm as scouts (cortical regions of interest), and saved directly in the surface files. To check where they are saved: right-click on the low-resolution cortex file > File > View file contents. You can see that there are two "Atlas" structures available, one that has Name='User scouts' and the other with Name='SVReg'. |
Line 120: | Line 156: |
1. Double-click on the low-resolution cortex (works with the high-resolution too, it's just longer to display) 1. Go to the ''Scout'' tab, and click on the drop-down list to select another ''Atlas ''(ie group of scouts): * Destrieux atlas (*.aparc.a2009s.annot) * Desikan-Killiany atlas (*.aparc.annot) * Some Brodman areas (*.BA.annot) {{attachment:scoutTab.gif}} |
To access them from the interface: 1. Double-click on the low-resolution cortex (works with the original, high-resolution cortex too, it's just longer to display) 2. Go to the ''Scout'' tab, and click on the drop-down list to select "SVReg" |
Line 129: | Line 159: |
<<EmbedContent(http://neuroimage.usc.edu/brainstorm3_register/get_feedback.php?Tutorials/LabelFreeSurfer)>> | <<EmbedContent(http://neuroimage.usc.edu/brainstorm3_register/get_feedback.php?Tutorials/SegBrainSuite)>> |
T1-MRI Segmentation with BrainSuite
You can use the free BrainSuite and SVReg software package to extract segmented brain surfaces from a T1-weighted MRI image. Surface extraction and segmentation can either be automatic or manual--this tutorial will step you through the automated process (more information on manual tweaks can be found in BrainSuite's documentation).
For this tutorial, we will use the 01.nii file from the CTF tutorials. If you do not already have those files on your computer, you can go to the ?Download page and get the sample_ctf.zip file. After extracting the zip file, the MRI image we will be using can be found in the Anatomy folder.
Unlike BrainStorm, Freesurfer, and BrainVisa, BrainSuite does not use a database structure for storing subject information and scans. Instead, by default it stores its output in the same folder as the input MRI scan. Thus, it is often best to have each subject's structural scan in its own folder.
To extract head and cortex meshes from a T1 MRI, you can also try to use: BrainVisa or ?FreeSurfer.
Installation
Download the latest version of BrainSuite from http://www.loni.ucla.edu/Software/BrainSuite13.
Install it on your computer by following the instructions in BrainSuite's quick start installation guide. Note that you will be using Surface/Volume Registration (SVReg) to do the surface segmentation, so you will need to follow the instructions in the pink box on the top of the page to download a compatible MATLAB Compiler Runtime. You may ignore any instructions about "Setting up BDP" if you are not planning on using BrainSuite for diffusion imaging.
Start BrainSuite (if it is not already open following installation).
Running BrainSuite
Open the T1-weighted scan in BrainSuite by going to File > Open Volume... and navigating to the CTF tutorial's 01.nii scan.
Check that the scan is in the correct orientation. Some of the modules BrainSuite and SVReg run while processing a scan assume that the scan is in LPI coordinates. Practically, this means the screen should look like below when you open it.
Open the Cortical Surface Extraction sequence dialog by clicking on Cortex > Cortical Surface Extraction Sequence
- Check the box next to "Register and label brain".
- At the bottom of the dialog window, check that the filename prefix is "01" and that the working directory is the Anatomy folder of the CTF tutorial files (or, if you moved the scan to its own folder, that folder)
- Click "Run All". The full surface creation and segmentation process should take about 1 - 1.5 hours, depending on your machine.
Importing the results in Brainstorm
- Switch to the anatomy side of the database explorer
- Create a new subject, set the default anatomy option to "No, use individual anatomy"
Right-click on the subject > Import BrainSuite folder...
Select the top folder of your subject (i.e. the "Working Directory" from BrainSuite)
- Then you're prompted for the number of vertices you want in the final cortex surface. This will by extension define the number of dipoles to estimate during the source estimation process. By default we set this value to 15000 for the entire brain (it means 7500 for each hemisphere).
- The MRI Viewer appears, and a help window asks you to validate the orientation of the MRI and to define the 6 fiducial points. If something doesn't look right at this step, for instance if the MRI is not presented with a correct orientation, you should stop this automatic import process and follow the manual instructions in the basic tutorial pages.
Place the six fiducials. If you need help, refer to this page: CoordinateSystems
- Click on Save to keep your modifications, and the automatic import will go on.
The files that are imported from the BrainSuite folder are the following:
01.nii (original T1 MRI volume)
01.scalp.dfs (head surface)
01.inner_skull.dfs (inner skull surface)
01.outer_skull.dfs (outer skull surface)
01.left.pial.cortex.svreg.dfs (grey/csf interface, left hemisphere)
01.right.pial.cortex.svreg.dfs (grey/csf interface, right hemisphere)
01.left.inner.cortex.svreg.dfs (white matter, left hemisphere)
01.right.inner.cortex.svreg.dfs (white matter, right hemisphere)
brainsuite_labeldescription.xml (not imported, but required for properly labelling scouts)
- The successive steps that are performed automatically by Brainstorm:
- Import all the surfaces (head, skull, left/right, white/pial)
- Read the anatomical label information from pial and white matter surfaces
- Downsample each hemisphere to the number specified in the options (by default 7500, half of the total default number 15000)
- Merge left and right hemipsheres for the two cortical surface types: white matter and cortex envelope
- Downsample the head and skull surfaces
- Delete all the uncessary surfaces
- The files you can see in the database explorer at the end:
MRI: The T1 MRI of the subject
01.scalp_1082V: The head surface (downsampled to 1082 vertices)
01.outer_skull_642: The skull surface (downsampled to 642 vertices)
01.inner_skull_642: The inner skull surface (downsampled to 642 vertices)
cortex_270604V: High-resolution cortical surface that was generated by BrainSuite.
cortex_15000V: Low-resolution cortical surface, downsampled using the reducepatch function from Matlab (it keeps a meaningful subset of vertices from the original surface). This one appears in green, meaning that it is going to be used as the default by the processes that require a cortex surface.)
- A figure is automatically shown at the end of the process, to check visually that the low-resolution cortex and head surfaces were properly imported. If it doesn't look like the following picture, do not go any further in your source analysis, fix the anatomy first.
Handling Errors
How to check the quality of the result
It's hard to estimate what would be a good cortical reconstruction. What you are trying to spot at this level is mostly the obvious errors, like when the early stages of the brain extraction didn't perform well, just with a visual inspection. Play with the Smooth slider in the Surface tab. If it looks like a brain (two separate hemispheres) in both smooth and original views, it is probably ok.
Display the cortex surface on top of the MRI slices, to make sure they are well aligned, that the surface follows the folds well, and that the left and right were not flipped: right-click on the low-resolution cortex > MRI registration > Check MRI/surface registration...
The cortex looks bad
It is critical to get a good cortex surface for source estimation. If the final cortex surface looks bad, it means that something didn't work well somewhere along the BrainSuite cortical surface extraction sequence. This tutorial is not meant to guide you though troubleshooting BrainSuite results, but most errors in surface generation and segmentation occur at the first step, skull-stripping. If you are ending up with surfaces that include non-brain regions, or are missing large chunks of cortex, this step is where the error occured.
To fix skull-stripping issues, re-open the original T1 scan in BrainSuite. Open the Cortical Surface Extraction Sequence and check the box next to "Register and label brain" as you did above, but this time uncheck "Skull stripping". Next click on Cortex > Skull Stripping (BSE) to open the skull stripping dialog box, as this will let you step back and forth until you get a result that works. Common paramter settings that work are:
- Diffusion Constant: between 20 and 30 (inclusive)
- Edge Constant: 0.6, 0.75, 0.8
In general, increasing the edge constant will exclude more areas of the brain (decreasing will include more areas), while increasing the diffusion constant will include more areas. Set the parameters as you want, then click "Step >" until it says "finished skullstripping" above the progress bar. If the results look good, then click "Run All" on the Cortical Surface Extraction Sequence dialog box to run the rest of the segmentation process; if the results do not look good, click "< Back" on the Skull Stripping Tool dialog box until the progress bar returns to 0% and try a different set of parameters. More information can be found in BrainSuite's documentation.
If after following those instructions you still don't manage to get good surfaces, you can try to run the automatic MRI segmentation from BrainVISA or FreeSurfer.
The head surface looks bad
It is not mandatory to have a perfect head surface to use any of the Brainstorm features: you don't necessarily have to recognize the face (for the anonymity of the figures, it can be even better if you don't).
The head surface is important mostly for the alignment of the MEG sensors and the MRI. If you digitized the head shape with a Polhemus device, you can align automatically the head surface (hence the MRI) with the MEG sensors (in the same referential as the Polhemus points). The quality of this automatic registrations depends on the quality of both surfaces: the Polhemus head shape (green points) and the head surface from the MRI (grey surface). If you placed lots of points on the nose but your head surface doesn't have a nose, those points are not going to help. Except for that, a nice head shape is mainly useful for producing nicer figures.
If the default head surface looks bad, you can try generating another one: right-click on the subject folder > Generate head surface. The options are:
Number of vertices: Number of points that are kept from the initial isosurface computed from the MRI. Increasing this number may increase the quality of the final surface.
Erode factor: Number of pixels to erode after the first binary threshold of the MRI. Increasing this number removes small components that are connected to the head.
Fill holes factor: Number of dimensions in which the holes should be identified and closed. Increasing this number removes more of the cavities of the head surface (0=no correction, 1=removes holes inside the surface, 3=closes all the features that make the surface non-convex)
You can also try to import manually the original BrainSuite head surface. Right click on the subject > Import surface > 01.scalp.dfs. If the surface has holes, you can right-click on the head surface > Fill holes. Note that BrainSuite's head and skull files have too many vertices for analysis, so you may have to decrease the surface resolution by right-clicking the head file > Less vertices.... The automated folder importation decreases the number of vertices to 1082.
Cortical Parcellations
Checking the box next to "Register and label brain" when running BrainSuite's Cortical Surface Extraction sequence causes BrainSuite to run a companion program called SVReg that implements an automatic parcellation of the cortical surface into anatomical regions. More information on this program can be found here:http://brainsuite.loni.ucla.edu/processing/svreg/
SVReg's labels are imported into BrainStorm as scouts (cortical regions of interest), and saved directly in the surface files. To check where they are saved: right-click on the low-resolution cortex file > File > View file contents. You can see that there are two "Atlas" structures available, one that has Name='User scouts' and the other with Name='SVReg'.
To access them from the interface: 1. Double-click on the low-resolution cortex (works with the original, high-resolution cortex too, it's just longer to display) 2. Go to the Scout tab, and click on the drop-down list to select "SVReg"
Feedback