WIRIS Data SDK tutorial

WIRIS Data SDK tutorial

Linking Wiris Data SDK to a Visual Studio C++ Project

1.  Open Visual Studio, create new project: File -> New -> Project -> Visual C++

2.  Link the SDK’s header files:

a. Open Project properties: Project -> Properties.

b. Open C/C++ tab and choose

c. Click on Additional Include Directories text field and open dialog using the arrow down icon and choose Edit from the dropdown menu.

Use the dialog to navigate to the headers which are located in your SDK folder.

Figure 1. Adding SDK headers to Additional Include Directories
Figure 1. Adding SDK headers to Additional Include Directories

3.  Link the pre-compiled SDK files:

a.  Open Project properties: Project -> Properties.

b.  Open Linker tab and choose

c.  Click on Additional Dependencies text field and open dialog using the arrow down icon and choose Edit from the dropdown menu.

d.  Insert path to all the binary files found in the lib-win directory inside SDK.

Figure 2. Adding SDK binaries to linker Additional Dependencies.
Figure 2. Adding SDK binaries to linker Additional Dependencies.

 

4. Project Compilation and Licensing:

a.  Make sure you compile the project in release mode with 64bit compiler.

b.  Include file h, which is the entrypoint of the SDK.

c.  Activate your license serial number – you need yout SDK copy by calling function wtl::Center::Activate(serialNumber), requeires internet connection.

d.  After the activation, license file is saved to your computer. You can use function wtl::Center::Authenticate to check the state of your license.

e.  After the activation, you will be able to work with thermograms and sequences.

Figure 3. Sample code for SDK activation.
Figure 3. Sample code for SDK activation.

Using Wiris Data SDK in a Visual Studio C++ Project

1. Please refer to the Linking Wiris Data SDK to a Visual Studio C++ Project tutorial to get information about setting up the project and licensing.2. Loading thermograms stored on your file system is done using the methods wtl::Center::loadImageRadiometric(path) and wtl::Center::loadSequenceeRadiometric(path), which return shared pointer to created thermogram instance.
3. Read temperatures, radiometric values or parameters from the thermogram.

Figure 1. Sample Code for reading emissivity and maximum temperature of thermogram.
Figure 1. Sample Code for reading emissivity and maximum temperature of thermogram.

4. Modify parameters of thermograms and add measurements using methods of ImageRadiometric or SequenceRadiometric

Figure 2. Sample Code for adding roi to thermogram.
Figure 2. Sample Code for adding roi to thermogram.

5. Change appearence of the thermogram – choose palette to be used or change temperature range and view your image data or save it to the filesystem.

Figure 3. Changing palette and saving thermogram.
Figure 3. Changing palette and saving thermogram.

6. If you want to present the image in your application‘s GUI, use the method ImageRadiometric::getRGBArrayRepresentation(data). It will calculate RGB values using temperature in each pixel and colors from palette and save them to memory given by parameter.

Sample on github: https://github.com/SoftwareWorkswell/wwp-data-sdk-sample