log and prgress bar

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

log and prgress bar

Jim Hull
Hi All,

I've created many plugins that use the IJ.log and IJ.showProgress methods.
I'm trying to make an interface using PlugInFrame, but when I call the
plugins from the interface unless there is a log window already open the
IJ.log method does not work.  Also, the progress bar only updates after the
plugin has run.  

Does anyone have any suggestions to get these methods to run properly?

IJ version 1.34s, java version 1.5.0_03

Thanks,

Jim Hull
Reply | Threaded
Open this post in threaded view
|

Re: log and prgress bar

Wayne Rasband
> I've created many plugins that use the IJ.log and
> IJ.showProgress methods. I'm trying to make an interface
> using PlugInFrame, but when I call the plugins from the
> interface unless there is a log window already open the
> IJ.log method does not work.  Also, the progress bar only
> updates after the plugin has run. 
>
> Does anyone have any suggestions to get these methods to run
> properly?

IJ.log() and IJ.showProgress() may not work as expected if they are
called from the event dispatch thread. You can work around this problem
by created a separate thread to do the processing. Refer to the IP_Demo
plugin at "http://rsb.info.nih.gov/ij/plugins/ip-demo.html" for an
example.

-wayne