impoly on multiple axes

2 views (last 30 days)
Chris
Chris on 10 Mar 2013
Moved: DGM on 29 Dec 2023
I have a gui with 4 axes (ax1..ax4), each containing a grayscale image (handles.image{1:4}).
When I use impoly to draw a ROI in one of the axes, the images in some of the other axes are "covered up" in the background color of the gui. When I delete the ROI, the images in the other axes return.
If impoly is invoked on ax1, all other images are covered. If it is invoked on ax2, no other images are covered. If it is invoked on ax3, only the image in ax2 is covered and if impoly is invoked in ax4, the images in ax2 and ax3 are covered.
Can anyone explain this behavior, and how can i get rid of it?
Thanks very much Chris
Matlab R2012a

Answers (1)

Image Analyst
Image Analyst on 10 Mar 2013
I don't observe that. Can you show your code where you invoked impoly for a particular and the other axes vanished (got replaced by the GUI's background color)?
  3 Comments
Image Analyst
Image Analyst on 11 Mar 2013
Moved: DGM on 29 Dec 2023
I've never used h=impoly(handles.AxesHandle{handles.ROI2D.SelectAxes}) - why can't you do h=impoly(handles.AxesHandle{Target}), since you know what Target is?
What is handles.ROI2D.SelectAxes anyway? ROI2D.SelectAxes is a field of ROI2D but SelectAxes sounds like a method of a class - like a function that is supposed to do something rather than a property.
Chris
Chris on 11 Mar 2013
Moved: DGM on 29 Dec 2023
handles.ROI2D.SelectAxes is just a variable containing the number of the axis where impoly shall be run. It is not a function handle. I also tried to call impoly with the plain axes handle:
h=impoly(handles.Axes1)
but still the images in the other axes disappear. Could it have something to do with the way the image data is managed in the other axes?
handles.ImageHandle{Target}=imshow(image,'Parent',handles.AxesHandle{Target});
and
set(handles.ImageHandle{Target},'CData',Pixel);
By the way, I noticed that the other images do not disappear completely, but a 1 pixel wide vertical line remains at the far right border of the axes. Doesn't make any sense to me.

Sign in to comment.

Categories

Find more on Display Image in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!