Much of my research at the Chung Lab concerned the development of a novel filament tracing technique for brain microscopy data.


Unfortunately, I’m not at liberty to detail the precise method, as it will be published in a joint paper between the Chung Lab and Tsai Lab as part of the NIH U01 Alzheimer’s Disease Project. That being said, I’d be remiss not to mention it on my own website.
Purpose and Use Case
Stripped to the essentials, the method traces fibers detected by staining in neural tissue. At the scale of individual fibers, the program is capable of detecting each fiber’s origin and direction, average width, and total length. At the scale of an entire sample, such as a single hemisphere, or whole mouse brain, the program is capable of analysis of the aforementioned values across the sample, and across individual regions dictated by the Allen Mouse Brian Atlas. Essentially, we are able to warp a reference atlas onto a sample, and then associate the qualities of the fibers detected within that region to the region itself.
Through this method we attained vital insight into the effects of Alzheimer’s Disease on axons spreading from a particular brain region, showing that, in AD mice, density of axons expanding from that region decreased, their average width decreased, their total length decreased, and their aggregate direction became more chaotic and haphazard.
When the paper is finally published I will link to it from this page, both to elaborate on the work, and because the biomedical aspect of the project, which I feel I have no right to speak on, is equally, if not more fascinating.
Suffice to say, the fiber detection method is not limited to axons, and I saw great success tracing blood vessels in the same samples.
General Approach



The method is effective at a wide range of resolutions and is highly scaleable, though I had a special interest in ensuring it was effective at low resolutions and capable of processing vast amounts of data quickly.
To that end I used a combination of machine learning (MCMCs) and old fashioned algorithm development, all written and analysed using Python (numpy, scipy, and pandas). Generally there are two common approaches I’ve seen for image analysis of neural tissue.
The first is to utilize convolutional neural nets for shape detection and counting, and the other is to apply a wide range of image pre-processing techniques (Otsu Method, Gaussian Filter), to filter out irrelevant information, and then to simply perform regional intensity analysis on the resultant image.
While I have a soft spot for CNNs and ANNs (no matter how overblown their capabilities are in the current popular culture), they are best suited for the detection and sorting of irregular, but not totally dissimilar objects. At the Chung Lab we use them for Nuclei detection and analysis, and they’ve proven very effective. However, filaments are almost completely dissimilar to each other, with each axon varying greatly in length, curve, and width. Furthermore, each and every brain sample is highly dissimilar across nearly a dozen variables. I have no doubt that with a requisite mass of training data, a CNN could be trained which can perform filament detection, but to me the problem was clearly not an ideal use case for the technology.
As for pre-processing techniques, I made use of several subtle techniques primarily to even out the dissimilarities between individual samples, but otherwise I tried to avoid them for the sake of speed and efficiency.
Method Specifics
Unfortunately I need to be broad in my description, but the method’s principle technique was an extremely efficient thresholding function for determining whether a particular voxel (an xyz element in the image’s numpy array) was likely to be an axon or not.
Once a filament was suspected to be found, the algorithm “looked around” the voxel of interest for other “filament likely voxels,” and then began to trace and record the filament’s direction, width, and length.
Markov chains were constructed to narrow the search possibility space to create the most efficient search path possible. My implementation of the principle reduced tracing times for a 300GB sample by 40% (3.5 hours to 2 hours).
Each filament so traced was added to an array of filament objects for later sorting, analysis, and region assignment.
Though I’ve summarized it here in brief, the map is certainly not the territory, and the vast majority of optimizations, steps, and frustrations have been kindly omitted.
I must once again stress that I am very excited for when the paper detailing my work is completed so I can link it here for those truly interested.

