Skip to content
Snippets Groups Projects
Commit 065f4005 authored by Rainer Kartmann's avatar Rainer Kartmann
Browse files

Send an image with content

parent 49b27ef5
No related branches found
No related tags found
2 merge requests!120armem/dev,!111Resolve "Show images in ArMemMemoryViewer"
......@@ -22,6 +22,8 @@
#include "ArMemExampleClient.h"
#include <SimoxUtility/color/cmaps.h>
#include <ArmarXCore/core/exceptions/local/ExpressionException.h>
#include <ArmarXCore/core/time/CycleUtil.h>
......@@ -379,6 +381,23 @@ namespace armarx
{ "three", 3 },
};
{
CByteImage& image = *data.the_ivt_image;
image.Set(20, 10, CByteImage::ImageType::eRGB24);
simox::ColorMap cmap = simox::color::cmaps::plasma();
cmap.set_vmax(image.width + image.height);
for (int row = 0; row < image.height; ++row)
{
for (int col = 0; col < image.width; ++col)
{
simox::Color color = cmap(row + col);
unsigned char* p = &image.pixels[(row * image.width + col) * image.bytesPerPixel];
p[0] = color.r;
p[1] = color.g;
p[2] = color.b;
}
}
}
update.instancesData = { data.toAron() };
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment