Home > marsbar > @maroi_matrix > matrixdata.m

matrixdata

PURPOSE ^

matrixdata method - gets matrix from ROI object

SYNOPSIS ^

function dat = matrixdata(o, dat)

DESCRIPTION ^

 matrixdata method - gets matrix from ROI object

 $Id$

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function dat = matrixdata(o, dat)
0002 % matrixdata method - gets matrix from ROI object
0003 %
0004 % $Id$
0005 
0006 % a warning here about empty matrices
0007 if nargin > 1 % call to set matrix data
0008   % change to maroi_matrix type before setting data
0009   o = maroi_matrix(o);
0010   
0011   % apply implied thresholding
0012   tmp = find(isnan(dat) | abs(dat) < roithresh(o));
0013   if binarize(o), dat(:) = 1; end
0014   dat(tmp) = 0;
0015 
0016   o.dat = dat;
0017   dat = o;
0018 
0019 else
0020   dat = o.dat;
0021 end

Generated on Wed 11-May-2022 16:26:09 by m2html © 2003-2019