ScanImage 2016 : Current Scan Status Using API

How can I determine the status of an acquisition in ScanImage?

Specifically, how can I determine whether ScanImage is currently acquiring a frame or whether the acquisition has completed?

 

Review the section 'User Functions' on the following page: http://scanimage.vidriotechnologies.com/display/SI2015/ScanImage+API

There you see how to obtain the last frame acquired by ScanImage. The 'lastStripe' object has several fields that are relevant:

 

  • frameNumberAcqMode                
    numeric, number of frame, counted from beginning of acquisition mode

  • frameNumberAcq                          
    numeric, number of frame in current acquisition

  • acqNumber                                   
    numeric, number of current acquisition

  • epochAcqMode                             
    string, time of the acquisition of the acquisiton of the first pixel in the current acqMode; format: output of datestr(now) '25-Jul-2014 12:55:21'

  • frameTimestamp                           
    [s] time of the first pixel in the frame passed since acqModeEpoch

  • acqStartTriggerTimestamp            
    [s] time of the acq start trigger for the current acquisition

  • nextFileMarkerTimestamp             
    [s] time of the last nextFileMarker recorded. NaN if no nextFileMarker was recorded