loadobj method - reloads matrix from img file $Id$
0001 function o = loadobj(o) 0002 % loadobj method - reloads matrix from img file 0003 % 0004 % $Id$ 0005 0006 % Note that the image needs full processing before 0007 % setting into the matrix. After this, the processed 0008 % natrix data becomes an image snapshot for the memory 0009 % lifetime of the object 0010 0011 [img errstr] = my_vol_func(o); 0012 if isempty(img) 0013 if strcmp(errstr, 'Cant open image file.') 0014 errstr = sprintf('%s\nHas ROI image %s been moved?\n%s\n', ... 0015 errstr, o.vol.fname,... 0016 'Try to reattach with marsbar(''attach_image'')'); 0017 end 0018 error(errstr); 0019 end 0020 0021 % set using maroi_matrix object to avoid object conversion 0022 o.maroi_matrix = matrixdata(o.maroi_matrix,img);