returns object with region data removed Useful to save memory
0001 function out_o = as_summary_only(o) 0002 % returns object with region data removed 0003 % 0004 % Useful to save memory 0005 if ~is_summarized(o) 0006 out_o = resummarize(o); 0007 else 0008 out_o = o; 0009 end 0010 st = y_struct(o); 0011 if ~isfield(st, 'regions') 0012 return 0013 end 0014 for rno = 1:length(st.regions) 0015 st.regions{rno} = mars_struct('strip', st.regions{rno}, ... 0016 {'Y', 'weights','vXYZ'}); 0017 end 0018 out_o = y_struct(out_o, st); 0019 return