Quantitative methods of analysis of neural circuits rely on large datasets of neurons reconstructed accurately in three dimensions (3D). Due to the complexity of neuronal arbors, large datasets of reconstructed neurons must be generated with automated algorithms. Here, we attempted to automate the process of neuron tracing from sparsely labeled 3D stacks of confocal microscopy images. Our algorithm involves two steps. In the first step, the segmented image of neurites in the stack is voxelcoded. Centers of intensity of consecutively coded wave fronts are connected into a branched structure, which represents a coarse trace of the neurites. In the second step, this trace is optimized with the modified active contour method, which tends to maximize the intensity along the trace while keeping it under tension. To assess the performance of the algorithm we used manual reconstructions of neurons and converted them into artificial stacks of intensity images. These images were traced using the developed algorithm and quantitatively compared to the corresponding manual traces. The optimal traces were on average 6.0% shorter than the manual traces. This reduction in length resulted from the smoothness of the optimal traces, which, in comparison to the manual ones, were built out of shorter segments, and, as a result, were 3.3% less tortuous. The average distance between the optimal and the manual traces was 0.14 μm, and the average distance between their corresponding branch-points was 2.2 μm, illustrating good agreement between the traces.