BrainVoyager Python Developer Guide 0.9

Application Properties

The following properties are exposed by the BrainVoyager application object that is made available to any Python script. The BrainVoyager application object can also be used to call important functions, e.g. to open documents from disk or to create documents from MRI data.


projectsProjectListPyBV

Description
This read-only property provides a list of all projects in the 'projects_path' (see below) where BrainVoyager expects projects stored according to the BIDS standard. The obtained ProjectsListPyBV object can be used to iterate through available projects, which are defined as the names of all folders inside the 'projects_path' that do not start with an underscore or dot symbol.


active_documentDocPyBV
adocDocPyBV

Description
This read-only property retrieves the currently active document in BrainVoyagers multi-document workspace area. The obtained DocPyBV document object can be used to call document-specific functions. While this is useful for batch scripting it also provides a quick way to operate on a specific document that has been created or loaded using the GUI.


documentsDocListPyBV
docsDocListPyBV

Description
This read-only property retrieves a list of all documents currently available in BrainVoyager's multi-document workspace area. The obtained document list object can be used to iterate through available documents.


current_directorystr
cdirstr

Description
This read-write property can be used to get the full path to BrainVoyager's current directory (folder) and to set a new path that is used by BrainVoyager as the current directory. The current directory is used e.g. when opening files in case that only a file name is provided as input.


projects_pathstr

Description
This read-write property can be used to get the default data path where BrainVoyager expects projects to be stored; the property can also be set to another path. The default data path of BrainVoyager is "[user]/Dcouments/BrainVoyager/Projects". Note that the default projects path is the same as the default path used for the data management tools.


sampledata_pathstr

Description
This read-write property can be used to get the default data path where BrainVoyager stores sample data sets such as the "Getting Started Guide". The default sample data path is "[user]/Dcouments/BrainVoyagerSampleData".


notebook_pathstr

Description
This read-only property returns the path of the notebook file currently loaded in the BV Notebook window. If the Python code is not evaluated inside a notebook (e.g. in the IDE), an empty string is returned.


voi_filestr

Description
This read-only property returns the path of the global VOI file available for all VMR documents.


version_majorint

Description
This read-only property provides the major version number of the running BrainVoyager instance, e.g. "20" for BrainVoyager 20.4.2.


version_minorint

Description
This read-only property provides the minor version number of the running BrainVoyager instance, e.g. "4" for BrainVoyager 20.4.2.


version_patchint

Description
This read-only property provides the patch version number of the running BrainVoyager instance, e.g. "2" for BrainVoyager 20.4.2.


build_numberint

Description
This read-only property provides the build number of the running BrainVoyager instance. The build number uniquely identifies a (released or beta) BrainVoyager version.


is_64_bitsbool

Description
This read-only property can be used to check whether BrainVoyager runs as a 64-bit application (true) or 32-bit application (false). BrainVoyager is usually provided only as a 64-bit executable but older programs are released as 32-bit version.


wnd_xint

Description
This read-only property provides the x coordinate of the BrainVoyager window. To change the position of the window, use the 'move_window' command.


wnd_yint

Description
This read-only property provides the y coordinate of the BrainVoyager window. To change the position of the window, use the 'move_window' command.


wnd_wint

Description
This read-only property provides the width of the BrainVoyager window. To chang the size of the window, use the 'resize_window' command.


wnd_hint

Description
This read-only property provides the height of the BrainVoyager window. To chang the size of the window, use the 'resize_window' command.


wnd_visiblebool

Description
This read-write property can be used to check or change whether the BrainVoyager window is visible (True) or not (False).


Copyright © 2020 Rainer Goebel. All rights reserved.