Getting Branch Length from Branch information in Analyze Skeleton

Tags: #<Tag:0x00007fb87cea1ac8> #<Tag:0x00007fb87cea1988>


I am trying to use Analyze skeleton to measure the total length of filamentous Cyanobacteria in lake water samples.
So far I have managed to get good results using skeletonize and Analyze skeleton. This way I get information about the length of the branches. If I then sum up all the lengths of all the branches I have the total length in my sample.

I have made a simple Macro in ImageJ:

setAutoThreshold(“Default dark”);
setThreshold(18000, 65520);
setOption(“BlackBackground”, false);
run(“Convert to Mask”);

setOption(“BlackBackground”, false);

run(“Analyze Skeleton (2D/3D)”, “prune=[shortest branch] show display”);

This works great to get the information I need. However I would like to add something to the Macro to get only the data column of Branch length either saved to a .csv or excel file. I would like to have it in such a way that I will be able to run the macro on all the images inside a folder.
Is there anybody who could help me figuring out how to make a proper Macro for this?
Many thanks!


Hello @Joren90,

Have a look at this old post of the forum about how to extract values from a Results table in a macro.

There is a specific wiki page explaining how to do that :wink: