Local optimization based branch merging strategy. Maximum intensity projection of an image stack showing a cluster of 4 end-points of the optimal trace (thin lines). All possible branch merger scenarios are considered by the algorithm. Three of these scenarios are shown in A, B, and C. The associated distances between branch end-points [D (in pixels)], cosines of angles made by the merging branch pairs [cos(χ)], average normalized intensities (I), curvatures (K) of the optimally connecting paths (thick red and green lines), and the corresponding costs are shown. Merger scenario shown in A seems to be the best choice as judged by the total cost of merger. Scale bar in A is 5 μm.