Clara Holoviz is a SDK used by Clara Holoscan for visualizing data. Clara Holoviz composites real time streams of frames with multiple different other layers like segmentation mask layers, geometry layers and GUI layers.
For maximum performance Clara Holoviz makes use of Vulkan, which is already installed as part of the Nvidia driver.
Clara Holoviz uses the concept of the immediate mode design pattern for its API, inspired by the Dear ImGui library. The difference to the retained mode, for which most APIs are designed for, is, that there are no objects created and stored by the application. This makes it easy to quickly build and change an Clara Holoviz app.
The code below creates a window and displays an image.
namespace viz = clara::holoviz; viz::Init("Holoviz Example"); viz::Begin(); viz::BeginImageLayer(); viz::ImageHost(width, height, viz::ImageFormat::R8G8B8A8_UNORM, image_data); viz::EndLayer(); viz::End();
Fig. 15 Holoviz example app
The core entity of Clara Holoviz are layers. A layer is a two-dimensional image object, multiple layers are composited to form the final output.
These layer types are supported by Clara HoloViz:
Layers have opacity and priority. The priority determines the rendering order of the layers. Opacity is used to blend transparent layers over other layers.