This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

imoverviewpanel

Overview tool panel for image displayed in scroll panel

Use the imoverviewpanel function to add an Overview tool to the same figure as an image contained in a scroll panel. 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.

Syntax

hpanel = imoverviewpanel(hparent,himage)

Description

example

hpanel = imoverviewpanel(hparent,himage) creates an Overview tool for an image displayed in a scroll panel. himage is a handle to the target image in the scroll panel. hparent is the handle to the figure or uipanel object that will contain the Overview tool. hpanel is the handle to the Overview tool.

Examples

collapse all

Display an image in a figure. The example suppresses 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. Set the size and position of the scroll panel so that the image occupies the top half of the figure window.

hSP = imscrollpanel(hFig,hIm);
set(hSP,'Units','normalized','Position',[0 .5 1 .5])

Add an overview tool to the figure. Set the size and position of the overview tool to occupy the bottom half of the figure window.

To explore details of the displayed image, try dragging the detail rectangle over the overview tool.

hOvPanel = imoverviewpanel(hFig,hIm);
set(hOvPanel,'Units','Normalized','Position',[0 0 1 .5])

Input Arguments

collapse all

Handle to a figure or uipanel object that contains the Overview tool, specified as a handle.

Handle to target 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, returned as a handle. An Overview tool is a type of uipanel object.

Tips

  • To create an Overview tool in a separate figure window, use imoverview. When created using imoverview, the Overview tool includes zoom-in and zoom-out buttons.

Introduced before R2006a