hSI: Acquisition Control
hSI is the instance of scanimage.SI created when ScanImage® starts, and is the entry
point for everything else in this section. It is itself a
component, so it follows the same live-update rules as the
components it owns.
Starting and stopping
Method |
Description |
|---|---|
|
Start a FOCUS acquisition. Nothing is logged. Runs for |
|
Start a GRAB acquisition: one acquisition of the configured number of frames, volumes
or slices, logged if |
|
Start a LOOP acquisition: |
|
Start the acquisition through hSI.hCycleManager. |
|
Stop whatever is running and return every component to idle. |
|
Park the scanner at the center of the field of view and open the excitation shutters.
Sets |
hSI.hChannels.loggingEnable = true;
hSI.hScan2D.logFilePath = 'C:\data';
hSI.hScan2D.logFileStem = 'experiment_01';
hSI.hScan2D.logFileCounter = 1;
hSI.startGrab();
Warning
The start methods return as soon as the acquisition has been armed - they do not
block until it finishes. To run code when an acquisition completes, use the acqModeDone
user function event rather than polling.
State
Property |
Description |
|---|---|
|
One of |
|
True when an acquisition is running and initialization has completed. |
|
True once the current acquisition mode has finished initializing. |
Acquisition settings
Property |
Description |
|---|---|
|
Number of independently started acquisitions in LOOP mode. |
|
Seconds between LOOP triggers when self-triggering. |
|
Seconds to focus for. |
|
Enable the external triggering features of |
|
Name of the active imaging system. Setting it switches |
|
Microns per optical degree, derived from
|
|
Scripts run when ScanImage starts and exits. |
|
Extra properties to write into the acquisition header. |
|
Write the Tiff header as JSON instead of the legacy format. |
hSI.imagingSystem = 'ResScan'; % switch imaging systems by configured name
hSI.hScan2D % now the ResScan object
Scanners
Member |
Description |
|---|---|
|
The active imaging system, a |
|
Cell array of every configured |
|
Look a scanner up by configured name, or by index into |
|
The active |
ScanImage also adds a dynamic property per configured scanner, so a scanner named
ResScan is reachable as hSI.hResScan.
cellfun(@(h)fprintf('%s (%s)\n',h.name,h.scannerType),hSI.hScanners);
Static utilities
Method |
Description |
|---|---|
|
Version string of the installed ScanImage. |
|
Change the MATLAB working directory to the ScanImage installation. |
|
Open the ScanImage source folder. |
|
Check whether a machine data file can be loaded by this version. |
Header and ROI metadata
str = hSI.getHeaderString(); % the acquisition header, as written into Tiff files
str = hSI.getRoiDataString(); % the serialized ROI group
Both are also embedded in logged files; see Output Files.