Home > phiwave > @phiw_wvimg > exist_simimg.m

exist_simimg

PURPOSE ^

returns 1 if similar wt image already exists

SYNOPSIS ^

function exf = exist_simimg(obj, fname)

DESCRIPTION ^

 returns 1 if similar wt image already exists
 Similar means - same filename, same wavelet, same scales, same .mat
 and same dimensions

 $Id: exist_simimg.m,v 1.2 2005/06/05 04:42:22 matthewbrett Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function exf = exist_simimg(obj, fname)
0002 % returns 1 if similar wt image already exists
0003 % Similar means - same filename, same wavelet, same scales, same .mat
0004 % and same dimensions
0005 %
0006 % $Id: exist_simimg.m,v 1.2 2005/06/05 04:42:22 matthewbrett Exp $
0007 
0008 if nargin < 2
0009   fname = [];
0010 end
0011 if isempty(fname),fname=wvfname(obj);end
0012 
0013 exf = 0;  
0014 if ~exist(obj.wvol.fname, 'file'), return,end
0015 
0016 tmpobj = phiw_wvimg(obj.wvol.fname,struct('noproc',1));
0017 if isempty(tmpobj), return,end
0018 
0019 exf = obj.wavelet == tmpobj.wavelet & ...
0020       obj.scales == tmpobj.scales & ...
0021       all(obj.wvol.dim(1:3) == tmpobj.wvol.dim(1:3)) & ...
0022       all(obj.wvol.mat(:)==tmpobj.wvol.mat(:));
0023 
0024

Generated on Wed 06-Jul-2005 18:07:21 by m2html © 2003