ScanImage Scripting API

ScanImage is fully scriptable using Matlab’s command window and/or user defined functions. This article describes the ScanImage Application Programming Interface (API) and how to use it to automate ScanImage and extend ScanImage’s functionality.

ScanImage Architecture

The ScanImage architecture is based on the Model-View-Controller design pattern. The application’s logic and hardware control is accessed via hSI, the ScanImage handle.

hSI grants the user access to the ScanImage components, the building blocks of an acquisition. This includes Matlab handles to hardware devices (PMTs, shutters, beam modulators, etc.), configuration managers (ROI manager, waveform manager, motion, etc.), imaging systems, etc.

ScanImage’s GUI is accessible through the handle hSIGui, which is split up into a left panel, middle panel, and right panel.

The left panel contains the basic acquisition settings and more advanced options are available depending on experiment requirements. The middle panel contains the viewport (where the acquisition can be visualized in space) and the auxiliary panel (for configuring and using helpful features). The right panel stores the widget bar for quick visual device information and access.


Basic Functionality