imoverview

Overview tool for image displayed in scroll panel

Description

Use the imoverview function to create an Overview tool in a new figure window. The Overview tool is a navigation aid when exploring a zoomed-in version of the image.

The Overview tool displays the target image in its entirety, scaled to fit. The tool overlays a rectangle, called the detail rectangle, over the scaled version of the image. The detail rectangle shows the portion of the target image that is currently visible in the scroll panel. To view portions of the image that are not currently visible in the scroll panel, move the detail rectangle in the Overview tool.

example

imoverview(himage) creates an Overview tool associated with the image specified by the handle himage, called the target image.

htool = imoverview(___) returns htool, a handle to the Overview tool figure.

Examples

collapse all

Display an image in a figure. Suppress the standard toolbar and menubar in the figure window because these do not work with the scroll panel.

hFig = figure('Toolbar','none','Menubar','none');
hIm = imshow('foggysf1.jpg');

Create a scroll panel to contain the image. Create an overview tool in a new figure window.

hSP = imscrollpanel(hFig,hIm);
imoverview(hIm)

Get the scroll panel API so that you can control the view programmatically.

api = iptgetapi(hSP);

Set the magnification of the image to 200% by using the scroll panel API function setMagnification. Notice how the detail rectangle of the overview tool shrinks because a smaller portion of the image is displayed.

api = iptgetapi(hSP);
api.setMagnification(2);

Input Arguments

collapse all

Handle to image, specified as a handle. The image must be displayed in a scroll panel created by imscrollpanel.

Output Arguments

collapse all

Handle to Overview tool figure, returned as a handle.

Tips

  • To create an Overview tool that can be embedded in an existing figure or uipanel object, use imoverviewpanel.

Introduced before R2006a