Overview tool panel for image displayed in scroll panel
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.
creates an Overview tool for an image displayed in a scroll panel.
hpanel = imoverviewpanel(
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
Add Overview Tool to Scrollable Image
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])
hparent — Handle to figure or uipanel object
Handle to a figure or uipanel object that contains the Overview tool, specified as a handle.
hpanel — Handle to Overview tool
Handle to Overview tool, returned as a handle. An Overview tool is a type of uipanel object.
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.