Computing a gradient map on a cortical surface mesh by regressing scalar values onto neighbors projected into the tangent plane. The gradient map is then segmented with a priority-flooding watershed algorithm built on a heap-based priority queue.
I modified FSL's probtrackx2 so streamlines start out heading in a fixed direction into the white matter, which meant reading a lot of poorly documented C++. The post covers why I needed the change and three lessons from it: write meaningful documentation, get comfortable in other people's code, and don't dismiss compiled languages.