Posted by
MRivers on
URL: http://imagej.273.s1.nabble.com/Issues-with-real-time-display-in-ImageJ-tp5022793p5022803.html
Wayne Rasband wrote:
Ø This is the code the Animator class uses to update the status bar after each frame is displayed:
ImageCanvas ic = img.getCanvas();
Point loc = ic!=null ? ic.getCursorLoc() : null;
if (loc!=null)
img.mouseMoved(loc.x,loc.y);
Thanks, that’s exactly what I needed. When I add that code to my image display function it now works perfectly!
I was thrown off by the documentation for ImagePlus.mouseMoved(). It says:
Ø public void mouseMoved(int x,
int y)
Ø Displays the cursor coordinates and pixel value in the status bar. Called by ImageCanvas when the mouse moves. Can be overridden by ImagePlus subclasses.
That led me to think that this was a function that was called by the display system on mouse events, and which I needed to subclass ImagePlus to implement. I didn’t understand that I could get the mouse coordinates via the ImageCanvas and call this function to have the status bar update the coordinates.
Thanks again, both of my problems are now solved.
Happy Holidays!
Mark
From: Mark Rivers
Sent: Wednesday, December 18, 2019 8:43 AM
To:
[hidden email]; Wayne Rasband <
[hidden email]>
Subject: Issues with real-time display in ImageJ
Folks,
I develop real-time detector software called areaDetector for the EPICS control system.
https://epics.anl.gov/https://areadetector.github.io/master/index.htmlOne of the components of areaDetector is a real-time image display plugin in areaDetector that uses ImageJ.
https://areadetector.github.io/master/ADViewers/ad_viewers.html#imagej-viewershttps://github.com/areaDetector/ADViewers/tree/master/ImageJ/EPICS_areaDetectorIt receives images over the network using the EPICS Channel Access or pvAccess protocols and displays them in ImageJ. This plugin is used worldwide at a large number of large physics facilities such as synchrotrons, neutron sources, and telescopes. The ImageJ performance is excellent. Here is a screen shot of ImageJ receiving and displaying 180 frames/s 1024x1024 pixels, 8-bit.
[cid:image001.png@01D5B8EB.45774F50]
[cid:image002.png@01D5B8EB.45774F50]
There are just a couple of things that don’t work quite right when using ImageJ in this mode.
- When displaying monochrome images (ByteProcessor, ShortProcessor, FloatProcessor) the Image/Adjust/Brightness/Contrast works fine. I can set the brightness and contrast or high and low levels and they are “permanent” until I change them again, and all subsequent images are displayed using these values. However when displaying RGB images (ColorProcessor) when I change the brightness and contrast it only applies to the current image, they reset automatically when the next image is displayed. Is there a way to prevent this behavior, or could this be fixed?
- When images are arriving quickly the cursor x, y, and value numbers in the main ImageJ window do not track the cursor in the image window correctly. They don’t just have a lag, they often never update to the current cursor position, even if the cursor is left on the same pixel for a long time. This means that in order to make a measurement of a pixel position or value I need to stop the real-time updates, make the measurement and then turn the real-time update back on. Is there a way to avoid this behavior, or could this be fixed?
Thanks,
Mark
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html