Image Processing Toolbox User's Guide |
Display image in the Image Tool
Syntax
imtool
imtool(I)
imtool(I,[LOW HIGH])
imtool(RGB)
imtool(BW)
imtool(X,map)
imtool(filename)
hfig = imtool(...)
imtool close all
imtool(...,param1,val1,param2,val2,...
)
Description
opens a new Image Tool in an empty state. Use the File menu options Open or Import from Workspace to choose an image for display.imtool
imtool(I)
displays the intensity image I
.
imtool(I,[LOW HIGH])
displays I
as a grayscale intensity image, specifying the display range for I
. The value LOW
(and any value less than LOW
) is displayed as black, the value HIGH
(and any value greater than HIGH
) is displayed as white. Values in between are displayed as intermediate shades of gray. imtool
uses the default number of gray levels. If you use an empty matrix ([]
) for [LOW HIGH]
, imtool
uses [min(I(:)) max(I(:))]
; the minimum value in I
is displayed as black, and the maximum value is displayed as white.
imtool(RGB)
displays the truecolor image RGB
.
imtool(BW)
displays the binary image BW
. Values of 0 is displayed as black, and values of 1 is displayed as white.
imtool(X,map)
displays the indexed image X
with colormap map
.
imtool(filename)
displays the image contained in the graphics file filename
. The file must contain an image that can be read by imread
or dicomread
. imtool
calls imread
or dicomread
to read the image from the file, but the image data is not stored in the MATLAB workspace. If the file contains multiple images, the first one is displayed. The file must be in the current directory or on the MATLAB path.
hfig = imtool(...)
returns a handle Hfig
to the figure created by imtool
. close(Hfig)
closes the image tool.
imtool close all
closes all image tools.
imtool(...,
param1,val1,param2,val2,...)
displays the image, specifying parameters and corresponding values that control various aspects of the image display. The following table lists all imshow
parameters. Parameter names can be abbreviated, and case does not matter.
Class Support
A truecolor image can be uint8
, uint16
, double
, or single
. An indexed image can be logical
, uint8
, double
, or single
. An intensity image can be logical
, uint8
, double
, single
, int16
, or uint16
. The input image must be nonsparse.
Related Toolbox Preferences
You can use the iptsetpref
function to set the following toolbox preference that modifies the behavior of imtool
.
'ImtoolInitialMagnification'
controls the initial magnification for image display, unless you override it in a particular call by specifying imtool(...,'InitialMagnification',initial_mag)
.
For more information about these preferences, see the reference entry for iptsetpref
.
Remarks
imshow
is the toolbox's fundamental image display function, optimizing figure, axes, and image object property settings for image display. imtool
provides all the image display capabilities of imshow
but also provides access to several other tools for navigating and exploring images, such as the Pixel Region tool, Image Information tool, and the Adjust Contrast tool. imtool
presents an integrated environment for displaying images and performing some common image processing tasks.
Examples
Display an intensity image, adjusting the display range.
See Also
getimage
, imageinfo
, imcontrast
, imdisplayrange
, imgetfile
, imoverview
, impixelinfo
, impixelregion
, imread
, imshow
, iptgetpref
, ipticondir
, iptsetpref
, iptwindowalign
imsubtract | imtophat |
© 1994-2005 The MathWorks, Inc.