return wvol output filename $Id: wvfname.m,v 1.5 2005/06/05 04:42:22 matthewbrett Exp $
0001 function fname = wvfname(obj) 0002 % return wvol output filename 0003 % 0004 % $Id: wvfname.m,v 1.5 2005/06/05 04:42:22 matthewbrett Exp $ 0005 0006 if prod(size(obj)) > 1, fname = 'object array'; return, end 0007 0008 % try wvol fname first 0009 fname = mars_struct('getifthere', obj.wvol, 'fname'); 0010 if isempty(fname) 0011 % then try ovol fname 0012 fname = mars_struct('getifthere', obj.ovol, 'fname'); 0013 if isempty(fname), fname = 'image.img'; end 0014 [p f e] = fileparts(fname); 0015 wtp = mars_struct('getifthere', obj.options, 'wtprefix'); 0016 fname = fullfile(p,[wtp f e]); 0017 end