Where is result image of calculate()?

Posted by John Kim-2 on
URL: http://imagej.273.s1.nabble.com/Where-is-result-image-of-calculate-tp3701646.html

I'm trying to take the result of a "subtract create" and threshold it (in
batch mode). But I don't know how to obtain a reference to the subtracted
image. My code looks like this:

    ImageCalculator ic = new ImageCalculator();
    for (int i=0; i<fileList.length; i++) {
        ImagePlus img1 = new Opener().openImage(dir1, fileList[i]);
        ImagePlus img2 = new Opener().openImage(dir1, bkgrdImgFile);
        ic.calculate("Subtract create", img1, img2);
        ic.calculate("Threshold",  /* result of subtract? */ );
    }

As you can see, I need to somehow refer to the resulting image from the
first call to calculate(). How do I do that?

Please help! I've spent hours scouring the documentation and email archives
to no avail! Thanks.

John