Seed growing algorithm to find voxels in a three-dimensional array according to their correlation to a seed voxel. The correlation is measured according to the fourth dimension of the array.
extractAIF(img, x, y, z, thresh = 0.9)
is the four-dimensional array of medical imaging data.
are the coordinates of the seed voxel.
is the minimum correlation for inclusion in the region.
is a matrix of the three-dimesional coordinates \((x,y,z)\) for all voxels found by the algorithm.
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).
is an array of boolean values, where only voxels included by the algorithm are given a value greater than zero.
is an array that mimics the mask
, but contains the
estimated correlation coefficients for all voxels included by the algorithm.
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.