Discriminating tubular from circular structures

Hi, I’m trying to automatize the quantification of tubules from confocal microscopy. I have to discriminate between circular and tubular structures, but applying only a circular mask (by using analyze particles, and setting a threshold that does not remove tubular structures), does not solve my problem, because I still have in my final picture a lot of round structures that are then converted in tubules by tubeness , and measured with skenetonize.

I was wondering if it was possible to enhance the “circularity” of round particles in order to improve my initial mask.

Here is what I am doing:

run("Stack to Images");
close();
selectWindow("...");
close();
selectWindow("...");


setAutoThreshold("Default");
//run("Threshold...");
setThreshold(4000, 65535);
setOption("BlackBackground", false);
run ("Create Mask")
rename("originalMask");
run("Watershed");
run("Analyze Particles...", "size=0-Infinity circularity=0.55-1.00 show=Outlines add");
roiManager("Fill");

setAutoThreshold("Default dark");
//run("Threshold...");
setThreshold(0, 128);
setOption("BlackBackground", false);
run ("Create Mask")
rename("subsetMask");
imageCalculator("Subtract create", "originalMask","subsetMask");

run("Tubeness", "sigma=.25 use");
run("8-bit");
setThreshold(100, 255)
setOption("BlackBackground", false);
run("Convert to Mask");
run("Create Mask");
rename("Mask3");


run("Subtract Background...", "rolling=5 light");
run("Duplicate...", "title=Mask4");
setAutoThreshold("Default dark");
//run("Threshold...");
//setThreshold(1, 156);
setOption("BlackBackground", false);
run("Convert to Mask");
imageCalculator("Subtract create", "Mask3","Mask4");

setAutoThreshold("Default dark");
setAutoThreshold("Huang dark");
run("Create Mask");
rename("Mask5");



//setAutoThreshold("Default dark");
//run("Threshold...")
//setThreshold(40, 255);
//setOption("BlackBackground", false);
//run("Convert to Mask");
run("Skeletonize");
run("Analyze Skeleton (2D/3D)")

I add two example pictures , a positive control (with tubules) and a negative control (with only round particles)

pos ctrl.tif (2.1 MB) neg ctrl.tif (2.1 MB)

@acalcagni

Perhaps it’s worth exploring the BioVoxxel Toolbox - in particular the Extended Particle Analyzer. Then @biovoxxel is the one to talk to… :slight_smile:

hi Etarena!

Thanks a lot for your suggestion!

1 Like