I'm new to Igor. I'd like to draw two circles on a graph using drawing tool and calculate the distance between the two centers (in mm). How can I
1. get coordinates after user resize/reposition the circles.
2. derive the distance in mm (graph can be resized).
To do this, you first need to devise a means of calibrating the relationship between physical size on the screen and screen pixels. Assuming absolute physical distance is what you are after. Typically the logical resolution of the screen, 72 pixels per inch on Mac, 96 on Windows, is not real.
In a graph, you can determine the size of the window using GetWindow with the gsize and/or gsizeDC keyword.
In the drawing, you can use DrawAction to read back the commands for the objects and can then parse the values. You should set the coordinate system for the drawing to absolute so that the readback values will be in Points to which you can the apply your calibration factor.
For more on this, you will need to execute the following and read the provided documentation.
DisplayHelpTopic "GetWindow"
DisplayHelpTopic "DrawAction"
October 24, 2011 at 10:25 am - Permalink
In a graph, you can determine the size of the window using GetWindow with the gsize and/or gsizeDC keyword.
In the drawing, you can use DrawAction to read back the commands for the objects and can then parse the values. You should set the coordinate system for the drawing to absolute so that the readback values will be in Points to which you can the apply your calibration factor.
For more on this, you will need to execute the following and read the provided documentation.
DisplayHelpTopic "GetWindow"
DisplayHelpTopic "DrawAction"
October 28, 2011 at 02:38 pm - Permalink