imhandles

Get all image handles

Syntax

himage = imhandles(h)

Description

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.

Note

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

Examples

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?