02-03-2012 04:41 AM
I use a microscope that scans atoms on a surface and I want to write a VI that gives me the coordinates of an atom when I click on the scanned image with the mouse. I use LabVIEW 8.20 (I understand newer versions of LabVIEW come with some mouse functions, but if possible I´d like to do it with the 8.20 version). Does anyone have a solution for reading the mouse coordinates on an image? Also, I´d like to make a VI that actually finds the center of the atom by looking for the maximum around the point where I click (this would give a better estimate of the atom location than s simple mouse click). Any help is appreciated.
02-03-2012 05:11 AM
You could use event structure as shown in the attached VI(developed on LabVIEW 8). Please note, co-ordinates are with respect to panel origin and since I have coincided my picture control with the panel orgin hence in the VI you will get absolute coordinates.
How are you planning to load the image in LabVIEW ?
Regards
Javed
02-03-2012 05:54 AM
Hi Javed, this is useful, however I will also need to automatically read the coordinates - that is, click with the mouse on a point in the image, and then upload the coordinates of that point (to an array for instance - I will have to do this for several points). I´m not sure how I will load the image to LabVIEW, the factory software saves images in an ¨sxm¨ format, I suppose I will have to convert it somehow.
02-03-2012 06:07 AM
I suggest you explore the "event structure". There is a Mouse Down event which will fire whenever you click on the picture. The co-ordinates obtained will be specify where the Mouse was clicked.
(don't forget to mark Kudos if you found the post helpful )
Regards
Javed