Channels and Display
Two components share responsibility for what you see: hSI.hChannels decides which
channels are acquired, displayed and saved, and hSI.hDisplay owns the channel windows and
the frame buffers.
hSI.hChannels
scanimage.components.Channels. Channel settings are stored per imaging system, so
switching hSI.imagingSystem restores that system’s channel configuration.
Property |
Description |
|---|---|
|
Array of channel numbers currently displayed. |
|
Array of channel numbers currently logged to disk. |
|
Read-only. Channels that are displayed or saved. |
|
Cell array of channel name strings. |
|
Enable file logging for GRAB and LOOP acquisitions. |
|
Dependent. Offsets subtracted from image data, in native units. |
|
Dependent. Per-channel logical: subtract the offset or not. |
|
Dependent. Cell array of |
|
Dependent, read-only. Ranges the digitizer supports. |
|
Read-only, in bits. |
|
Per-channel exponential averaging time constant, in seconds. |
|
Read-only. The exponential smoothing coefficient derived from |
|
Per-channel flag: apply exponential smoothing to the data being logged. |
|
When true, the averaging coefficient uses the measured frame timestamps; when false it uses the ideal, constant frame period. Set it to false when running online analysis on averaged data, so that a hiccup in MATLAB’s frame retrieval cannot look like a signal transient. |
|
Struct holding the saved channel settings for each imaging system. |
hSI.hChannels.channelDisplay = [1 2];
hSI.hChannels.channelSave = 1;
hSI.hChannels.loggingEnable = true;
% 3-frame-time exponential average on channel 1, for display and logging
tau = 3 * hSI.hRoiManager.scanFramePeriod;
hSI.hChannels.frameAverageTau(1) = tau;
hSI.hChannels.loggingSmoothing(1) = true;
Methods
Method |
Description |
|---|---|
|
Re-read the channel count and capabilities from the active imaging system. |
|
Store the current channel settings into |
hSI.hDisplay
scanimage.components.Display.
Display behavior
Property |
Description |
|---|---|
|
Number of frames averaged for display. |
|
Exponential smoothing coefficient for the displayed frame data. |
|
Lock the display average factor to the logging average factor. |
|
|
|
Z values to show. Empty shows all. |
|
|
|
Update the channel merge window. |
|
Update the merge window only while focusing. |
|
|
|
Number of lines retained in the line-scan display. |
|
Appearance of ROI edges in the display. |
|
Appearance of ROI projection edges. |
|
Read-only struct describing what the cursor is currently over in the ROI display. |
Scanfield displays
Property |
Description |
|---|---|
|
Enable the scanfield display window. |
|
Struct array, one entry per display, with fields |
|
Draw the scanfield names. |
|
|
|
Tiling size for the corresponding mode. |
Reading acquired data
Property / method |
Description |
|---|---|
|
Cell array holding the most recent frame for each channel. |
|
Cell array holding the most recent averaged frame for each channel. |
|
Channel number for each entry of |
|
Timestamp of |
|
Frame number overall and within the current acquisition. |
|
The current |
% grab the most recent frame of the first displayed channel
img = hSI.hDisplay.lastFrame{1};
% ROI-aware access
hRoiData = hSI.hDisplay.getRoiDataArray();
for idx = 1:numel(hRoiData)
fprintf('%s: %d channels\n',hRoiData(idx).hRoi.name,numel(hRoiData(idx).channels));
end
Note
For per-frame processing, prefer the frameAcquired
user function event over polling lastFrame. The user function
fires exactly once per frame.
Window control
Method |
Description |
|---|---|
|
Auto-scale the lookup table of a channel. |
|
Reset the display windows of all active channels. |
|
Reset selected channel windows. |
|
Save and restore the 3D camera position of the channel windows. |