ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I limit workspace in 2D array graphic representation?

Hello,

I have an 2D array and I would like to visualize it as a 2D grayscale map. What function would be suitable for that? Also, I would like to give user to ability to limit the workspace by encircling the desired area with a mouse and removing the rest. Is it even possible? I know I can set the limitations in numeric controls and just "cut" the sides of my map but can it be done with a mouse?

 

 

0 Kudos
Message 1 of 7
(3,034 Views)

(LabVIEW is a full featured programming envorinment, so everything is possible!)

 

As a display, I would recommend an intensity graph with a greyscale Z color ramp. You can use mouse events to interact with it and dynamically modify the displayed array data.

 

Another possibility would be a picture indicator.

0 Kudos
Message 2 of 7
(3,031 Views)

For some ideas, have a look at this post or this post or anything else in that thread.

 

 

0 Kudos
Message 3 of 7
(3,022 Views)

Sorry if this will be idiotic question: but I don't get this mouse event. How does it really work? 

0 Kudos
Message 4 of 7
(2,973 Views)

Open the example finder and look at e.g. "Draw Graph with Events". See how far you get.

A similar method can also be used for images (example)

0 Kudos
Message 5 of 7
(2,966 Views)

Ok I just can't get one thing straight. On my intensity graph I created 2 cursors. Now I use Cursos Release event, so that I will receive coordinates of my cursos when released. How can I get coordinates of 2 cursors separately? My vi attached.

0 Kudos
Message 6 of 7
(2,946 Views)

Hi,

to read values from both cursors, you need to use the "Active Cursor" property node for the intensity chart and read them sequentially:

 

cursor.png

 

Best regards,

0 Kudos
Message 7 of 7
(2,926 Views)