Programming samples
Overview
Calling functions in SIDX should follow the following conventions:
-
Always call SIDXOpen as the first call to SIDX, and call SIDXClose before quit using SIDX.
-
Choose/Open a camera after initializing SIDX using SIDXOpen. The ways of choosing a camera can be with SIDXDialogCameraSelector, SIDXCameraOpen,
SIDXSettingsOpenCamera or SIDXSettingsRestoreCamera. When open a camera successfully, the SIDX function should return with a handle to the open camera.
The handle will be needed for controlling the camera with SIDX.
-
To begin acquiring images with an open camera, use SIDXAcquisitionBegin... to lock down the camera parameter settings and use SIDXAcquisitionEnd to end
the acquisition session. If re-adjusting camera settings is necessary after SIDXAcquisitionBegin... call is made, call SIDXAcquisitionEnd to unlock the
settings and make changes before calling SIDXAcquisitionBegin... again. Any changes to the camera settings made between SIDXAcquisitionBegin... and
SIDXAcquisitionEnd will not take into effect until the next SIDXAcquisitionBegin... call is made.
-
The acquisition of images starts when SIDXAcquisitionStart function is called. To stop the acquisition uses SIDXAcquisitionStop or SIDXAcquisitionAbort.
The acquisition of images can be restarted again with SIDXAcquisitionStart in the same configuration.
-
SIDX allows multiple cameras being open at the same time.
The usages of SIDX functions should be similiar to the followings:
-
SIDXOpen
-
SIDXDialogCameraSelector/SIDXCameraOpen/SIDXSettingsOpenCamera/SIDXSettingsRestoreCamera
-
Change camera settings
-
Perform acquisition of images
-
SIDXCameraClose
-
...
-
Open a difference camera with SIDXDialogCameraSelector/SIDXCameraOpen/SIDXSettingsOpenCamera/SIDXSettingsRestoreCamera
-
Change camera settings
-
Perform acquisition of images
-
SIDXCameraClose
-
SIDXClose
C/C++
Under SIDX installation directory, there is a sub-directory called "C". In the "C" directory, it has the source code used for building SIDXView program. It can
be the start point for constructing an imaging application in C/C++ using SIDX.
Microsoft Visual Studio .NET
If you choose to use Microsoft Visual Studio .NET interface during the installation of SIDX, the installer will put a sample of how to use the SIDX Microsoft Visual Studio
.NET interface in the SIDX installation directory under "Microsoft Visual Studio Dot NET" sub directory. The sample can be compiled int a .NET application.
National Instruments LabView
National Instruments LabView sample VIs may be found in the sub-directory called "National Instruments LabView" under SIDX installation directory. There are sample VIs
for each acquisition mode, and can be used to acquire images immediately.
NIH ImageJ
The Java source code for SIDX ImageJ plugin can be found in the sub-directory "NIH ImageJ" under SIDX installation directory. It demonstrates how to make calls
to SIDX in Java. SIDX ImageJ plugin is available under "Plugins" menu in ImageJ if the ImageJ support is selected during SIDX installation.
WaveMetrics Igor Pro
You may find samples for Igor Pro in the sub-directory "WaveMetrics Igor Pro" under SIDX installation directory. There
are sample code for each acquisition mode, and demonstration of how to set individual camera parameters. SIDX commands can be called from either Igor Pro macros or
functions.