Looking for up-to-date ScanImage documentation? That has moved here: docs.scanimage.org

Icon
This documentation is for a legacy ScanImage version. The current documentation is ScanImage 2019.
Skip to end of metadata
Go to start of metadata

The IntegrationRoiManager weighs pixel values according to a mask and sums the weighted values to form the integration value. This integration value is displayed without further analysis. However, it might be desired to perform additional computation on the integration values (e.g. to calculate dF/F). This can be done by defining a post processing function.
The IntegrationRoiManager has a property 'postProcessFcn'. This property defines a function handle points to a function, which, by default, passes the integrationValues through without any processing. By changing this function handle, a different functionality can be achieved.

 

To get started with your own postProcessingFcn, inspect the default post processing function

Default function

 

This function can be changed to use the integration history for generating values:

Example: Average last three values
Icon

The post processing function will be called several times during a volume. Makes sure to optimize the function for performance, so that the the processing pipeline is not slowed down.

 

Note: only values that are flaged by 'integrationDone' actually were updated when the post processing function was called. To optimize for performance, only these values need to be post processed

Performance optimization

 

Application idea: overwrite the integrationValue of the last roi to show a peak every 30th frame

Application example
  • No labels