Posted by
Wayne Rasband on
Oct 11, 2009; 3:21pm
URL: http://imagej.273.s1.nabble.com/ImageCalculator-Result-tp3690847p3690850.html
On Oct 10, 2009, at 10:17 PM, David Webster wrote:
> I tried this and it works fine. I assume though that the run()
> method is no
> longer void. Is this option going to mbe extended to other classes?
The two run() methods are different because they have different
argument signatures. The new method is (String, ImagePlus, ImagePlus)
and the one required by the PlugIn interface is (String). I plan to
add similar thread-safe calling methods to other internal plugins as
needed. I also plan to add a "Record JavaScript" option to the
recorder that will record these methods so they can be discovered
without searching the ImageJ API or source code. For example, the
"Duplicate..." command will record something like:
IJ.run("Duplicate...", "title=blobs-1.gif");
// img2 = new Duplicator().duplicate(img1);
-wayne
> On Sat, Oct 10, 2009 at 5:55 PM, Wayne Rasband <
[hidden email]> wrote:
>
>> On Oct 10, 2009, at 4:19 PM, David William Webster wrote:
>>
>> All,
>>>
>>> My latest confusion is over how to get the ImagePlus object created
>>> by the ImageCalculator. That is, say I do something like that shown
>>> below, but I want to change the title of the result, then I need
>>> to have
>>> the ImagePlus object created by iC.calculate(). How can I get it?
>>>
>>> ImageCalculator iC = new IrmageCalculato();
>>> iC.calculate("divide create 32-bit stack", imIn, imL5L5);
>>>
>>
>> Upgrade to the v1.43i daily build and use
>>
>> ImageCalculator iC = new ImageCalculator();
>> ImagePlus result = iC.run("divide create 32-bit stack", imIn,
>> imL5L5);
>>
>> -wayne
>>