Major Edit
function playing_with_impoint
imshow('cameraman.tif');
h(1) = impoint;
h(2) = impoint;
addNewPositionCallback(h(1),@mytestcb)
addNewPositionCallback(h(2),@mytestcb)
x(1) = get(h(1),'UIContextMenu');
x(2) = get(h(2),'UIContextMenu');
function mytestcb(pos)
get(gco,'uicontextmenu')==x
end
end
This has to be on the list of cludgiest things I've done but here goes. The IMPOINT and the current object share a 'UIContextMen'. They can thus be linked this way.
Enjoy!
Best Answer