LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

partion an image into parts

hi
 
  does anyone have any ideas on how to split a single image into multiple parts and making each part a control. All I need to do is show a single image on the front panel and capture the event depending on which part of the image the user clicked.
0 Kudos
Message 1 of 3
(2,681 Views)

Just create a "mouse down" event for the picture and read the coordinates.

From the coordinates you could then determine the target area (e.g. index into a 2D array lookup table etc.)

Message 2 of 3
(2,674 Views)

If you're using a Mouse Down event for the picture (assuming you use a picture control), then on the left side of the event structures you should have some terminals providing event data. One of these is Coords which returns the coordinates of the click which you can use to determine which part was clicked on.

Note that the coords are VI coords, so you will have to use a property node for the control to get its position on the FP and substract that from the coords. You can do the same if you have a decoration, but to get a reference to it, you will have to go through the front panel and getting a reference to a control is easier.


___________________
Try to take over the world!
Message 3 of 3
(2,672 Views)