Thermal Camera SDK 11.3.0
SDK for Optris Thermal Cameras
Loading...
Searching...
No Matches
Sdk.h
Go to the documentation of this file.
1// Copyright (c) 2008-2026 Optris GmbH & Co. KG
2
11
12#pragma once
13
14#include <array>
15#include <cstdint>
16#include <string>
17#include <vector>
18
19#include "otcsdk/Api.h"
21
22
24namespace optris
25{
26
28enum class Verbosity
29{
30 Off = 1,
31 Error = 2,
32 Warning = 3,
33 Info = 4,
34 Debug = 5,
35};
36
45
46
48class Sdk
49{
50public:
52 Sdk() = delete;
53
54
67 OTC_SDK_API static void init(Verbosity logScreen,
68 Verbosity logFile,
69 std::string logFilenamePrefix = "",
70 std::string customDataDirectory = "");
71
82 OTC_SDK_API static void configureLogger(Verbosity logScreen, Verbosity logFile, std::string logFilenamePrefix = "");
83
84
91 using LogCallback = void(OTC_SDK_C_CALL*)(int verbosityLevel, const char* message);
92
99 OTC_SDK_API static void setLogCallback(LogCallback callback, bool exclusive = false);
100
101
125 OTC_SDK_API static void setCustomDataDirectory(const std::string& customDataDirectory);
126
138
160
175 OTC_SDK_API static void setCalibrationFileSourceDirectory(const std::string& sourceDirectory);
176
183
190
191
203
221 OTC_SDK_API static void loadPalettes(const std::string& directory);
222
228 OTC_SDK_API static std::vector<std::string> getPaletteNames();
229
241 OTC_SDK_API static std::vector<std::array<uint8_t, 3>> getPaletteColors(const std::string& name);
242
253 OTC_SDK_API static void registerPalette(const std::string& name,
254 const std::vector<std::array<uint8_t, 3>>& colors);
255
266 OTC_SDK_API static void savePalette(const std::string& name);
267};
268
269} // namespace optris
Contains defines controlling the Windows DLL export and import of symbols.
#define OTC_SDK_API
Only needed when working with Windows DLLs.
Definition Api.h:65
#define OTC_SDK_C_CALL
Only needed when working with Windows DLLs.
Definition Api.h:69
Contains a class encapsulating version and build information about the SDK.
static OTC_SDK_API void init(Verbosity logScreen, Verbosity logFile, std::string logFilenamePrefix="", std::string customDataDirectory="")
Initializes the SDK.
static OTC_SDK_API void savePalette(const std::string &name)
Saves a registered palette as a CSV file in the user palette directory.
static OTC_SDK_API void setCalibrationFileSourceDirectory(const std::string &sourceDirectory)
Sets the source directory from which calibration files can be copied.
static OTC_SDK_API void setLogCallback(LogCallback callback, bool exclusive=false)
Sets a callback that receives SDK log messages.
static OTC_SDK_API void setCustomDataDirectory(const std::string &customDataDirectory)
Sets a custom data directory for the SDK to use.
static OTC_SDK_API void clearCalibrationFileSourceDirectory()
Clears a previously set source directory for calibration files.
static OTC_SDK_API std::vector< std::array< uint8_t, 3 > > getPaletteColors(const std::string &name)
Returns the 240 RGB color entries of the named palette.
static OTC_SDK_API void configureLogger(Verbosity logScreen, Verbosity logFile, std::string logFilenamePrefix="")
Configures the SDK internal logger.
static OTC_SDK_API void clearCustomDataDirectory()
Clears a previously set custom data directory for the SDK.
static OTC_SDK_API std::vector< std::string > getPaletteNames()
Returns the names of all currently loaded palettes in sorted order.
void(OTC_SDK_C_CALL *)(int verbosityLevel, const char *message) LogCallback
Callback function type for receiving SDK log messages.
Definition Sdk.h:91
static OTC_SDK_API void loadPalettes()
Loads palettes from the SDK and user palette directories.
static OTC_SDK_API void loadPalettes(const std::string &directory)
Loads palettes from a custom directory.
static OTC_SDK_API void registerPalette(const std::string &name, const std::vector< std::array< uint8_t, 3 > > &colors)
Registers a palette at runtime without persisting it to disk.
Sdk()=delete
No constructor.
static OTC_SDK_API bool setCalibrationFileSources(CalibrationFileSource first, CalibrationFileSource second, CalibrationFileSource third)
Sets the priority of the calibration file sources.
static OTC_SDK_API VersionInfo getVersionInfo()
Returns an object holding version and build information about the SDK.
Encapsulates version and build information about the SDK.
Definition VersionInfo.h:28
Main SDK namespace.
Definition AlarmChannel.h:21
CalibrationFileSource
Represents the different sources from which the calibration files can be acquired.
Definition Sdk.h:39
@ Filesystem
The calibration files are copied from a local filesystem directory.
Definition Sdk.h:41
@ Internet
The calibration files are downloaded from Optris servers. Requires internet access.
Definition Sdk.h:42
@ Empty
No calibration source wanted.
Definition Sdk.h:43
@ Device
The calibration files are fetched from the on-board memory of the device. Not supported by all device...
Definition Sdk.h:40
@ Error
Flag is in an error state.
Definition FlagState.h:38
Verbosity
Represents the different logging verbosity levels.
Definition Sdk.h:29
@ Warning
Warning.
Definition Sdk.h:32
@ Info
Info.
Definition Sdk.h:33
@ Debug
Debug.
Definition Sdk.h:34
@ Off
Deactivated.
Definition RdcMode.h:26