Login  Register

Re: object-oriented segmentation

Posted by Michiel van Dommelen on Dec 14, 2012; 11:51am
URL: http://imagej.273.s1.nabble.com/object-oriented-segmentation-tp5001110p5001161.html

Hey Kees,

I got it working! I used the plugin from Daniel Saga (http://bigwww.epfl.ch/sage/soft/watershed/). The only thing I do not understand is why the "exclude on edge" functionality is not working in this code. Would you have any idea? Of course I have to tweak some settings to make it robust enough for higher throughput. For the rest it is working like a charm.

I got it working with the code below:

selectWindow("Cytoplasm_Raw.jpg");
run("Duplicate...", "title=[Cytoplasm_Raw_temp.jpg]");
run("Median...", "radius=5");
run("Auto Threshold", "method=Triangle white");
run("Divide...", "value=2"); //this makes the cytoplasm grey in dual color overlay
selectWindow("Nuclei_Raw.jpg");
run("Duplicate...", "title=[Nuclei_Raw_temp.jpg]");
run("Median...", "radius=5");
run("Auto Threshold", "method=Triangle white");
run("Watershed");
imageCalculator("Add", "Nuclei_Raw_temp.jpg","Cytoplasm_Raw_temp.jpg"); //this makes dual color overlay
rename("2ColorOverlay");
selectWindow("Cytoplasm_Raw_temp.jpg");
close();
selectWindow("2ColorOverlay");
run("Watershed ", "blurring='0'   watershed='1 1 0 100 0 0'   display='0' "); //this is the plugin I installed
selectWindow("Binary watershed lines");
run("Invert LUT");
run("Set Scale...", "distance=1 known=0.617 pixel=1 unit=um global"); //These 2 lines adjust the settings specific to my images
run("Analyze Particles...", "size=350-Infinity circularity=0.00-1.00 show=Nothing exclude clear include add");//These 2 lines adjust the settings specific to my images
selectWindow("Nuclei_Raw.jpg");
roiManager("Show All with labels");
roiManager("Show All");
selectWindow("Cytoplasm_Raw.jpg");
roiManager("Show All with labels");
roiManager("Show All");

Thanks for all your help!
Warm regards,
Michiel