patch_area (Scripts) Publisher's description
from Ted Ballou
This function is provided to extract geometric properties of a volume array that has been thresholded and characterized by a patch (of triangular faces) generated by isosurface()
This function is provided to extract geometric properties of a volume array that has been thresholded and characterized by a patch (of triangular faces) generated by isosurface(). Its purpose is to calculate the area of a nerve cell dendrite, and also locate its center, both described as a function of distance along the long axis.
The user must choose a long direction (axis) for the process; default is 1 (y). The patch is analyzed in terms of 2D pixel layers perpendicular to this axis.
Algorithm: the surface area of each triangle in the patch is calculated and weighted by the two non-axis coordinates of its centroid; these values are summed in the provisional center of mass array, with the long axis coordinate corresponding to the (rounded) long axis coordinate of the centroid. Triangle areas are summed in the area array corresponding to the axis coordinate of each triangle centroid. After all triangles have been analyzed, the center of mass array is normalized by dividing by the total area in each axis layer, resulting in a net center of mass for the 2D layer.
Triangle areas are calculated from a version of HeronвЂ™s formula that has been optimized for numerical stability.
% Sample invocation. 3D array ddr represents a dendrite segment.
thr = graythresh(ddr);
p1 = patch(isosurface(ddr, thr));
[area cm] = patch_area(p1,1);
Please reference the following article if this code is used for your published data analysis:
Ballou, E. W., W. B. Smith, et al. (2006). "Measuring dendritic distribution of membrane proteins." Journal of Neuroscience Methods 156(1-2): 257-266.
System Requirements:MATLAB 6.5 (R13)
Program Release Status: New Release
Program Install Support: Install and Uninstall