Posted by
danih on
Sep 09, 2015; 3:35am
URL: http://imagej.273.s1.nabble.com/Calculate-area-on-a-per-object-basis-tp5014278.html
Dear List,
I have images with two channels (red and green). I'd like to first segment the red objects and then calculate the amount (area) of green signal per red object, on an object by object basis.
I can easily calculate the area of green contained within the red with the script below, but I can't figure out how to get the area of green per red object. Is it possible? Any and all advice is very welcome!!
Thanks tons!
Danielle
p.s. I hope to automate/batch this analysis.
imgName=getTitle();
run("Split Channels");
selectWindow(imgName + " (blue)");
close();
selectWindow(imgName + " (red)");
setAutoThreshold("Default");
//run("Threshold...");
setThreshold(40, 255);
setOption("BlackBackground", false);
run("Convert to Mask");
run("Analyze Particles...", "size=50-Infinity show=Outlines summarize");
selectWindow(imgName + " (red)");
selectWindow("Drawing of " + imgName + " (red)");
close();
selectWindow(imgName + " (red)");
//run("Threshold...");
setThreshold(0, 243);
run("Convert to Mask");
imageCalculator("Subtract create", imgName + " (green)", imgName + " (red)");
selectWindow("Result of " + imgName + " (green)");
setAutoThreshold("Default");
//run("Threshold...");
setThreshold(75, 255);
run("Convert to Mask");
run("Analyze Particles...", "size=0-Infinity show=Outlines summarize");
This message is intended only for the confidential use of the intended recipient(s). If you have received this communication in error, please notify the sender by reply e-mail, and delete the original message and any attachments. Any unauthorized disclosure, copying, or distribution of this message (including the attachments), or the taking of any action based on it, is strictly prohibited.
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html