The clara.viz.core.Renderer class consumes the DataDefinition object and produces, after rendering, images or video streams. It also exposes ways to query and set rendering properties such as camera settings, lighting properties or material properties (transfer functions).


For the renderer to work three things needs to be provided

  • what to render

  • how to render it

  • where to send the rendered images

What to render

The DataDefinition class provides an easy way to specify input data used by the renderer. The clara.viz.core.Renderer.set_arrays() function can also be used if absolute flexibilty and control on how data is provided is required.

How to render

The render settings are organized as a dictonary and can be

Where to send the rendered images

The renderer can generate still images or video streams.

To create a still image call the clara.viz.core.Renderer.render_image() function. The output of this call is either raw RGB/depth data or a JPEG encoded image.

For rendering to a video stream call the clara.viz.core.Renderer.create_video_stream(). The call takes a callback function which is called when new video data is produced. The call also returns a clara.viz.core.VideoStream object which can be used to configure the video stream (width, height, frame rate and bit rate) and to start/pause/stop the stream.