Hi, Friends,
I wonder is it possible to display a grey image as a pseudo color image based on value of pixel?
Thank you very much.
Baoxi
Hi, Friends,
I wonder is it possible to display a grey image as a pseudo color image based on value of pixel?
Thank you very much.
Baoxi
Hi,
Yes, you can use a LUT to translate grey values into pseudo 24bit color in VA.
I would recommend to get the colormap from numpy/matplotlib as text file.
Within VA simulation you can directly use color map feature in simulation probe.
You only need to enable "color map".
Best regards,
Thank you very much, Ru. I will try it.
Best regards,
Baoxi
Dear Ru,
Just got time to try it.
You mean that only I get "Color map" first, then I can translate grey values into pseudo 24bit color in VA, right? I did not find any operator in VA with such function.
Thanks and best regards,
Baoxi
Dear Baoxi,
Here you can see how to convert monochrome to false color RGB representation color map 'VIRIDIS' as VA data stream:
Here you can find corresponding VA file: ColorMap.va
It is using color map 'VIRIDIS' as target.
Here you can find common color maps as RGB values (one file per component) in text files that can be loaded into LUT operator by file interface: ColoMaps_As_RGB_txts.zip
Related to each 24bit/RGB888 color map you can find 3 txt files in the ZIP subfolder.
One *_R.txt for the 8bit red component, *._G.txt representing green and *._B.txt for blue.
Each includes 256 different 8 bit values [0..255].
Within the LUT operator you can find a "File" button for loading the values from text file; one value per line.
Here you have an overview of colormaps that are taken from matplotlib 3.4.2 (https://matplotlib.org/stable/…s.html?highlight=colormap)
and some extra ones:
Most of these colormaps can be chosen within VA simulation probes:
pasted-from-clipboard.png
Best regards,
Thank you so much, Ru.
I was busy in other modeling and did not come in the forum.
I will try your solution.
Thanks and best regards,