returns 1 if all values in object images are NaN or zero $Id: all_null.m,v 1.1 2005/05/30 16:41:43 matthewbrett Exp $
0001 function tf = all_null(obj) 0002 % returns 1 if all values in object images are NaN or zero 0003 % 0004 % $Id: all_null.m,v 1.1 2005/05/30 16:41:43 matthewbrett Exp $ 0005 0006 tf = 1; 0007 obj = doproc(obj); 0008 img = obj.img(:); 0009 img = img(~isnan(img)); 0010 if isempty(img), return, end 0011 tf = all(img == 0);