Login  Register

Re: Plugin- threshold, ROI

Posted by dscho on Nov 14, 2006; 9:35am
URL: http://imagej.273.s1.nabble.com/Plugin-threshold-ROI-tp3701007p3701009.html

Hi,

On Mon, 13 Nov 2006, Michael Miller wrote:

> I've been working with Liisa quite a bit. I think I can clear a few
> things up.
>
> For some samples of her images see:
> http://img132.imageshack.us/img132/6105/t2img100jl2.png
> http://img132.imageshack.us/img132/4930/t2img1cb9.png
>
> What she needs is the exact origin/center of the dark circles.

How about this:

-- snip --
run("Select None");
id = getImageID();
run("Duplicate...", "title=temp");
w = getWidth();
h = getHeight();
makeOval(w/4, h/4, w/2, h/2);
run("Make Inverse");
run("Colors...", "foreground=white");
run("Fill");
setThreshold(2, 25);
run("Colors...", "background=black");
run("Make Binary", "thresholded remaining");
run("Set Measurements...", "center redirect=None decimal=3");
run("Clear Results");
run("Measure");
close();
selectImage(id);
centerX = newArray(1);
centerY = newArray(1);
centerX[0] = getResult("XM", 0);
centerY[0] = getResult("YM", 0);
makeSelection(10, centerX, centerY);
-- snap --


Hth,
Dscho