# Structure-Aware Trail Bundling for Large DTI Datasets
## 3 Method
### Structure-Emphasizing Rendering
#### 3.3.3 Gap Filling  
The key added value of splatting is to fill gaps between close-and-parallel trails in a bundle so as to make it appear as a compact, smooth, structure--thereby removing the inherently discrete, sampled, nature of trail sets. To do this, we need to carefully set the radius of the splat textures \(t\) so that splats are not too large (in screen space) so that they fill in large gaps between far-apart bundles, which we want to see as being distinct, and in the same time they are not too small, so that splats at consecutive sampling points \(\mathbf{x}_{j}\) on a trail do not overlap sufficiently so as to give the impression of a constant-thickness tube. Additionally, we want that splats that render fiber sheets are larger so that gaps in such sheets are visually closed. Finally, we want to make fibers far from the viewer look thinner to account for perspective.  
We achieve the above by computing the radius \(r\) of the splat rendered at sample point \(\mathbf{x}_{j}\) as  
\[r(\mathbf{x}_{j})=(r_{0}+c_{p}(\mathbf{x}_{j})\beta)\sqrt{\frac{1}{z_{j}+z_{j} ^{2}}} \tag{9}\]  
where \(r_{0}\) is the base splat radius (set typically to around 5 pixels, so as to ensure that all fibers are sufficiently visible); \(c_{p}(\mathbf{x}_{j})\) is the planar anisotropy at location \(\mathbf{x}_{j}\); \(\beta\) is a constant factor determining how much we increase splats in planar regions; and \(z_{j}\) is the depth value of \(\mathbf{x}_{j}\) after perspective transformation. Please note that the square-root term in Equation (9) is similar to the well-known distance-based attenuation commonly used in lighting [59]. Figure 10a,b show the effect of the parameter \(\beta\): For \(\beta=0\), we do not make splats in planar regions larger. As such, even though splats overlap in these regions, the individual fibers are still visible here (see insets in Figure 10a). Setting \(\beta=5\) makes splats in these regions larger, therefore allowing for more overlap, thus making the surface-like fiber sheets more apparent in planar regions (see insets in Figure 10b).  
Figure 9: Trail set visualized with splatting with (**a**) no blending and (**b**) peel blending. Note how blending removes artifacts. See Section 3.3.2.  
Besides controlling the splat radius, we need to control the _density_ of sample points \(\mathbf{x}_{j}\) along a trail. Indeed: The original CUBu algorithm, which we extended to 3D (Section 3.2), creates a dense, and uniform, but _fixed_ sampling of the trail set. Although this sampling density is typically sufficient for rendering edge bundles as polylines in typical graph drawings [8], it can be too low to ensure sufficient overlap of consecutive splats during blending (Section 3.3.2). Increasing the base radius \(r_{0}\) (Equation (9)) can fill in such gaps, but it also makes trails look overall thicker, which may not be desirable when one wants to see fine details. Moreover, the trails sampling is fixed, meaning that gaps will inevitably appear when one zooms in to examine details. Figure 10c illustrates the above: Here, we use a small splat radius \(r_{0}=3\) and the sampling distance \(\|\mathbf{x}_{j}-\mathbf{x}_{j+1}\|\) to roughly 1 voxel. This creates clear gaps in the trails rendering. We solve this problem by applying on-the-fly tessellation to the line segments \((\mathbf{x}_{j},\mathbf{x}_{j+1})\) as these are rendered to generate splat centers. As the user zooms in, such line segments are subdivided to generate more sample points, thereby ensuring a constant and high sample point density in image space. Figure 10d illustrates this: The density achieved here by tessellation is roughly 7 times larger than in Figure 10c, which ensures that consecutive splats blend seamlessly to create continuous-looking _and_ thin, detail-rich, trails.