![]() | SDK modifications from version 8.1.x to 8.2.x |
This topic contains the following sections:
This page describes the modifications of the SDK interface introduced in version 8.2.x.
The entry point in the Eucalyptus library for parameters access was slightly modified for a safer usage.
The main visible modifications for SDK users are:
The ConfigManager class is not a singleton anymore. A single instance per database must be created by the programer and it's reference given to all classes requiring access. It is recommended to only give a reference to the IConfigManager interface and not the full ConfigManager class.
![]() |
---|
Working with several databases at the same time is only possible in offline mode. Specific help classes have been designed for this usage, as well as an example. Please contact Lyncée Tec if you need to implement this unusual configuration. |
The UserManager instance is available via the ConfigManager instance to make sure they relate to the same database.
Reading of encrypted parameters, such as the hardware configuration, requires a logged in user. Therefore, the ConfigManager cannot be initialized before the user logs in.
The ConfigManager object implements IDisposable. Disposing it at the end of your program ensures that all it's sub-items, such as the UserManager are disposed correctly and perform cleanup operations (log off, disconnect the DHM object if needed, etc).
This comparison shows how to modify your code for the initialization of the parameters. To use the new reconstruction, see the New reconstruction process section below."
Version 8.0x to 8.1.x | Version 8.2.x |
---|---|
//Option: cache instances of Config and User Managers ConfigManager configManager = ConfigManager.Instance; UserManager userManager = UserManager.Instance; | //Create an instance of the Config Manager and optionally cache the User Manager instance ConfigManager configManager = new ConfigManager(databasePath, driversPath); IUserManager userManager = configManager.UserManager; |
| //Log in (Same as before, but must be done prior to the Config Manager initialization) userManager.Login(userName, password); |
//Initialize the configuration manager configManager.Init(databasePath, driversPath); | //Initialize the configuration manager configManager.Init(); |
//Create and instance of the dhm device DHMDeviceBase dhmDevice = DHMDeviceFactory.CreateDHM(configManager.GetDHMParameters(), userManager); | //Create and instance of the dhm device (Same as before) DHMDeviceBase dhmDevice = DHMDeviceFactory.CreateDHM(configManager.GetDHMParameters(), userManager); |
//Connect DHM device to manager configManager.Connect(dhmDevice); | //Connect DHM device to manager (Same as before) configManager.Connect(dhmDevice); |
//Log in userManager.Login(userName, password); |
|
//Init the DHM dhmDevice.InitDhm(null).Wait(); | //Init the DHM (Same as before) dhmDevice.InitDhm(null).Wait(); |
//Load a configuration without specific sample configuration (working in air) configManager.LoadMeasurementConfig(measurementConfigId, null).Wait(); | //Load a configuration without specific sample configuration (working in air) (Same as before) configManager.LoadMeasurementConfig(measurementConfigId, null).Wait(); |
![]() |
---|
The new reconstruction process, as found in the InterfaceProcessingV2 NuGet package is still in development and must be considered a beta. |
The new reconstruction process is composed of several distinct steps.
The configuration step that setup all the parameters of the reconstruction.
The processing step that uses the configuration parameters to produce images.
The gathering step that gets the images from the reconstruction.
In this new version, the reconstruction object must be seen as a thread storing holograms in an input queue and producing output images stored in a buffer of fixed size defined by the developer.
A Configuration is composed of several sub-configurations (AcquisitionConfiguration, ProcessingConfiguration, NonMeasuredPointsConfiguration, PostProcessingConfiguration). Each sub-configuration represents a specific part of the reconstruction process. The base Configuration parameters can be initialized using the database via the constructor or the Initialize method. Two configurations can share the same sub-configuration module. For example, if two configurations share the same PostProcessingConfiguration, it means that enabling the unwrapping in this sub-configuration will enable it for both configurations at the same time.
The Reconstruction object can handle several configurations at once: it is optimized to switch between configurations without impacting the performance. Once a configuration is created, it must be linked to the Reconstruction object via the LinkConfiguration method. To start reconstructing a hologram, the AddHologram method must be called specifying the hologram and the ID of one configuration previousely linked. This will add the hologram to the reconstruction waiting queue. Figure 1 below shows the full reconstruction process with steps to follow to get images.
The last step consist of retrieving the output images. To do so, one must wait for a specific hologram to be reconstructed using the Join method. The same method can be used without any parameters to wait for all the holograms in the waiting queue to be processed. This last step might be dangerous if the output buffer size (defined via the SetOutputBufferSize) is smaller that the hologram input queue. In this case, the Join method will wait forever except if the Free method is called in parallel.
Once a specific hologram is joined, its output images can be gathered using the corresponding methods.
To free up output buffer space, the Free method must be called with a hologram id, which will allow the reconstruction thread to process the next hologram in the waiting queue. Once this method is called, the output images previously gathered must not be used anymore.