OptrisOptrisDocumentation

Documentation/OTC SDK/Overviewv12.0

Language Bindings

The SDK has five surfaces. One of them is the original, one is the ABI everything else is built on, and three are hand-written bindings over that ABI. This page says which to pick and where each one's documentation is; everything else in this manual describes the C++ surface unless it says otherwise.

Which one to use

Surface What it is Reach for it when
C++: optris::sdk The original. Everything else is downstream of it. You want the lowest latency and the whole surface, and you are already building C++.
C: optris/sdk_c.h A flat C ABI: 689 entry points, every struct carrying its own size. It exists so that languages other than C++ have one stable thing to bind against. Your toolchain can call a C function and nothing more, or you are writing a binding of your own.
C#: Optris.Sdk Hand-written .NET package. async/await, IAsyncEnumerable frame streams, IDisposable handles. A .NET application, especially one with a user interface.
Python: optris_sdk Hand-written, pure ctypes. No compiled extension, no SWIG, no headers. Prototyping, scripting, data science. Not a high frame rate; the GIL is in the way.
Rust: optris-sdk Hand-written, safe crate. Result errors, RAII handles, and pixel lifetimes the compiler checks. You want the frame-lifetime rule enforced rather than documented.

The three bindings are not generated and do not mirror the C++ class layout. Each follows its own language's conventions, so none of them is a transliteration you have to decode.

There is one page per binding and not one guide per binding. Each of those three pages carries what is true of that language and of nothing else: its package or crate, how a handle is released, which calls block, and how errors arrive. Everything about the SDK itself is in the topic chapters, where every sample is shown in all five languages. The C# guide was fourteen pages of its own until 2026-11-09 and is now one, which is what made the five surfaces symmetrical.

Getting each one

Each of the three bindings comes from the package registry of its language. That is the first thing to do in a project of your own.

C#, from nuget.org. The package carries the SDK library, so nothing else needs installing:

dotnet add package Optris.Sdk

Python, from PyPI. The wheel carries the SDK library, so nothing else needs installing:

pip install optris-sdk

Rust, from crates.io. Put both crates into [dependencies] in your Cargo.toml, or run cargo add optris-sdk optris-sdk-sys:

[dependencies]
optris-sdk = "12.0"
optris-sdk-sys = "12.0"

Your code uses optris-sdk; optris-sdk-sys is listed as well so the two versions stay matched and the raw FFI layer is there if you need it. The crates do not carry the SDK library: install the platform package (the .deb, or the Windows installer, from download.optris.com) as well, and on Windows set OPTRIS_SDK_LIB_DIR to its lib folder. Adding it to a project says how the crates find the library on each platform.

C++ and C come with the platform package and nothing else: Installation covers it, and the C# and Python bindings ship inside the platform package as well, for a computer without access to the registries.

Where each one's documentation is

Surface Guide Member-by-member reference
C++ Using the API, and the topic chapters under Specific Topics API Reference (optris::sdk)
C the doc comments in optris/sdk_c.h, which are the C API's reference same
C# The Optris SDK from C#, and every topic chapter, each of which carries a C# sample IntelliSense: the package carries the XML documentation for every public type and member
Python The Optris SDK from Python, and every topic chapter the docstring on every public name: help(optris_sdk.Camera)
Rust The Optris SDK from Rust, and every topic chapter cargo doc --open

Start Developing is how each one is wired into a build of your own.

How complete each one is, measured

These are counted, not claimed. scripts/check_binding_parity.py reads the C header and each binding's source and reports how many of the 689 C entry points each one can reach; scripts/check_binding_exercised.py reports how many of those that binding's own test suite actually calls. Both run on every build.

Binding Entry points reached Exercised by its own tests
Rust 689 of 689 587
Python 684 of 689 608
C# 663 of 689 625

What is in each gap:

Python's five are deliberate, and four of them are structural. optris_sdk_internal_to_celsius, optris_sdk_celsius_to_internal, optris_sdk_celsius_is_encodable and optris_sdk_pixel_is_measured are static inline in the C header, so there is no exported symbol for ctypes to call, in this binding or in any other. Python transcribes all four and pins each transcription against the SDK's own answer. The fifth, optris_sdk_imager_set_recording_callback, is superseded by the recording event callback, which Camera.on_recording() uses. The Python page gives the detail, including the one place a transcription was measurably wrong and what it cost.

C#'s 26 are all deliberate: each is offered another way. Most are initialisers whose job the binding does itself, the same four inline conversions (transcribed in C#), older calls superseded by newer ones the binding uses, and edits to a rule in place, which C# never needs because it builds a fresh rule from the managed one every time. scripts/binding_gap_dotnet.txt names the other way for every one, and the build fails if one is left without a reason. Nothing a C# program needs is missing.

Rust reaches every one. It is the only binding that does.

Examples in every language

Twenty-seven examples across eleven areas, in all five languages (the same twenty-seven, demonstrating the same things in the same order, so they can be read side by side):

Language Where How it runs
C++ examples/cpp/<area>/<name>.cc compiled; also a standalone CMake project a reader can copy
C examples/c/<area>/<name>.c compiled as C99 under -Wall -Wextra -Wpedantic -Werror, which is the standing proof that optris/sdk_c.h really is a C header
C# examples/csharp/<area>/<name>/Program.cs built and run
Python examples/python/<area>/<name>.py run; nothing is compiled, so running them is the only way any of them can be known to work
Rust examples/rust/<area>/<name>.rs compiled as examples of the optris-sdk crate

examples/manifest.txt is the single statement of what the set is, and it marks every language on every row three ways: the example exists, it is planned, or it cannot exist in that binding, and why. A gate compares that file against the tree on every build and fails when they disagree, so "nobody has written the Python one" and "Python cannot express this" cannot be confused for one another, and neither can go quietly missing.

Every example in every language opens a simulated camera when given no argument, and takes an optional serial to use a real one. That is the safe default rather than the convenient one: an example that opens "the first camera found" picks a different camera whenever enumeration order changes, and on a shared machine it takes one somebody else is streaming from.

See Example Applications for what each of the twenty-seven shows.

The older SWIG bindings

Two generated bindings over the version 11 IRImager API still ship, for code that already uses them: the Optris.OtcSdk C# namespace and the optris.otcsdk Python module. They bind a different API and share no namespace with the packages above. The C# one is inside the Optris.Sdk NuGet package, as the assembly Optris.OtcSdk.dll, so one package reference gives a project both.

New applications should not be written against them. If you are moving an existing one, read Migration Guide: v11 to v12, and for the C# case Moving from Optris.OtcSdk at the end of the C# guide.