Login  Register

Re: Segmentation macro problems, still - BUG?

Posted by Weller Andrew Francis on Jun 30, 2006; 5:25pm
URL: http://imagej.273.s1.nabble.com/Segmentation-macro-problems-still-tp3702363p3702366.html

I copied and pasted this exactly as it appears and the 'Particle
Analyzer' box pops up again with "A threshold image or 8-bit binary
image is required. Threshold levels can ve set using the Image -> Adjust
-> Threshold tool."

Maybe I'll download version 1.37j again...

Andy

On Fri, 2006-06-30 at 11:49 -0400, Wayne Rasband wrote:

> On Jun 30, 2006, at 10:29 AM, Andy Weller wrote:
>
> > OK, so it's not setBatchMode that's causing the problem, but
> > thresholding. I've tried several combinations of:
> >
> > run("Threshold", "thresholded");
> > run("Threshold", "thresholded remaining");
> > run("Threshold", "thresholded remaining black");
> > run("Threshold", "thresholded black");
> > etc
> >
> > and it appears that it isn't doing it correctly. It kinda just
> > thresholds everything, and therefore the Particle Analyzer doesn't work
> > as the wrong information is passed to it. I've tried opening and
> > re-saving my images as new tifs, but nothing.
> >
> > Is this a bug?
>
> I am not aware of any thresholding bugs. Please send me a macro that I
> can run to reproduce the problem. This macro, which operates on the Dot
> Blot sample image, appears to work fine on my system. Note that I had
> to change the minimum particle size to 700.
>
> -wayne
>
>    run("Dot Blot (7K)");
>     setBatchMode(true);
>     img = getImageID;
>
>     setAutoThreshold();
>     getThreshold(lo, up);
>     lo = lo-30;
>        if (lo<0) {
>           lo = 0;
>           }
>     setThreshold(lo, up);
>     run("Threshold", "thresholded remaining");
>
>     run("Analyze Particles...", "size=700-Infinity circularity=0.00-1.00
> show=Masks clear include");
>     mask = getImageID;
>     run("Copy");
>     setPasteMode("AND");
>     selectImage(img);
>     run("Paste");
>     resetThreshold();
>     selectImage(mask);
>     run("Create Selection"); // requires 1.37j
>     selectImage(img);
>     run("Restore Selection");