LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Standard color table for intensity graph

Solved!
Go to solution

Hi all,

 

I am trying to change the color table of an intensity graph to some standard color tables, such as "rainbow", "gray-scale", "seismic", "lava waves", "hot metal", "purple haze" , etc. I can find "rainbow" and "gray-scale" somewhere from the examples, but not the others. I tried to generate those color tables myself using the example "...examples\general\graphs\intgraph.llb\Create IntGraph Color Table.vi, but the result was far from good.

 

Anyone can teach me how to generate those color tables? Thank you in advance.

 

Color tables.JPG

 

 

Regards,

Julianti

0 Kudos
Message 1 of 7
(12,435 Views)

Hi Julianti,

 

those color tables can be provided in two ways:

- define an array of 256 colors and wire it to the "colortable" property of the IntGraph. The first and the last color will be used for under- and overrange, respectively.

- define an array of marker values (value, color) and wire it to the "Marker Values[]" property of the graph. Here you can define less than 256 values, and you can make nice color ramps easily by enabling "Interpolate Colors"...

 

And be warned: there used to be an error/bug in older LV versions when both methods were used in a mixed way...

Message Edited by GerdW on 06-08-2010 04:16 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(12,422 Views)

Hi GerdW,

 

Thanks for your ideas. I tried your second idea, it works for simple color tables such as the "seismic" and "hot metal". However, for those complex one such as "lava waves", it will be really headache. Is there a simpler method such as import from a picture? 

 

 

Regards,

Julianti

0 Kudos
Message 3 of 7
(12,412 Views)

Hi Julianti,

 

I used to import my colortables from other programs I was using (like visualization progs of REM or SAM devices). Other sources are older paint-like programs which often worked with just a 256 color table...

 

But well, what's the problem to load a picture using the LV picture file functions to get the colortable from such a picture? Have you ever tried to?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 7
(12,398 Views)

Hi Julianti,

 

here's the context help for "Read PNG File". Read the part on the "image data" contents! (And I would suggest to use 8 bit images for your purpose...)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 7
(12,383 Views)
Solution
Accepted by topic author Julianti Sam

Hi GerdW,

 

I am not sure the exact way of doing it, but I made a simple vi based on your idea. The vi can extract the color table I want in array format, provided that I load the bitmap file containing only the color scale. Some color table array constants are included in the VI for those who need them. Please see the attachments and give me your comment.

 

 

Regards,

Julianti

 

Message 6 of 7
(12,368 Views)

Hi all,

 

As I am using those color table array constants generated using the vi attached in the previous post, and seems there will be no more discussion about it, I will accept the vi as the solution. Hope that those color tables are useful to you too.

 

regards,

Julianti

Message 7 of 7
(12,336 Views)