Brain Innovation

support portal

Navigation

BrainVoyager Available Tools Available Scripts Scripts for BrainVoyager (Python, *.py)

Scripts for BrainVoyager (Python, *.py)

Introduction

The Python-scripts (*.py) below can be used from BrainVoyager 20. Python is an experimental feature in BrainVoyager 20.0. For more information about Python in BrainVoyager, please see Rainer's BV blog.They are an addition to the scripts that are available in the folder /(My) Documents/BVExtensions/PythonScripts/ after installation of BrainVoyager. For Python in BrainVoyager documentation, please see http://fladd.github.io/BVPython/index.html. For information about the Python language and some useful libraries, see: Python website and the SciPy website.

Also, the JavaScript language can still be used in BrainVoyager (see JavaScripts), and on Mac, AppleScript can be used.

python menu bv

Scripts

Simple script to read/write a transformation file (only type 2, *_a12.trf): read_transformation_file_v021.py (zipped)
Simple script to show slices of VMR volumes (one anatomical, one VTC-in-VMR volume), see figure below: show_img_slices.py (zipped)

show img slices

Script to calculate mutual information between an anatomical image (VMR) and a functional image saved as VMR: mutual_information_in_brainvoyager_v02.py (zipped)
Can be useful to check the undistortion via COPE or anatabacus. First, coregister the distorted and undistorted FMRs to the VMR, then create VTCs, use "Show VTC Vol" in 3D Volume Tools and save via File > Save as Secondary VMR.
Usage: load in BrainVoyager Python editor, click 'Run'. File dialogs asking for the VMRs will appear, and figures of histograms, etc. In v0.2, the figures are saved to disk.
 
Simple script to segment a VMR file by setting all values above a threshold to blue (colour 240): simple_segment_vmr_using_threshold_v01.py (zipped)
 
Script to calculate the Dice similarity coefficient between an anatomical image (VMR) and a functional image saved as VMR: dice_similarity_coefficient_v011.py (zipped)
Usage: load in BrainVoyager Python editor, click 'Run'. File dialogs asking for the VMRs will appear, and the Dice similarity coefficient will be printed to the BrainVoyager Log tab. Please note the thresholds can be changed in the script, if required.
Changes in v0.1.1: fix in calculation; set threshold for both images to 100; added check for the size of images (should be equal).

Latest update: 06-04-20 12:31 BST

 

You are here: HomeBrainVoyagerAvailable ToolsAvailable Scripts ≫ Scripts for BrainVoyager (Python, *.py)