Question on Analyse skeleton plugin

Hi All,

I’d like to use the Ànalyze Skeleton plugin to convert my input image into a skeleton and get measures
of the length and thickness of branchs in the skeleton.
From the documentation available here, I could see the branch lengths are possible.

I’d like to know if there is a way to obtain the thickness of the branches if the branches don’t have uniform thickness

@Deepa

Once you have the binary of your branches… you can use the Distances for Binary Images tools that come with MorphoLibJ. :slight_smile:

@etadobson Thank you. I loaded the image, selected Image -> Type -> 8bit.
Next, Plugin -> MorpholibJ -> Binar Images -> Geodesic distance map

However, I don’t get an output with color gradients.
Could you please suggest if I am missing any step?

Input file can be found here

Hi
@Deepa
I use ImageJ.
I hope this helps.
Greetings

run("Duplicate...", "title=1 ");
setOption("BlackBackground", true);
run("Convert to Mask");
run("Distance Map");
run("Apply LUT");
run("16 Colors");
run("Calibration Bar...", "location=[Lower Left] fill=White label=Black number=5 decimal=0 font=12 zoom=1.3 overlay");
1 Like

@Mathew Thanks a lot. It really helps. I’d like to know if it is possible to obtain one average value of color/ predominant value of color for each branch.

Could you please let me know if the above-mentioned commands were run in the GUI by selecting icons or is there a possibility to run in command line? I’ve not used the command line interface before.
and I am not sure where to find "Convert to Mask"in GUI

Hi
@Deepa
Process—>Binary-----> Convert to mask
Why don’t you use profile plot to measure thicknesses?
analyze—> plot profile
Greeting and good luck


Test this macro and can you give me the results if you don’t mind.

macro"Thickness measurements"
{
requires("1.52t");
setBackgroundColor(0,0,0);
setOption("BlackBackground",true);
//---------------------------
// Start batch mode
setBatchMode(true);
//-----------------------------
//Copy and select
orig=getImageID();
run("Duplicate...","title=copy");
close("\\Others");
//-------------------------------
// Start processing
setOption("BlackBackground", true);
run("Convert to Mask");
run("Duplicate...","copy1");
run("Duplicate...","copy2");
run("Convert to Mask");
run("Watershed");
run("Distance Map");
run("Find Maxima...", "prominence=1 strict output=List");
selectWindow("copy-1");
run("Distance Map");
for(i=0;i<nResults;i++)
{
x=getResult("X",i);
//print(getResult("X",i));
y=getResult("Y",i);
//print(getResult("Y",i));
value=getValue(x,y);
print(i,value);
makePoint(x,y);
roiManager("Add");
roiManager("Select", i);
roiManager("Rename", i);
setResult("Thickness",i,getValue(x,y)*2);
}
roiManager("Show All with labels");
selectWindow("copy-1");
run("Flatten");
// End of processing
//----------------------------
// End of batch mode
setBatchMode(false);
run("Tile");
//--------------------------------
exit("All is done !");
}
2 Likes