BrainVoyager Python Developer Guide 0.9

Document Properties

The following properties are exposed by the "DocPyBV" document object, which will be returned by various BrainVoyager application object and document list commands, e.g. after creating or opening a document from file.

 

dim_xint

Description
This read-only integer property retrieves the dimension of the X axis of the calling document object. For VMR documents, the X axis is interpreted in MNI / Talairach space running from left-to-right and from right-to-left in non-normalized (or generally in the displayed system coordinates); this axis definition assumes that the VMR volume data is in the BrainVoyager's standard sagittal orientation. For FMR and DMR documents, the X dimension corresponds to the number of columns (width) of the measured slices.


dim_yint

Description
This read-only integer property retrieves the dimension of the Y axis of the calling document object. For VMR documents, the Y axis is interpreted in MNI / Talairach space running from posterior-to-anterior and from anterior-to-superior in non-normalized (or generally in the displayed system coordinates); this axis definition assumes that the VMR volume data is in BrainVoyager's standard sagittal orientation. For FMR and DMR documents, the Y dimension corresponds to the number of rows (height) of the measured slices.


dim_zint

Description
This read-only integer property retrieves the dimension of the Z axis of the calling document object. For VMR documents, the Z axis is interpreted as in MNI / Talairach space running from inferior-to-superior and from superior-to-inferior in non-normalized (or generally in the displayed system coordinates); this axis definition assumes that the VMR volume data is in BrainVoyager's standard sagittal orientation. For FMR and DMR documents, the Z dimension is the number of measured slices.


voxel_size_xfloat

Description
This float property can be used to read and set the spatial resolution of voxels along the X (left-right) axis. The property is only valid for VMR document objects and returns value -1.0 for other document types.


voxel_size_yfloat

Description
This float property can be used to read and set the spatial resolution of voxels along the Y (posterior-anterior) axis. The property is only valid for VMR document objects and returns value -1.0 for other document types.


voxel_size_zfloat

Description
This float property can be used to read and set the spatial resolution of voxels along the Z (inferior-superior) axis. The property is only valid for VMR document objects and returns value -1.0 for other document types.


pixelsize_xfloat

Description
This float property can be used to read and set the spatial resolution of voxels along the X (across columns) axis. The property is valid for FMR and DMR document objects.


pixelsize_yfloat

Description
This float property can be used to read and set the spatial resolution of voxels along the Y (across rows) axis. The property is valid for FMR and DMR document objects.


slice_thicknessfloat

Description
This float property can be used to read and set the thickness of the measured slices. The property is valid for FMR and DMR document objects.


gap_thicknessfloat

Description
This float property can be used to read and set the thickness of the gap between measured slices. The property is valid for FMR and DMR document objects. Note that the distance between slices is the sum of the slice_thickness and gap_thickness properties.


TRint

Description
This integer property can be used to read and set the volume TR value of FMR document objects. In case that a VTC file has been linked to a VMR document, this property returns the TR value stored in the header of the VTC data.


inter_slice_timeint

Description
This integer property can be used to read and set the inter-slice time value of FMR document objects.


has_slice_time_tablebool

Description
This boolean read-only property can be used to check if the calling FMR document object has a slice timing table. If the command returns True, the "correct_slicetiming_using_timeingtable()" command can be used for slice timing correction.


n_volumesint

Description
This read-only integer property returns the number of time points of the calling FMR or DMR document object. In case that a VTC or VDW file has been linked to the VMR document, the property returns the number of time points (volumes) of the VTC / VDW data.


n_skipped_volumesint

Description
This read-only integer property returns the number of time points of the calling FMR or DMR document object that were skipped when reading the original MRI data.


file_namestr

Description
This read-only string property provides the file name of any loaded or created document. The returned string contains only the file name proper without the path.


path_file_namestr

Description
This read-only string property provides the file name of any loaded document. The returned string includes the full path to the directory where the document is stored on disk. The path component delimiter is the "/" character.


pathstr

Description
This read-only string property provides the path of any loaded document. The returned string contains the full path to the directory where the document is stored on disk. The path component delimiter is the "/" character, which is also the trailing element of the returned path. The returned value can also be derived from the PathFileName property by removing the last (i.e. file name) component.


preprocessd_fmr_namestr

Description
This read-only property provides the name of a FMR as it will be stored to disk after preprocessing. This allows to open a preprocessed FMR document from disk directly without the need to construct the file name using the performed preprocessing command and used parameters. Check the "preprocess_FMR.py" file for an example.


preprocessd_vtc_namestr

Description
This read-only string property provides the name of a VTC after preprocessing. Since a preprocessed file is linked automatically to the hosting VMR after preprocessing, this property simply retireves the VTC path file of the currently linked VTC.


mesh_sceneMeshScenePyBV

Description
This read-only property returns the MeshScene object attached to the current VMR document. A mesh scene holds the 3D Viewer (OpenGL) window, which can contain one or more mesh objects. In case that no mesh scene is currently attached to the VMR document, the value "None" will be returned. In case one wants to create a MeshScene object with an empty 3D Viewer, the CreateMeshScene() command of VMR documents can be used.


current_meshMeshPyBV

Description
This read-only property returns the current mesh in the mesh scene attached to the current VMR document. The value "None" is returned in case that no mesh scene is associated with the document or in case that an associated mesh scene does not contain a mesh object.


current_vtc_filestr

Description
This read-only property returns the current vtc file linked to the hostiing VMR document object.


protocol_filestr

Description
This read-only property returns the protocol file used by the hosting document's functional (FMR-STC or VMR-VTC) data; the returned string usually includes the full path to the protocol file.


Full documentation of the following properties is coming soon...


str StimulationProtocolExperimentName


int StimulationProtocolResolution


int NrOfStimulationProtocolConditions


int StimulationProtocolBackgroundColorR


int StimulationProtocolBackgroundColorG


int StimulationProtocolBackgroundColorB


int StimulationProtocolTimeCourseColorR


int StimulationProtocolTimeCourseColorG


int StimulationProtocolTimeCourseColorB


int StimulationProtocolTimeCourseThickness


int StimulationProtocolTextColorR


int StimulationProtocolTextColorG


int StimulationProtocolTextColorB


int NrOfSlices


bool SDMContainsConstantPredictor


int FirstConfoundPredictorOfSDM


bool SeparationOfSubjectPredictors


bool SeparationOfStudyPredictors


bool ZTransformStudies


bool ZTransformStudiesBaselineOnly


bool PSCTransformStudies


int CorrectForSerialCorrelations


bool ExtendedTALSpaceForVTCCreation


bool UseBoundingBoxForVTCCreation


int TargetVTCBoundingBoxXStart


int TargetVTCBoundingBoxYStart


int TargetVTCBoundingBoxZStart


int TargetVTCBoundingBoxXEnd


int TargetVTCBoundingBoxYEnd


int TargetVTCBoundingBoxZEnd


int NrOfVOIs


int NrOfROIContrasts


int NrOfPredictorsInSingleStudyDM


int NrOfTimePointsInSingleStudyDM


int NrOfVolumeMaps


Copyright © 2020 Rainer Goebel. All rights reserved.