Get all image handles


himage = imhandles(h)


himage = imhandles(h) takes a graphics handle h as an input and returns all of the image handles whose ancestor is h. h can be an array of valid figure, axes, image, or uipanel handles.

himage is an array of image handles.

imhandles ignores colorbars in h and does not include its handle in himage.


imhandles errors if the image objects in himage do not have the same figure as their parent.


Return the handle to the image object in the current axes.

figure, imshow('moon.tif');
himage = imhandles(gca)

Display two images in a figure and uses imhandles to get handles to both of the image objects in the figure.

subplot(1,2,1), imshow('autumn.tif');
subplot(1,2,2), imshow('glass.png');
himages = imhandles(gcf)

See Also


Was this topic helpful?