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.
projects → ProjectListPyBV
- 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_document → DocPyBV
adoc → DocPyBV
- 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.
documents → DocListPyBV
docs → DocListPyBV
- 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_directory → str
cdir → str
- 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_path → str
- 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_path → str
- 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_path → str
- 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_file → str
- Description
- This read-only property returns the path of the global VOI file available for all VMR documents.
version_major → int
- Description
- This read-only property provides the major version number of the running BrainVoyager instance, e.g. "20" for BrainVoyager 20.4.2.
version_minor → int
- Description
- This read-only property provides the minor version number of the running BrainVoyager instance, e.g. "4" for BrainVoyager 20.4.2.
version_patch → int
- Description
- This read-only property provides the patch version number of the running BrainVoyager instance, e.g. "2" for BrainVoyager 20.4.2.
build_number → int
- 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_bits → bool
- 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_x → int
- 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_y → int
- 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_w → int
- 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_h → int
- 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_visible → bool
- 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.