= Using BrainVISA = It is not the purpose of Brainstorm tutorials to teach you how to use BrainVISA. But many Brainstorm users are lost when it gets to the segmentation of the MRI. So here is a short introduction to the BrainVISA T1 MRI processing pipeline. To extract head and cortex meshes from a T1 MRI, you can also try to use: [[http://www.loni.ucla.edu/Software/BrainSuite|BrainSuite]] or [[Tutorials/LabelFreeSurfer|FreeSurfer]]. We are going to illustrate the use of BrainVISA with the MRI from the CTF tutorials. You should already have those files on your computer, if you followed the basic tutorials. If it is not the case, go to the [[http://neuroimage.usc.edu/brainstorm3_register/download.php|Download page]], and get the file sample_ctf.zip. This tutorial was written for BrainVISA 4.3. To get started, or for additional information, you can also read the [[http://brainvisa.info/doc/axon/bv_training/en/html/index.html|BrainVISA tutorial pages]]. == Installation == * Download the latest version of BrainVISA from http://brainvisa.info * Install it on your computer by following the instructions on the [[http://brainvisa.info/download.html#installation|download page]]. * Start BrainVISA * You have to create a database for storing your files: this will be either asked at startup, or you'll have to select the menu BrainVISA > Preferences: <
><
> {{attachment:database.gif}} <
><
> * Click on Add, and create a directory with is __not__ in any Brainstorm directory. For example: * '''Windows''': My Documents\brainvisa_db\ * '''Linux''': /home/username/brainvisa_db/ * '''MacOS''': Documents/brainvisa_db/ * Click on Ok. * Your are ready to import and process your MRI. == Running BrainVISA == ==== Start Morphologist ==== The T1 MRI processing pipeline in BrainVISA is now called Morphologist. Double-click on the icon "Morphologist 2012" to get started. {{attachment:morphologist.gif}} The Morphologist window shows on the left the list of analysis steps that are part of this T1 MRI processing pipeline. They can be selected or unselected independently. When you click on a step, it shows all the possible options and input and output files on the right. {{attachment:morphologist2.gif|morphologist.gif}} ==== Select the MRI file ==== The only options than we need to set (hopefully), are the global ones, that you get when you click on the top element in the list (Morphologist 2012). Let's start with the selection of the MRI file: * On the "mri" line, click on the button that says "Browse the filesystem (load mode)", the last one on the line, that represents a folder. The other button, the green one, is for selecting a subject that is already in the database. * Select the tutorial file sample_ctf/Anatomy/'''01.nii''' <
><
> {{attachment:selectFile.gif|morphologist.gif}} * On the "mri_corrected" line, click on the red button that says "Browse the database (save mode)", the second to last one. Enter the following options:<
><
> {{attachment:output.gif}} <
><
> * File format: NIfTI-1 image * Protocol: segmentation * Subject: ctf01 * Click on ok. ==== Select the fiducial points ==== * '''Anterior commissure''': * Click on the "Anatomist" button (at the end of the line). This will start anatomist. * In Anatomist window, look for a view that gives you an axial view * Then place the cross on the anterior commissure (see page: CoordinateSystems) * Go back to the "T1 Pipeline" window again, and click again on "Anatomist" button for the anterior commissure. This should write the current position of the cursor in the "Anterior commissure" field. <
><
> {{attachment:anatomist.gif|output.gif}} <
><
> * '''Posterior commissure''': Same operation * '''Interhemispheric point''': Same operation, pick it on the top part of the brain. * '''Left hemisphere point''': Same, but be VERY carful with this. By default, contrary to Brainstorm, the view in Anatomist is in radiological convention. Which means that the left point you have to pick is shown '''on the right part on the axial slice'''. * If for some reason the MRI you are importing has the left and right flipped, you should click on the left part of the axial slice, and then set the option "allow_flip_initial_MRI" to "true" in the "AC/PC step". ==== Other options ==== Keep all the other options to their default values. Just uncheck the steps: '''Cortical Fold Graph''' and '''Sulci recognition'''. We don't need those two, and they take a lot of time. Click on Run and pray hard. == What if it crashes? == Your first try might be a failure. Don't give up, it might be easy to fix. If the process that crashed has two option (like all the steps from "T1 Bias correction" to "Split brain mask"): * Select the other option (Example: "VIP bias correction" instead of "1 - T1 Bias correction") * Uncheck all the processes that were successful (indicated with a green arrow), so that the Pipeline do not have to start from the beginning again. * Click on Run again. If it still crashes: * Try to change other options (like the selections in the previous steps) * Post your anger about this absolute waste of time on BrainVISA forum * Try another software. == Import the MRI and surfaces in Brainstorm == If you see at some point green check marks in front of all the processes: you are done. Now you need to import the files BrainVISA produced in !BrainStorm. Here is are the path on my installation of BrainVISA, it can be slightly different on your computer: <
>'''brainvisa_db\Segmentation\01\t1mri\default_acquisition\default_analysis\''' * __MRI__: \'''nobias_01.nii.gz'''<
> * I'd recommend to use the BrainVISA nobias volume instead of your original MRI file, because it usually looks nicer, and you are sure that it will be correctly oriented in Brainstorm. * If Brainstorm still doesn't have a .nii.gz format in Import MRI window, you'll have to gunzip this file first. * __Scalp__: \segmentation\mesh\'''01_head.mesh''' * __Left hemisphere__: \segmentation\mesh\'''01_Lhemi.mesh''' * __Right hemisphere__: \segmentation\mesh\'''01_Rhemi.mesh''' Never forget to check the final surfaces in Brainstorm, they still might be completely wrong. Here is what your supposed to get after importing the MRI and the surfaces (see tutorial #2). . {{attachment:result.gif}} Have fun...