Bruxton Corporation SIDX 7 sample program description, AcquireEpisode.


This is a simple episodic acquisition sample. Features include:

We provide this script to demonstrate programming techniques that may be useful when working with cameras that produce images at a high rate.

Programming Notes


SIDXCameraAcquireImageSetLimit sets the maximum number of images acquired following each call to SIDXAcquireStart. This is a 'soft limit', the camera will acquire at least the specified number of images before stopping, but may acquire more. For most cameras, the camera acquires images continuously, and SIDX enforces the SIDXCameraAcquireImageSetLimit limit value in software when it finds that the camera has acquired at least the specified number of images.


SIDX acquires images into an internal buffer. This buffer must be large enough to hold the images that may accumulate before they are read out by SIDXAcquireReadReplace and SIDXAcquireArchiveWrite. For example, if the camera acquires images at 100 frames/second, and the application script reads images out approximately every 1 second, then a buffer size of 200 images (2 seconds) is probably reasonable.

The buffer size set by SIDXCameraBufferCount Set is approximate, SIDX takes multiple factors into account when allocating the internal image buffer. You should not use the internal buffer to hold a long episodic acquisition, because this does not scale well for longer acquisitions, and may cause memory allocation problems. This sample script shows how to process images out of the internal buffer as they arrive.


SIDX writes images to a TIFF archive. SIDXAcquireArchiveOpenNew creates the TIFF archive file.

The current implementation of SIDXAcquireArchiveOpenNew create the TIFF file in the current folder of the running IGOR Pro application. This may or may not be the desired folder. Please specify a complete file system path to SIDXAcquireArchiveOpenNew in order to ensure that the file is written into the correct folder.


SIDX acquires images into an internal buffer, set by SIDXCameraBufferCountSet. SIDXAcquireArchiveWrite writes images out of that internal buffer into a TIFF file. The writes are asynchronous, once your script calls SIDXAcquireArchiveWrite, SIDX writes images while your script continues executing. The image write must be complete before SIDX needs the memory occupied by the images for newly-acquired images. This script avoids the problem of buffer overflow by writing the incoming images as they arrive from the camera.

You may not be able to use SIDXAcquireArchiveWrite if your camera is faster than your mass storage (disk or SSD). For example, if your camera has a sustained data rate of 50MB/s, and you are writing images to a disk with a sustained write rate of 150MB/s, then the disk is probably fast enough for the camera. However, if your camera ha a sustained data rate of 430MB/s, and you are writing to an SSD with a specified sequential write rate of 400MB/s, your camera is faster than the SSD. If the performance of your disk or SSD is important, you should measure the performance in actual operation. The operating system and the disk or SSD interface will affect performance, as will the amount of free space on the drive. Do not be surprised if you measure sustained write speeds that are less than the drive specification.


This sample script writes the acquired images into an IGOR Pro 3D wave. SIDXAcquireReadReplace reads images from SIDX into an IGOR Pro 3D wave, replacing images in the wave. The script creates a 3D wave with enough layers to hold all the images of the episodic acquisition, then uses SIDXAcquireReadReplace to read each image as it arrives into the proper layer in the 3D wave.

SIDXAcquireReadReplace is far faster than the alternative technique of using SIDXAcquireRead to read out the acquired images, then copying those images into the target 3D wave containing the images for the entire episode.