01-23-2006 09:30 AM
02-07-2006 10:53 AM
Hi,
since you're using an intensity graph, you could use an event structure to capture for the mouse down and mouse up events.
They both give you the coords of where the mouse was. The nex trick would be to convert that into array position co-ordinates, which requires knowing how the data is presented in the graph (actual graph area size, and the amount of data passed to it.) It's easy enough to get the size of the plot area, and you can get the position of the control itself, however calculating exactly where the plot area is inside of the control is not available.
If you plot area size is fixed, you could use a picture control, set to transparent over the top of the plot area. Then use the same trick for the event returning co-ordinates. If you change the values on the scale however, the actual plot area can change in size too (since the renumbering on an auto-scale can cause the scale on the axis to move if the text increases or decreases in length)
By far the easiest route would be to buy the vision development module and use the image control which has the built in ROI capabilities (and editing of the ROI).
Hope that helps
Sacha Emery
National Instruments (UK)
11-21-2006 04:32 PM
11-21-2006 07:22 PM