displayPyramid - displays a pyramid in a new figure. displayPyramid(pyr) Displays all levels of pyr in a new figure. displayPyramid(pyr,normalizeFlag) If normalizeFlag is 1, the maps are maximum-normalized, if it is 2, then the maps are max-normalized and scaled to the dimensions of map.origImage (default: 0). See also displayMap, displayMaps, dataStructures, showImage.
0001 % displayPyramid - displays a pyramid in a new figure. 0002 % 0003 % displayPyramid(pyr) 0004 % Displays all levels of pyr in a new figure. 0005 % 0006 % displayPyramid(pyr,normalizeFlag) 0007 % If normalizeFlag is 1, the maps are maximum-normalized, 0008 % if it is 2, then the maps are max-normalized and scaled 0009 % to the dimensions of map.origImage (default: 0). 0010 % 0011 % See also displayMap, displayMaps, dataStructures, showImage. 0012 0013 % This file is part of the SaliencyToolbox - Copyright (C) 2006-2007 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 displayPyramid(pyr,varargin) 0020 0021 margin = 0.001; 0022 0023 if isempty(varargin) 0024 normalizeFlag = 0; 0025 else 0026 normalizeFlag = varargin{1}; 0027 end 0028 0029 figure('NumberTitle','off','Name',pyr.label); 0030 0031 for l = 1:length(pyr.levels) 0032 if (l == 1) 0033 axes('position',[0,0+margin,2/3-margin,1-margin]); 0034 else 0035 f = 0.5^(l-1); 0036 axes('position',[2/3,f+margin,f*2/3-margin,f-margin]); 0037 end 0038 displayMap(pyr.levels(l),normalizeFlag); 0039 axis off; 0040 end 0041 0042