Tuesday 1 March 2011

Autoscale of vmr files (Brainvoyager QX) & automation of Advanced segmentation tools


AppleScript is a very powerful and versatile scripting language comes with Mac OS X. It can be used to automate repetitive tasks, which would save huge amount of time. In neuroimaging, most of processes are repetitive across subjects; I already have given an example in my previous blog entry. Repetation of processes is not the only problem, some processes consist of multiple stages where each stage need need long time to be finished. In addition, users should follow processes steps and add entries or click on buttons to move from stage to another. As an example I wrote two GUI applescripts to control advanced segmentation tools in Brainvoyager QX using a small tool called cliclick. Although Brainvoyager is not scriptable since there is no applescript dictionary for it yet, I have been told that, BrainVoyager will become a true scriptable application in a much easier way. Its applescript dictionary will be available soon with the next version.
Now, Brainvoyager QX 2.3 is supporting applescript scripting for Mac OS X users.Updated on Saturday 12 February 2011
 
The following GUI scripts can be used to automate advanced segmentation tools in Brainoyager QX  on multiple subjects data sets. First one; (Autoscale_BVQX) is used to scale vmr files to 0.5 x 0.5 x 0.5 mm3 while the other one (AdvancedST_BVQX) goes through all advanced segmentation tools stages starting from brain peeling step.
Please note that;
* Before starting these scripts, you should install Cliclick shell application in /usr/local/bin.

* Screen resolution should be set to 1440 X 900, otherwise you should change cliclick values along the whole script to fit with icons and buttons locations. 

* In addition, I tested this script on MacBook pro; Ram: 4Gb and CPU: 2.6GH  Core 2 duo and 6MB cache.Therefore, you could change "delay" timing depending on your mac speed by running all process manually for once,However I put 20 to 30 seconds extra time for longer processes.  

* Data sets should be already scaled to 0.5 x 0.5 x 0.5 mm3 before using AdvancedST_BVQX.

  1. *In order to scale multiple data sets to 0.5 x 0.5 x 0.5 mm3 at one instance you could use the other script;   Autoscale_BVQX.    


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


Related links
Run multiple BrainVoyager instances on Mac OSX

No comments: