Home > marsbar > @maroi > are_same.m

are_same

PURPOSE ^

returns 1 if rois are the same

SYNOPSIS ^

function tf = are_same(roi1, roi2, sp)

DESCRIPTION ^

 returns 1 if rois are the same
 FORMAT tf = are_same(roi1, roi2)
 
 $Id$

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function tf = are_same(roi1, roi2, sp)
0002 % returns 1 if rois are the same
0003 % FORMAT tf = are_same(roi1, roi2)
0004 %
0005 % $Id$
0006 
0007 if nargin < 2
0008   error('Need two ROIs');
0009 end
0010 if nargin < 3
0011   sp  = native_space(roi1);
0012   if isempty(sp)
0013     sp = native_space(roi2);
0014   end
0015   if isempty(sp)
0016     error('Need space for comparison');
0017   end
0018 end
0019 
0020 mat1 = matrixdata(maroi_matrix(roi1, sp));
0021 mat2 = matrixdata(maroi_matrix(roi2, sp));
0022 
0023 tf = all(mat1(:)==mat2(:));

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