Login  Register

Re: Image Calculator

Posted by Jonathan Jackson-2 on Sep 27, 2005; 10:59am
URL: http://imagej.273.s1.nabble.com/Re-Image-Calculator-tp3704776.html

Al,
To process all the slices in a stack you need to add the stack option, so it
becomes
IJ.run("Image Calculator...", "image1="+img1.getTitle()+" operation=Subtract
>image2="+img2.getTitle()+" create stack");
A useful tool is the macro recorder - Plugins->Macro->Record
If you record the successful operation of a command in imagej you get the
correct syntax to use in a plugin - just change "run(..." to "IJ.run(..."
Jon

On Mon, 19 Sep 2005 14:15:19 -0400, amagri <[hidden email]> wrote:

>I am trying to subtract 2 images from each other in a plugin using Image
>Calculator.  After looking in the ImageJ archives I found that I could use
>IJ.run("Image Calculator...", "image1="+img1.getTitle()+" operation=Subtract
>image2="+img2.getTitle()+" create");.  The only problem I have with this is
>that the output is only one slice thick and I would like the result to be done
>to each slice in my images.  Does anyone have a suggestion for what I can do?
>
>Al
>=========================================================================