Many users of ScanImage are highly familiar with the Matlab scripting environment. Recent and planned ScanImage releases include a variety of utility functions that can be run from the Matlab command window or from Matlab scripts or functions.

These functions are located in a folder called 'scim' and all functions begin with this prefix (short for ScanImage), e.g. scim_openTif.m. If the scim folder is added to the Matlab path (along with its subfolders), then all the available scim functions can be readily seen/accessed from the command line via tab completion.

Some of the utility functions may be intended or particularly useful within custom ?User Functions.

The table below lists/describes each of these utility functions. Look into the M file comments for further details about each utility function's usage and operation.

Function Name

Description

scim_abort

Aborts current ScanImage acquisition, if any. Useful in some ?User Functions and occasionally to reset ScanImage after an error condition.

scim_colorMap

Function used to create Matlab figure colormaps included as default options on the ??Channels dialog. Users wishing to modify these colormaps or create a wholly custom colormap for one or more of the ?Image Display Figures can use this function with different arguments, or use it as a model for their own function.

scim_exit

Function exits ScanImage, without closing Matlab. ScanImage can then be restarted.

scim_getVersion

Returns version number information for ScanImage version currently on the Matlab path (or the first one found).

scim_isRunning

Returns value indicating whether ScanImage is currently running and, if so, whether ScanImage 3.x or 4.x is running. Useful in some ?User Functions

scim_openTif

Utility for reading header data and image data from ScanImage-generated TIF files. Includes several options, including ability to selectively read from specific channels, frames, and/or slices, as well as to create new (smaller) TIF files or movie files with such selections.

scim_parkLaser

Generally used to reposition laser beam to park location specified in the ?INI File, also blanking beam with power modulator (e.g. Pockels) and closing shutter, as available. Complements scim_pointLaser.

scim_photonStats

Utility that can be used for analyzing images of uniform fluorescence to compute photon statistics, assuming shot noise Poissonian statistics are prevailing: mean, standard deviation, 'pixel per photon', and number of photons per pixel.

scim_pointLaser

Used to position laser beam to specific angular coordinates. When called without input arguments, graphical selection from last acquired image shown in an Image Display Figure is used to select the point. If not already, shutter is opened and beam modulation (Pockels) power is set to value specified in ScanImage.

scim_savePath

Changes Matlab's current directory to the ScanImage save directory (as set from the Main Controls panel). Often used to quickly display listing of files recently saved by ScanImage in the Matlab Current Folder Browser.

scim_show

Raises all open ScanImage windows, bringing them to the foreground. Also can be used to open all ScanImage windows.

scim_spineAnalysis

Invokes the legacy Spine Analysis software, used in such works as Holtmaat et al.

scim_startup

Script that users can included into their Matlab startup.m file to allow the classic ScanImage 'opening GUI' to be shown at Matlab startup, allowing ScanImage to be started with click on the ScanImage icon button.

scim_upgrade

Utility to facilitate upgrading to new ScanImage versions by copying and converting previous INI, USR, and CFG files to formats that can be used in newer version.

  • No labels