From: Jeremie on
Hi all,

I'm a bit stuck with this problem. If someone's got an idea how to solve it, that would be great.

I'm doing a GUI, where I load a serie of images (several frame acquired at different instant), display one of them, select manually one or several contours (defined by 3 or more points and a spline interpolation) to higlight regions of interest. Once finished I erase the point and display only the contours superposed on the image.
I can move between different frames with a slider, and the contour are still displayed. And each contour has a unique flag DisplayName

At this point I want to be able to change an existing contour, (in case the ROI is not that good).
The idea is to click on a button "Modify ROI", then select with the mouse the contour I want modify, when it will be selected the points which define this profile will be displayed again and available to move. If I know how to recognize the contour I think the rest would be "straightforward"

My problem is to recognise the contour I select by clicking on it with the mouse, I tried

set(gcf,'windowbuttondownfcn','a=get(get(gca,''Children''),''DisplayName'')');

The problem doing that is that the result is a structure containing all the "Displayname" in the current axis (image + the several contours)

Any idea on how to proceed?

Thx
Jeremie