IJ.run(...) ?

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

IJ.run(...) ?

David Webster
Group,

If I call IJ.run(imp,"MyPluginFilter ","MyArgs") from a Plugin, then it
works OK. But, if I call it from a PlugiInFilter, then only the setup()
method seems to be called.

Am I doing soemthing wrong, or is it supposed to be this way? If I was
using it with a Plugin, i.e IJ.run(imp,"MyPlugin ","MyArgs"), would it
work from a PluginFilter?

David Webster
Reply | Threaded
Open this post in threaded view
|

Re: IJ.run(...) ?

Michael Schmid
Hi David,

the usual problem that I have encountered with IJ.run from a  
PlugInFilter is the image being locked by the PlugInFilter. One has  
to unlock the ImagePlus.
Locking the image while a PlugInFilter runs is meant to avoid two  
filters working on the image at the same time - one might run into  
this especially when doing it interactively and the first filter is  
slow - in case the user does not realize that it has not finished  
when starting the second operation.

Michael
________________________________________________________________

On 15 Jan 2010, at 05:11, David William Webster wrote:

> Group,
>
> If I call IJ.run(imp,"MyPluginFilter ","MyArgs") from a Plugin,  
> then it
> works OK. But, if I call it from a PlugiInFilter, then only the  
> setup()
> method seems to be called.
>
> Am I doing soemthing wrong, or is it supposed to be this way? If I was
> using it with a Plugin, i.e IJ.run(imp,"MyPlugin ","MyArgs"), would it
> work from a PluginFilter?
>
> David Webster