iVS3D v2.0.0
Loading...
Searching...
No Matches
map.cpp File Reference

Example usage of the Tensor class to create a 2D tensor and map its values to colors. More...

#include <Tensor.h>
#include <iostream>
#include <vector>
#include <string>
#include <array>

Detailed Description

Example usage of the Tensor class to create a 2D tensor and map its values to colors.

This example demonstrates how to create a 2D tensor with integer data, map its values to RGB colors based on whether they are even or odd, and print the resulting colorized tensor. The mapping function assigns red (255,0,0) for even numbers and green (0,255,0) for odd numbers.

Author
Dominik Wüst (domin.nosp@m.ik.w.nosp@m.uest@.nosp@m.iosb.nosp@m..frau.nosp@m.nhof.nosp@m.er.de)
Date
May 2025