expandROI - given an appropriate set of ROI dimensions, expand a ROI matrix Usage: ROI = expandROI(roimtx, roisize) ROIs are saved in an abbreviated form to save space. To return the ROI into a form that makes later calculations easier, use expandROI. The inputs are the ROI matrix, which is of dimension numVoxelsInROI x 4, and the dimensions of the output ROI, in the form [numSlices numRows numCols]. The output is the ROI, now in dimensions [numSlices numRows numCols]. $Id: expandROI.m,v 1.3 2003/09/15 15:50:51 nknouf Exp $
This function calls:
This function is called by:
0001 function ROI = expandROI(roimtx, roisize) 0002 % expandROI - given an appropriate set of ROI dimensions, expand a ROI matrix 0003 % 0004 % Usage: ROI = expandROI(roimtx, roisize) 0005 % 0006 % ROIs are saved in an abbreviated form to save space. To return the ROI into 0007 % a form that makes later calculations easier, use expandROI. The inputs are 0008 % the ROI matrix, which is of dimension numVoxelsInROI x 4, and the dimensions 0009 % of the output ROI, in the form [numSlices numRows numCols]. The output is 0010 % the ROI, now in dimensions [numSlices numRows numCols]. 0011 % 0012 % $Id: expandROI.m,v 1.3 2003/09/15 15:50:51 nknouf Exp $ 0013 0014 ROI = zeros(roisize); 0015 ind = sub2ind(roisize, roimtx(:,1), roimtx(:,2), roimtx(:,3)); 0016 ROI(ind) = roimtx(:,4); 0017 return;