Hello Anders,
I don't know if there are better options, but I've done something like that using a Thread that updates at regular time intervals. The piece of code is attached (I rewrote a part of it, so there may be some bugs).
Cheers,
Nicolas
----------------------------------------
Nicolas Chiaruttini, PhD
Aurélien Roux lab,
Biochemistry Department
University of Geneva, Science II
30 quai Ernest Ansermet
CH-1211 Geneva 4, Switzerland
Tel: +41 (0) 22 379 36 48<tel:%2B41%20%280%29%2022%20379%2036%2048>
Personal website:
http://kiaru.eu/________________________________
De : ImageJ Interest Group <
[hidden email]> de la part de Anders Lunde <
[hidden email]>
Envoyé : vendredi, 28 avril 2017 18:24:26
À :
[hidden email]
Objet : Plugin development: How to get value of image window channel/slice when user changes channel/slice?
Dear all,
I am developing a ImageJ (v1.51) plugin, which take some input data from an image file, filters it, and displays it in a output image window. The plugin uses a swing frame with some buttons to add more filters etc. The problem is that I want to have a text field in my swing frame which shows the value corresponding to which current channel/slice that is viewed/selected in the output image window. So basically, every time the user changes the channel/slice of the output image window, my swing frame should update which channel/slice is displayed/viewed. Since I am not handling the output image window with swing myself I don't know how to get an event listener attached to the output image window. Anyone got some pointers or ideas?
Cheers
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html