Login  Register

Re: "Set Threshold" records incorrect values - 16bit images - Ubuntu

Posted by David Randell on Aug 28, 2008; 3:39pm
URL: http://imagej.273.s1.nabble.com/Set-Threshold-records-incorrect-values-16bit-images-Ubuntu-tp3695217p3695234.html

Ghislain Bugnicourt wrote:

> 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 :
> http://n2.nabble.com/file/n789839/Threshold_Adjuster2.java
> Threshold_Adjuster2.java (I renamed it)
> And this time it works !
>  

Yes, I can confirm this too.

> 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 spotted this too...

> 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).
>  

Well it already seems that Gabriel (using OpenSuse 11.0) has replicated
this bug by rescaling the example M51 image so it's clearly not
restricted to Ubuntu 8.04.

Incidently, I also replicated the bug using a 32-bit image, but I think
we already know now that this is most likely a red-herring.

> Thank you Wayne. Really. Not only for resolving the problem, but for your
> time and consideration.
>  

Yes indeed. Many thanks Wayne...

Dave Randell