passing objects to imagecalculator

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

passing objects to imagecalculator

donny008
Hello,

While writing my plugin with imagej, i am faced with a dilemma. I would like
to use imagecalculator and would like to pass the names of the objects. i
intend not to use the IJ.run("imagecalculator") method as it only takes the
window titles. however even with a vast search in the mailing list i wasnt
able to figure out a solution to my problem. would there be someone who has
already implemented imagecalculator with objects. it would be really helpful
for me if someone shares their knowledge on this topic.

looking forward to some info

regards

--
Donny George
Reply | Threaded
Open this post in threaded view
|

Re: passing objects to imagecalculator

Gabriel Landini
On Monday 02 August 2010, you wrote:
> there be someone who has already
implemented imagecalculator with objects.
> it would be really helpful for
me if someone shares their knowledge on
> this topic.

Record your actions
as javascript instead of a macro That will give you a clue of how to call
the ImageCalculator class from Java.

In Java you would call something
like:
ImageCalculator ic = new ImageCalculator();
ImagePlus imp5 =
ic.run("Add create", imp3, imp4);

You will see that the JavaScript recorded
script is quite similar to the above.

Cheers,
G.