Home > SaliencyToolbox > displayImage.m

displayImage

PURPOSE ^

displayImage - displays an image in a convenient way in the current axes.

SYNOPSIS ^

function displayImage(img,doNormalize)

DESCRIPTION ^

 displayImage - displays an image in a convenient way in the current axes.

 displayImage(img) - displays image in the current axis (wrapper for imshow)
    img can be of any numerical type or a logical, and it
        must have two (gray-scale) or three (RGB) dimensions.
    img can be an Image structure (see initializeImage).
    The image is scaled appropriately.

 displayImage(img,doNormalize)
    If doNormalize is 1, the image is maximum-normalized 
    (default: 0).

 See also displayMap, displayMaps, showImage, initializeImage, dataStructures.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % displayImage - displays an image in a convenient way in the current axes.
0002 %
0003 % displayImage(img) - displays image in the current axis (wrapper for imshow)
0004 %    img can be of any numerical type or a logical, and it
0005 %        must have two (gray-scale) or three (RGB) dimensions.
0006 %    img can be an Image structure (see initializeImage).
0007 %    The image is scaled appropriately.
0008 %
0009 % displayImage(img,doNormalize)
0010 %    If doNormalize is 1, the image is maximum-normalized
0011 %    (default: 0).
0012 %
0013 % See also displayMap, displayMaps, showImage, initializeImage, dataStructures.
0014 
0015 % This file is part of the SaliencyToolbox - Copyright (C) 2006-2013
0016 % by Dirk B. Walther and the California Institute of Technology.
0017 % See the enclosed LICENSE.TXT document for the license agreement.
0018 % More information about this project is available at:
0019 % http://www.saliencytoolbox.net
0020 
0021 function displayImage(img,doNormalize)
0022 
0023 if (nargin < 2)
0024   doNormalize = 0;
0025 end
0026 
0027 if (isa(img,'struct'))
0028   displayImage(loadImage(img),doNormalize);
0029   return;
0030 end
0031 
0032 if doNormalize
0033   imshow(img,[]);
0034 else
0035   imshow(img);
0036 end
0037 axis image;

Generated on Thu 18-Jul-2013 06:10:46 by m2html © 2005