Login  Register

RE: IJ Color Thresholding in Macro

Posted by Steve R on Dec 03, 2014; 7:56pm
URL: http://imagej.273.s1.nabble.com/IJ-Color-Thresholding-in-Macro-tp5010727p5010750.html

Ok, I see, got that to work  & that’s a big improvement over what I had. Here is the code it generated.

So I think I know where to insert his in my macro, but how do I replace these 2 names with instruction to act on the images within the macro? Like you said “all images”

Let me know, Thanks again, Steve

 

imageCalculator("AND create", "NthRun_ 352_CR_01-1.jpg","NthRun_ 352_CR_01.jpg");

selectWindow("Result of NthRun_ 352_CR_01-1.jpg");

close();

 

From: Gabriel Landini [via ImageJ] [mailto:ml-node+[hidden email]]
Sent: Wednesday, December 3, 2014 11:51 AM
To: Steve Roach
Subject: Re: IJ Color Thresholding in Macro

 

On Wednesday 03 Dec 2014 09:48:14 you wrote:
> Ok, when you say choose the 2 images, you mean the original image & the
> result image after macro has run? Thanks Gabriel, I really appreciate you
> taking the time to help me out. Steve

Yes that is right.
Actually I forgot that the macro version creates an 8 bit image (and the
interactive mode does not), so you should choose the original (open it again)
as image 1 and the binary result as image 2.

Let's suppose you open the clown,jpg image.
If you run the macro generated by the colour thresholder, then the binary
image (8bit) is still named  clown.jpg.
Now you open again the colour image (or duplicated before applying the macro)
so now the colour image is named clown-1.jpg.

The image calculator operation should be:
imageCalculator("AND create", "clown-1.jpg","clown.jpg");

That is the colour image (clown-1.jpg) has to be the first one as this set the
image type (RGB) of the result.

Alternative if the binary result is converted to RGB (still looks as B/W) then
the order of the images in the Image Calculator does not matter as they are
both RGB.

Cheers

Gabriel

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


If you reply to this email, your message will be added to the discussion below:

http://imagej.1557.x6.nabble.com/IJ-Color-Thresholding-in-Macro-tp5010727p5010749.html

To unsubscribe from IJ Color Thresholding in Macro, click here.
NAML