Axonium
![](/project/axonium/featured_hu9158030524fe3a17a8b0d787b6369ec7_1389743_e0af2c59b02c5cc014ac3257ef6c41e6.webp)
Axonium is a tool for automatically measuring the length of axons, the nerve fiber connections between neurons in a biological brain.
During her studies in the neurology, my girlfriend had to measure the length of a lot of axons. They used ImageScope to load the TIFF-image and then measure the length (in pixel) by a simple ruler tool and then enter the value into Excel.
As it was necessary to measures thousands of axons, and each measurement took quite long and was error prune, I decided to write a small tool, to automate this process.
![Automatically measure the length of axons with a single mouse click.](/project/axonium/axonium_hu893681ce5c364f17e15d95b2f12fa2d9_471128_b2b41c8510d91f3b629da208fbccbf41.webp)
The basic idea is the following:
First isolate the axons by making the image monochrome, i.e., each pixel is either false (black background) or true (colored foreground = axons) based on an adjustable threshold.
Then skeletonize the axons with the medial axis transformation. Basically, the axon (connected components in the monochrome image) are shrunk to have a width of one pixel.
Finally, the longest path within the skeleton is determined by a breadth-first search (BFS).
Since axon images can get wild, I added a couple of tools (a pen to connect interrupted axons and an eraser to separate two intersecting axons) and the functionality to still measure by hand.
Finally, the length is easily stored and can be exported to an Excel file.