Seed growing algorithm to find voxels in a threedimensional array according to their correlation to a seed voxel. The correlation is measured according to the fourth dimension of the array.
1  extractAIF(img, x, y, z, thresh = 0.9)

img 
is the fourdimensional array of medical imaging data. 
x,y,z 
are the coordinates of the seed voxel. 
thresh 
is the minimum correlation for inclusion in the region. 
Correlation coefficients are computed for every voxel in the input array. A recursive algorithm is then used to grow the region of interest (ROI) from the seed voxel in three dimensions. All adjacent voxels, where the correlation exceeds the threshold, are included.
coord 
is a matrix of the threedimesional coordinates (x,y,z) for all voxels found by the algorithm. 
conc 
is a matrix whose rows correspond to the voxels found by the algorithm and whose columns are the fourth dimension from the input array (e.g., contrast agent concentration time curve). 
mask 
is an array of boolean values, where only voxels included by the algorithm are given a value greater than zero. 
cor 
is an array that mimics the 
Volker Schmid volker.schmid@users.sourceforge.net
Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.