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: 

How to define "User defined" palette in IMAQ Display?

Solved!
Go to solution

When I select the "User defined" palette in the display, it just shows the regular grayscale palette.  I want to replace this with the "Rainbow" palette but slightly modified in range.  How do I do this?

 

Thanks!

MK

0 Kudos
Message 1 of 4
(3,947 Views)
Solution
Accepted by topic author mk@opc

Wire a new 256-element array of RGBs to the User Palette property of your image window.  You can use IMAQ GetPalette to retrieve the Rainbow palette and modify that.

 

User Palette

Message 2 of 4
(3,929 Views)

Thanks Greg, I will try that, looks like that's the ticket! 🙂

 

Also, something I haven't been able to figure out yet is how to find (let LabView create?) the enumerated lists that match up to whatever port needs it (in this case "Palette Type").  i've tried wiring up a blank enum but it doesn't get filled out, where can I find them or create them (without having to make them manually?)

 

Thanks again 🙂

0 Kudos
Message 3 of 4
(3,901 Views)
Solution
Accepted by topic author mk@opc

Right-click on Palette Type and select Create Constant (or Control).

Message 4 of 4
(3,890 Views)