Nothing nice and conveniently built-in like that. But here's a function based on the WaveMetrics procedure file Graph Utility Procs that will get that information:
#include<Graph Utility Procs>
Function cursorLayer(graphname, csrname) String graphname, csrname
Function cursorLayer(graphname, csrname)
String graphname, csrname
if (strlen(graphname) == 0)
graphname = winName(0,1)
endif
String info = CsrInfo($csrname, graphname)
if (strlen(info) == 0)
return NAN
endif
String tracename = StringByKey("TNAME", info)
info = ImageInfo(graphname, tracename,0)
if (strlen(info) == 0)
return NAN
endif
String planestr = WMGetRECREATIONInfoByKey("plane", info)
Variable value = strlen(planestr) == 0 ? NAN : str2num(planestr)
return value
end
An example:
display;appendimage junk
ModifyImage junk plane= 4
ShowInfo
At this point, drag the A (round) cursor onto the image. Now:
4
print cursorlayer("", "b")
NaN
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
October 31, 2013 at 09:32 am - Permalink