Re: "Set Threshold" records incorrect values - 16bit images - Ubuntu
Posted by
Ghislain Bugnicourt on
Aug 28, 2008; 3:08pm
URL: http://imagej.273.s1.nabble.com/Set-Threshold-records-incorrect-values-16bit-images-Ubuntu-tp3695217p3695229.html
Wayne wrote
Dear Ghislain,
I'm sorry to hear that the bug remains but I still think it is thread
synchronization problem. Here is another version of the plugin that
updates the "Threshold" window without directly calling scaleDown() and
scaleUpAndSet(). It also waits 0.5 seconds before updating the window.
Does it work any better?
Wonderful !
Here is Wayne's plugin :
Threshold_Adjuster2.java(I renamed it)
And this time it works !
I forgot to tell about this, but when compiling Wayne's plugins a message is shown :
/home/ghislain/.imagej/ImageJ/plugins/Threshold_Adjuster2.java:177: warning: [deprecation] show() in java.awt.Window has been deprecated
show();
^
1 warning
Perhaps it is normal...
I decided to modify the time before updating the image : and here is the key !
Actually, if I let 500 (ms), it works perfectly. If I change it to 50 or 5, the bug occurs almost each time.
I think this is in coherence with David's idea :
Well I spotted something that may provide a clue to what's going on
here: the *size* of the image seems to make a difference. I re-scaled
Ghislain's original image to a 100*74 16-bit image and cannot replicate
the bug, either in the case where the result is interpolated or not.
Incrementally scaling the image back to its original size the bug
re-appeared with a 350*26 16-bit scaled image.
I imagine that the little image is modified faster than the big one :). Which leads to less errors.
I would like to know if non-Ubuntu users can now witness the bug with this new plugin and a value of 5 ms instead of 500 (just because I'm curious).
Thank you Wayne. Really. Not only for resolving the problem, but for your time and consideration.
I imagine that you still need some work to correct the bug completely, and make it stable for another ImageJ version. So if I may help in order to try new threshold plugins, or anything else, there will be no problem.