We developed the CSD algorithm to be applied as the instance segmentation of myelinated axons, incorporating the tubularity of myelinated axons in the segmentation process. The main idea of the CSD algorithm was to guide the decomposition using the object curve skeleton and to cut the object by restricted translational sweeps, as shown in Figure 8. We designed the CSD algorithm for the genus zeros objects.

**5.4.1** **Skeleton partitioning **

We used the object curve skeleton to drive the decomposition. We partitioned the object curve skeleton graph into several distinct sub-skeletons, the union of which was equal to the curve skeleton. Each sub-skeleton corresponded to exactly one semantic object component. The remainder of this section describes the details of skeleton partitioning.

**5.4.1.1** **Curve skeleton **

To determine the curve skeleton of an object with sub-voxel precision, we applied
the method in (Hassouna and Farag, 2005) and (Van Uitert and Bitter, 2007). This
skeletonization method was a distance transform-based approach initiated by
determining the point with the greatest distance from the object surface, denoted
as π₯^{β}, and finding the furthest geodesic point from that point, denoted as π₯π . The
path between π₯_{π } and π₯^{β} forms a skeleton branch, denoted as πΎ(π‘): [0,1] β β^{3},
enforced to run from the middle of the object using a cost function πΉ that could
increase if the path moved away from the center. We determined the distance
field π·(π₯) from the object surface and assigned πΉ = 1 β (^{π·(π₯)}

π·(π₯^{β}))^{2}. Starting at π₯π , the
skeleton branch πΎ was traced by a back-tracking procedure on πΉ to reach π₯^{β},
written as:

πΎ = argmin

π β« πΉ(π(π‘))

π₯^{β}
π₯_{π }

dπ‘, (22)

where π‘ traces the path π, and the Euler scheme was used for the back-tracking
procedure. This process was repeated to determine other skeleton branches,
forming the object curve skeleton, but rather than using the π₯^{β} as the starting
point, all points of the previously calculated branches were used (Figure 8c).

**Figure 8. Outline of the CSD algorithm. (a) An object is a union of several tubular **
components. (b) A voxel-based representation of the object. (c) The object curve
skeleton is the union of skeleton branches, denoted as πΎ. A junction-point π is
defined as such a point that skeleton branches connect. (d) The curve skeleton of
the object is partitioned into maximal-length sub-skeletons π over a local

orientation cost. (e) On a sub-skeleton π and in the proximity of every π β π, we define two decomposition intervals, shown with red filled-circles. The object is swept along π and towards the π in the search of a critical point in each interval. At a critical point, the geometry of the object changes substantially. (f) We cut the object at critical points to obtain object parts. (g) The object parts along the same sub-skeleton are assigned the same label, constructing a semantic component. We use generalized cylinders to further reconstruct the acquired

semantic-component.

**5.4.1.2** **Skeleton graph decomposition **

Extracting skeleton branches of the object was not sufficient for a semantic decomposition, and we were often required to represent a semantic component with several skeleton branches (Figure 8d). We considered connectivity, length, and local orientation, to merge skeleton branches. We devised an algorithm that traversed the object's skeleton graph and decomposed it into distinct paths iteratively, where each path corresponded to a semantic component. At each iteration, the algorithm started at the longest edge of the graph and traversed edges that could locally minimize an orientation cost function until visiting a leaf node. This algorithm partitioned the graph into several distinct paths, the union of which covers the set of graph edges. In the skeleton domain, we call each path a sub-skeleton.

**5.4.2** **Cylindrical decomposition **

Following the graph decomposition, we proposed to sweep the object along object sub-skeletons, restricted in decomposition intervals, to find locations where the object geometry changes substantially. We called such locations critical points; at these points, the object was cut into parts and intersections.

**5.4.2.1** **Decomposition interval **

We denoted a parametrized sub-skeleton π(π‘): [0, 1] β β^{3}. We defined two

decomposition intervals [π‘π +, π‘π+] and [π‘πβ, π‘π β] in the proximity of a junction-point π‘π to restrict the sweep of the object along its corresponding sub-skeleton. To

determine the boundaries of the decomposition intervals, we defined an upper
threshold π_{π } and a lower threshold π_{π} based on π, the radius of the maximal
inscribed ball at π‘_{π}, and two factors πΌ_{π }β₯ 1 and πΌ_{π}β₯ 0, where πΌ_{π }β₯ πΌ_{π }, as π_{π }= πΌ_{π }Γ π
and π_{π}= πΌ_{π}Γ π (Figure 8e).

**5.4.2.2** **Critical point **

A critical point on a sub-skeleton is where the object cross-section changes substantially at that point. We used the Hausdorff distance to measure cross-sectional changes in a decomposition interval. In this case, we swept the object surface in decomposition intervals by a cross-sectional plane and compared the Hausdorff distance between a cross-sectional contour at one point with the

(Chazal, Lieutier and Rossignac, 2005) to find the average curve between two nearly similar curves. We normalized the Hausdorff distance between zero and one and defined a similarity threshold as ππ». While sweeping the object surface in a decomposition interval, the inquiry would continue to the next point when the normalized Hausdorff distance was smaller than ππ», otherwise, the inquiry would stop and the point could be called a critical point (Figure 8e).

**5.4.3** **Object reconstruction **

Given the critical points, we cut the object at all such locations and decomposed the object into semantic parts and intersections. The final decomposition step was to discard intersections and assign the same label to object parts along the same sub-skeleton. We reconstructed the semantic components at intersections using generalized cylinders (Figure 8f, g). A generalized cylinder represents an elongated surface on an arbitrary axis and smoothly varying cross-sections (Shani and

Ballard, 1984). We constructed a generalized cylinder Ξ¦: β^{2}β β^{3} as a linear
homotopy between two simple closed curves πΆπ_{1}and πΆπ_{2} elongated on a simple
curve π β β^{3}, where the curves were obtained by cross-sectioning the object
surface at critical points π1 and π2. We defined π to be the spline interpolation of
the sub-skeleton between the critical points. The acquired generalized cylinder
was used for reconstructing the object at an intersection.