Home > SaliencyToolbox > displayMap.m

displayMap

PURPOSE ^

displayMap - displays a map in the current axes.

SYNOPSIS ^

function displayMap(map,varargin)

DESCRIPTION ^

 displayMap - displays a map in the current axes.

 displayMap(map)
    Display map in the current axes object.

 displayMap(map,normalizeFlag)
    If normalizeFlag is 1, the map is maximum-normalized,
    if it is 2, then the map is max-normalized and scaled
    to the dimensions of map.origImage (default: 0 - no normalization).

 See also displayMaps, displayPyramid, dataStructures, showImage.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % displayMap - displays a map in the current axes.
0002 %
0003 % displayMap(map)
0004 %    Display map in the current axes object.
0005 %
0006 % displayMap(map,normalizeFlag)
0007 %    If normalizeFlag is 1, the map is maximum-normalized,
0008 %    if it is 2, then the map is max-normalized and scaled
0009 %    to the dimensions of map.origImage (default: 0 - no normalization).
0010 %
0011 % See also displayMaps, displayPyramid, dataStructures, showImage.
0012 
0013 % This file is part of the SaliencyToolbox - Copyright (C) 2006-2013
0014 % by Dirk B. Walther and the California Institute of Technology.
0015 % See the enclosed LICENSE.TXT document for the license agreement.
0016 % More information about this project is available at:
0017 % http://www.saliencytoolbox.net
0018 
0019 function displayMap(map,varargin)
0020 
0021 if isempty(varargin)
0022   normalizeFlag = 0;
0023 else
0024   normalizeFlag = varargin{1};
0025 end
0026 
0027 if isstruct(map)
0028   img = map.data;
0029   if (normalizeFlag == 2)
0030     img = imresize(img,map.origImage.size(1:2),'bilinear');
0031   end
0032 else
0033   img = map;
0034 end
0035 
0036 if (normalizeFlag >= 1)
0037   img = 255*mat2gray(img);
0038 end
0039 
0040 image(img);
0041 colormap(gray(255));
0042 axis image;
0043 
0044 if isstruct(map)
0045   title(map.label);
0046 end

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