From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create a 2D color map from an array of numbers

Hi,

I have achieved this same task using the color ramp property of a surface graph, but I think there might be an easier way to do this without using a graph, like creating a color array from the array of numbers and simply wiring that color array to a picture indicator. (I dont need to have a shape created- just a color map)

Thankfully, each row of the 2D array of numbers has a fixed pair of min /max values which can be mapped to the min/max of a color scale. What is not clear to me is how to map that to a color scale such that i get to choose what the min/max color would be, just like a color ramp property node provides the means of doing so. I would also like suggestions on how best to continously read images of a front panel control to a picture indicator and get the best image quality possible considering that the image will be zoomed by a factor of atleast 1.5. I am currently using 24-bit on the pixmap.

 

Also I would be glad to know how to modify the size of an image (not the indicator) such that the height is changed but the width is unchanged. In order words such that I can choose any "aspect ratio" of my choice. The zoom factor property affects both dimensions 

[BADGE NAME]

0 Kudos
Message 1 of 2
(3,225 Views)

Why do you think the use of an intensity graph is hard? Seems easy for this.

 

You could also use a 2D array of frameless color boxes (classic palette).

 

The zoom factor of an image changes the scale of the image. You want to change the size of the image area in pixels. You can remap the original picture to the stretched size using code.

 

Colors have R, G, and B component, so the terms "max/min" need to be more specific.

 

Can you attach some code or a picture to show how things should look like so we get a better idea what you actually want

0 Kudos
Message 2 of 2
(3,205 Views)