Posted by
Michael Schmid on
URL: http://imagej.273.s1.nabble.com/Issues-with-real-time-display-in-ImageJ-tp5022793p5022800.html
Hi Mark,
probably you are calling the ImagePlus.updateStatusbarValue() too often
per second.
With a simple test case and on a rather fast computer, it works well
when calling it 10 times a second. If I try to call it e.g. 100 times a
second, I hardly get any MouseEvents with mouseMoved() any more. Calling
ImagePlus.mouseMoved() updates the coordinates used by
updateStatusbarValue().
To me, it is somewhat surprising how slow it seems to be; it gets
sluggish even when calling updateStatusbarValue 20 times per second,
which is not much for today's computers. I don't think that redrawing
the status line would occupy the event queue too much, but maybe there
are some built-in limits in Java.AWT to avoid too many events per second?
I have the impression that the maximum rate of MouseEvents with
mouseMoved() is higher than what one can do with updateStatusbarValue.
Anyhow, you might try calling updateStatusbarValue() only if something
has changed and/or check that the time since the last call has been more
than some minimum.
Michael
________________________________________________________________
On 18.12.19 18:56, Mark Rivers wrote:
> I have learned more about my second problem.
>
> In my code that displays the new image I am calling ImagePlus:: img.updateStatusbarValue(). If I call this function then the intensity value updates, but the mouse does not track accurately. If I move the mouse quickly it tracks somewhat, but if I move it slowly it does not track at all.
>
> If I don’t call updateStatusbarValue() then the mouse tracks perfectly, but the intensity value does not update when a new image is displayed.
>
> Thanks,
> Mark
>
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html