Figure 2: Schematic illustration of several different methods of CDA.

Case 1: p1 is determined using PPA, then search p2 on the ray R2 within a small range (the default was set to ±30 voxels in our software) around the location of p1. Once pk is found, the same method is reused to find pk+1. This scheme is the CDA1 method, which is fast and useful for drawing in dark region, but is sensitive to the starting location. Case 2: Instead of determining p1 using PPA, we directly use fast-marching to find the shortest Geodesic path between all possible points on the rays R1 and R2. The hit points will be called p1 and p2. Next, we find the shortest path between p2 and the ray R3, and thus find p3. This process is repeated until all rays have been searched. This is the basic CDA2 method. Note, as all possible combination paths between R1 and R2 have been searched, this method is not sensitive to noise or obscuring of 3D objects (Supplementary Movies 6 and 7). Case 3: In CDA2, instead of finding the shortest path between one single hit point pk on the ray Rk to the next ray Rk+1, we find the shortest paths for all consecutive rays. This then allows us to compute and choose the global minimum cost path starting from the first ray and ending at the last ray, in all possible combinations of initial paths through consecutive rays. The entire search area A1, that is, the whole overlapping area of rays and the 3D image, is used. This is called the globally optimal CDA2 method (Supplementary Movie 5). Case 4: We can first use PPA to determine preliminary hit points on a pair of consecutive rays, based on which a smaller search area A2 is determined. A2 consists of a series of margin-extended and tilted bounding boxes (default margin is 5 voxels). Next, we can restrict the search of CDA2 on A2, instead of a much bigger region A1. This scheme is called the bounding-box-restricted CDA2. Of note, for all above cases (and other additional cases explained in the Methods), we restrict the search to voxels only (instead of sub-voxel locations).