Turbo-BrainVoyager v4.4

Map Visualization Functions

In case that a plugin calculates its own maps in real-time, the following functions allow to visualize them in all brain views including slices, volumes and surfaces. A plugin needs to register the intention to visualize maps which will add in the user interface the Show plugin maps option that allow the user to switch between visualization of the standard GLM contrast maps and the calculated plugin maps. To see how the map visualization functionality works from a user perspective, run the included real-time ICA plugin.

bool tRegisterMaps(int n_maps)

Registers a stack of maps for each slice of the data, i.e. if you calculate one overlay map, the value should be "1". If you register more than one map, you can visualize several maps simultaneously up to a maximum of 4 maps. The return value indicates whether the function was successful. Note that this function must be called in the "executePreRun()" function. In order to properly access the allocated data during real-time processing, use the "tGetDimsOfFunctionalData()" function and the "tGetPluginMaps()" function (see below) when your "executePostStep()" function is called.

void tSetPluginMapName(int map_i, char *cName)

Sets the name for the specified map "map_i" to "cName". This function can be used in the pre-run step as well as during real-time processing. The specified name is shown in the map list on the right upper part of the main program window replacing the standard list of contrasts in case that the Show plugin maps option is turned on.

void tSetDisplayStatusOfMap(int map_i, int display_status)

Sets the "display_status" for the specified map "map_i". This function can be used in the pre-run step as well as during real-time processing. The specified value can be "0" (do not show this map), "1" (show positive values of map), "2" (show negative values of map) and "3" (show positive and negative values of map). Only those map entries are shown that pass the current threshold. The first map is turned on by TBV as default, i.e. if you calculate one map, you may not need to use this function.

void tUpdateMapList()

This function updates the list displaying the calculated maps in the list box in the right upper corner of the program window. It should be called after calls to the "tSetPluginMapName()" and "tSetDisplayStatusOfMap()" have been made in order to reflect the changes in the GUI.

void tSetPluginMapsThreshold(float threshold)

Sets the "threshold" value used for the calculated and displayed maps. This function can be used in the pre-run step as well as during real-time processing. Only those voxels in the displayed map(s) are shown that pass the specified threshold. Note that at present no cluster threshold is used.

void tShowPluginMaps(bool show_status)

Toggles programmatically between display of custom maps ("show_status" set to "true") and standard GLM contrast maps ("show_status" set to "false"). You should use this function only in the "executePreRun()" stage to turn display of plugin maps on since during real-time processing the user can use the Show plugin maps option to control the display mode.

float *tGetPluginMaps()

Returns the pointer to the memory space reserved for the custom plugin maps or "NULL" in case of failure. In order to properly access the allocated data during real-time processing, use the "tGetDimsOfFunctionalData()" function and the number of maps provided to the "tRegisterMaps()" function. Fill the reserved memory with the results of your custom map calculation routine. Note that this function can be only called during real-time processing since the data is not reserved directly when registering the maps but only at the moment when the real-time processing starts.



Copyright © 2002 - 2024 Rainer Goebel. All rights reserved.