Login  Register

Problem with Find Maxima in Macro

Posted by Adrián Villalba on Oct 23, 2017; 8:19am
URL: http://imagej.273.s1.nabble.com/Problem-with-Find-Maxima-in-Macro-tp5019583.html

Dear all,

I developed a macro (BetaCell_count) to count cell nucleus within a
specific stain (example_image). The macro performed a selection of the
population stain (green for insulin):

title = getTitle();
run("Split Channels");

selectWindow(title+" (green)");
// process the green channel;
setAutoThreshold("Moments dark");
//run("Threshold...");
//setThreshold(69, 255);
setOption("BlackBackground", false);
run("Convert to Mask");
run("Close-");
run("Fill Holes");
run("Dilate");
run("Remove Outliers...", "radius=50 threshold=50 which=Bright");
run("Create Selection");

Then i try to do find maxima within this ROI (the processed blue channel
for DAPI):

selectWindow(title+" (blue)");
// process the blue channel;
run("Restore Selection");
run("Find Maxima...", "noise=13 output=Count");

The problem i found is that find maxima counts very well for the number of
nucleus if compared to the manual count but it fails to locate them
properly (as you can see in the Output_BetaCounter) because most of the
points do not correlate with DAPI spots within the green ROI.

Do you know if i can correct the automatic assigned dots with the Find
Maxima or another process? Thank you in advance!



--

   - Adrián Villalba Felipe.
   https://es.linkedin.com/in/adrianvillalba

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

BetaCell_Count.txt (832 bytes) Download Attachment
Output_BetaCounter.tif (902K) Download Attachment
Ej7.jpg (162K) Download Attachment