BrainVoyager Python Developer Guide 0.9

Overview

In order to allow Python scripts to access BrainVoyager functionality, the global BrainVoyager object is made available that exposes application-level properties and commands. In Python code, the BrainVoyager object can be referenced via the symbol "brainvoyager" or simply "bv". The following code snippet uses commands of the BrainVoyager object to create a VMR and a FMR document from raw MRI DICOM data:

doc_vmr = brainvoyager.create_vmr_dicom('DATA-0002-0001-00001.dcm', 192, false, 256, 256, 2)
doc_fmr = bv.create_fmr_dicom('DATA-0003-0001-00001.dcm', "exp_run-1', bv.projects_path + 'my_exp')


These commands return document objects, if successful, that expose additional document-level properties and commands. Document objects are instances of the class DocPyBV. The following code snippet first uses the BrainVoyager object to open a VMR document from the current directory and then uses the VMR document to link a VTC file:

doc_vmr = bv.open('example.vmr')
doc_vmr.link_vtc('example_mni.vtc')


The topics in this chapter of the Python Developer Guide describe the properties and commands of the objects available in BrainVoyager's Python scripting API.


The following topics describe application properties and commands:


This is followed by topics describing volume-space document properties and commands:


The next topoics desribe mesh scene and mesh related properties and commands:


Notes. The Python type 'float' in the API descriptions refers to 64-bit floating point values corresponding to type 'double' in C/C++. Most of these values are internally processed as 32-bit float data.


Copyright © 2020 Rainer Goebel. All rights reserved.