Set Image Rotation From API

Hi All,

Is there any way to set the ‘Image Rotation’ setting from the management console within the ‘old’ C++ API?

Looking at a previous topic ( I see it can be set via the INI file, but no mention of setting it through the API.

Is this possible?


Hi @JoshSmith ,

sorry for keeping you waiting for so long!
There are basically two ways you can influence the RotateImage setting:

A: Before :cvb: 13.0 the only way to do it is to modify the setting in the file CVBDATA\Drivers\GenICam.ini (which is after all just a simple text file that follows ini-File convention, i. e. name-value pairs grouped in sections). Not very convenient, but works…

B: Starting with 13.0 :cvb: has a device discovery interface that makes it possible to affect these setting during the process of opening the device. As the C-API is the basis for all the other APIs, the functionality is generally accessible through the C-API (although you might find it lacking in convenience).The functions involved can be found in the iCVCDriver.h file (those starting wiht DO...).
The general idea is that you query the list of available devices through DODiscover which yields a list of devices that matches the discovery criteria (Flags parameter…). For the discovered devices, the ini-File parameters can then be set using DOSetParameter (likewise DOSetFeature will make it possible to affect node map settings while opening the device).
Once the settings have been clarified, the device description (a Json-formatted string) can be passed to the LoadImageFile function of the CVCImg.dll.
For pointers, have a look at the example code found in %CVB%\Tutorial\Hardware\GenICam\VC, namely the VCLoadImageFromDiscovery and VCListDevices might be good entry points.

Hi @illusive,

Thanks or your detailed reply, ill take a look at the examples you have recommended in the coming weeks and get back to you!