# Structure-Aware Trail Bundling for Large DTI Datasets
## 3 Method
### DTI Bundling
#### 3.2.1 Constrained Endpoint Advection  
The original CUBu bundling [8], applied to 2D trails, keeps trail _endpoints_ fixed (not affected by Equation (2)) and updates all other trail sample points \(\mathbf{x}_{j}\). This is well motivated by the fact that CUBu (and, actually, for all other bundling methods we are aware of) address 2D trails where endpoints represent _meaningful_ information, such as nodes in a graph layout or fixation points in a 2D eye-tracking dataset [7]. In contrast, our 3D trail endpoints are _far less_ meaningful, as they are simply locations of low confidence for the streamline tracing process (Section 3.1). Hence, their location does not encode any significant information. Keeping them fixed creates fan-like structures that generate significant occlusion, preventing us to look into the 3D bundle structure. As such, we choose to advect these trail endpoints, just as all other sampling points \(\mathbf{x}_{j}\).  
Naively applying Equation (2) to endpoints however has the effect of _shortening_ the fiber tracts, therefore losing important spatial information. To alleviate this, we constrain the advection \(\mathbf{d}=\mathbf{x}_{j}^{new}-\mathbf{x}_{j}\) to be normal to the local tangent \(\tau=\mathbf{x}_{j+1}-\mathbf{x}_{j}\) of the fiber at sample point \(\mathbf{x}_{j}\). Let \(\mathbf{d}^{\perp}\) be the constrained advection vector. Please note that for 2D trail sets \(T\), the direction \(\mathbf{u}\) of \(\mathbf{d}^{\perp}\) can be directly found as the cross product \(\tau\times\mathbf{v}\), where \(\mathbf{v}\) is the normal vector to the 2D plane containing the 2D trail set \(T\)[8]. In 3D, we have an infinity of such directions \(\mathbf{u}\) orthogonal to \(\tau\). We solve the problem of computing this orthogonal direction \(\mathbf{u}\) and the constrained advection \(\mathbf{d}^{\perp}\) in direction \(\mathbf{u}\) as follows (see also Figure 4a):  
\[\mathbf{d}^{\perp}=\begin{cases}0,&\text{if }\frac{\mathbf{d}}{\|\mathbf{d} \|}\cdot\tau\approx 1\\ \mathbf{d},&\text{if }\frac{\mathbf{d}}{\|\mathbf{d}\|}\cdot\tau\approx 0\\ (\mathbf{d}\cdot\mathbf{u})\cdot\mathbf{u},&\text{where }\mathbf{u}=\tau\times( \mathbf{d}\times\tau),\text{ otherwise.}\end{cases} \tag{4}\]  
Figure 4b-d shows the effect on trail endpoints of this constrained advection. Image (b) shows an unbundled trail set \(T\) with 50 K fibers seeded and traced to cover the entire brain. As visible, it is hard to see structures inside the brain due to occlusion. Image (c) shows the classical, unconstrained, bundling delivered by directly applying Equation (2). We see how fiber bundles form inside the brain. However, fiber endpoints are blocked, so they create fan-like structures that still severely limit visibility inside the structure. Image (d) shows our constrained bundling obtained by Equation (4). The terminal fan-like structures now largely disappear allowing us to peep inside the bundled structure with limited occlusion trouble.  
Figure 3: Effect of relaxation parameter \(\gamma\). (**a**) Unbundled dataset \(T\). (**b**) Bundled dataset, \(\gamma=0.1\). (**c**) Bundled dataset, \(\gamma=0.2\). Rendering parameters are the same as in Figure 2. See Section 3.2.