Wednesday 30 November 2011

Run multiple BrainVoyager instances on Mac OSX

On Mac OSX, it is not possible to run multiple BrainVoyager instances by click the dock icon. This can be done by writing two command lines in terminal as shown in Brainvoyager support website;
Depending on the previous method I wrote an applescript*, using this script you don't have to write any thing you will use mouse clicks only. You have to click that applescript file at every time you want run more Brainvoyager instances, It can be added to the dock. 

* This applescript will work with local HASP only!

Synchronizing E-prime with an MRI scanner

In the following pictures, you will see how we can synchronize E-prime with MRI scanner. So E-prime will start stimuli presentation using scanner pulse. you can download this E-prime file ( and modify it for your use.

Please leave your feedback if you like this tool or a suggestion if you think it needs to be improved!

Sunday 27 November 2011


This script helps automate mri_convert command in freesurfer for large set of data 


Easyfreesurfer is a simple script which was written to simplify and automate most freesurfer processes. It controls some commands such as; recon-all and mri_convert without writing any command in terminal, as user will only need to use mouse to select options and click buttons. This applescript works with both shell types bash and tcsh but it is suitable for Mac OS X only.
For download click here

For using bash script, which works on both Linux and MAC, user needs to copy this script to data directory and execute it from there. 

Bash script works on bash shell only where "chmod +x" command used to make it executable as following;
chmod +x easyfreesurfer_bash.command 
chmod +x

Please leave your feedback if you like this tool or a suggestion if you think it needs to be improved!

Related links

Tuesday 22 November 2011

Brainvoyager QX tips and tricks 2; Create a 3d shape by drawing a region of interest

In the following slides, I will present a simple method of creating a 3d mesh from a region of interest using draw with mouse tool.
First of all, open any *.vmr file, when you click on 3D volume tools, choose segmentation tab as shown in the following image. Tick enable for draw with mouse option (I selected 2D in-plane) because I drew a region of interest around corpus callosum. If you want to draw a multislice volume you can choose 3D (cube) but with care as you move from slide to another. To change draw tool color you should change (New) value in rage (225-240). I got orange color by change value to 226.
You can start drawing by selecting (ctrl+left click in windows) and (cmd+mouse left click in MAC).
After finishing drawing, click on 3D volume tools then choose segmentation tab and option as shown in the following image. Next steps are shown in the following series images.
Then select mesh morphing to smooth resulted shape.
In the final step, we save resulted mesh
We can combine two meshes by adding another mesh as shown in the following image.

Related links
Run multiple BrainVoyager instances on Mac OSX

Monday 21 November 2011

Brainvoyager QX tips and tricks 1; Some visualization tips

This entry is part of my talk about advanced features of visualization in Brain Voyage QX which was held in May 2008 at MARIARC, Liverpool.

I used BVQX (1.9.10). There are some differences between different versions, so please take this issue in account if you use another version. Hopefully, this could help!

Before starting; you have to refer to BrainVoyager QX Getting Started Guide
BrainVoyager QX Getting Started Guide

1- Sphere Mapping (Cortex-based alignment)
This can be done faster and easier in an automated way using a script provided through brain voyager QX support site by Draulio de Araujo. However, I am showing the normal method here.

2- Illustration of Brodmann areas, lobes, sulcus and gyruses...(on mesh)
Sphere Mapping should be processed before starting this step. Doing all of the previous steps ending with folding the (...RECOSM.srf) mesh by setting standard sphere vertices (image 7).
You should load a patch of interest from database that located in Atlas Brains folder in Brain voyager QX directory.

3- Illustration of Brodmann areas on 3D view; SAG, COR, AND TRA 
You should download  brodma.voi from Brain voyager user forums. or email me if you want a copy. (This file is available in the newest versions (Brainvoyager QX 2.x.x).

4- Drawing region on a mesh
In the following step, you should use ctrl and mouse click in order to draw a region of interest.When you finish drawing a closed curve you can toggle to fill mode and fill the region.

5- Representation of demarcated region on a polygon mesh

Related links
Run multiple BrainVoyager instances on Mac OSX