LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

HELP: How can I change the color map of an intensity graph to gray scale!!?

The default is from black to white with blue color in between. I am trying to disply an aquired image from a scanning electron microscope and I need use gray scale only (from black to white in range, no ant other color presented).

I am waiting for you great help now. Thank you.

Rgds,
CharlieSmiley Surprised
0 Kudos
Message 1 of 18
(13,458 Views)
Hi Charlie,

use the property "ZScale.MarkerVals" to set just two colors (black and white). Don't forget to switch on color interpolation...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 18
(13,455 Views)
Hi GerdW,

THANKS for your post.

I've tried to use the property node method as you advised according to this link http://digital.ni.com/public.nsf/allkb/1ADFF221E27F5B5886256E6F007C7B58?OpenDocument

I am still trying because I am not very sure about the following and I will appreciate it very much if you can give some explaniation both on the following and you previous post "set just two colors (black and white). Don't forget to switch on color interpolation... Thank you.

6. In the created array constant, enter the marker number of each marker in the upper box.
7. Right-click on the lower box and choose Replace >> All Functions >> Numeric >> Additional Numeric Constants >> Color Box Constant. Note: For LabVIEW 8.0 and above, right click on the lower box and choose Replace >> Programming >> Dialog & User Interface>> Color Box Constant.
8
.Click on each color box to change the color of that marker number.
0 Kudos
Message 3 of 18
(13,443 Views)
Alternatively, on the front panel, you could right click on the middle number and choose "delete marker"
Message 4 of 18
(13,441 Views)
Many thanks to effOverton.

I solved the problem within 1s~~!!! Great~Smiley Happy

Great appreciation to
GerdW too~! I've learned a lot from your advice~Smiley Happy


Rgds,

Charlie
0 Kudos
Message 5 of 18
(13,436 Views)
Hi applesilk,

ZScale.MarkerVals needs an array of cluster containing a number (z-value) and a color (U32 value).
To allow easier input of the color value you can replace the default U32 constant by a colorbox (as described in your link/last post) or when you're familiar with hex notation of RGB values switch the u32 constant to hex display, 8 digits, zeros to the left. Smiley Wink

You need to make two entries: ([0, 0x0000.0000], [1,0x00FF.FFFF]), i.e. black and white respectively.
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 18
(13,435 Views)
Thanks GerdW~Smiley Happy

My problem has been solved.

Rgds,
Charlie
0 Kudos
Message 7 of 18
(13,433 Views)

Great tip, thanks! I was becoming totally infuriated by this and the help wasn't really any help at all.

0 Kudos
Message 8 of 18
(12,272 Views)

It helps thanks!

However, the intensity scale is now normlized to 1. How do I make it so it is the absolute value (i.e the pixel with the max value)?  Also how do pass a gray scale color map for the for the "flatten pixmap.vi" in order to save my image by the "Write Bmp File.vi"? how do I pass grayscale to the "color" array pointed by the arrow in the pic attached?

thanks!

0 Kudos
Message 9 of 18
(11,362 Views)

Use a FOR loop with 256 iterations and create an array of grayscale colors (R=G=B), i.e.

 

x00000000, x00010101, x00020202, .... x00FFFFFF. Do you need help with that?

Message 10 of 18
(11,358 Views)