I want to inspect interactively an image by selecting points by the mouse pointer. This is easily done by LocatorPane
- here is a simplified example:
plot = ListPlot[{{1, 1}}];
Manipulate[
x = Dynamic[First[pt]];
LocatorPane[Dynamic[pt],
Show[plot, Epilog -> {Red, PointSize[Large], Point[Dynamic[pt]],
Text[Style[StringForm["x = `1`", x], Blue, 20], {1, 1.5}]}]],
{{pt, {0, 0}}, None}
]
Now imagine that for a selected point I would like to get the numerical value of the x-coordinate. I would like to calculate a function of it (like divide by 3) and/or save its numerical value to an external data file. This does not work because the x is a dynamical object. How to extract the current numerical value of x? In addition to solving this particular problem I would like to understand better how does Dynamic really work.