Login  Register

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

Posted by Michael Schmid on Aug 27, 2008; 12:22pm
URL: http://imagej.273.s1.nabble.com/Set-Threshold-records-incorrect-values-16bit-images-Ubuntu-tp3695217p3695245.html

Hi Ghislain,

my suspicion: the sliders might somehow modify the values,
(maybe when closing the dialog window?).

My suggestion for debugging - create a user plugin from the
built-in Threshold djuster (Great that ImageJ has the same
structure for user plugins and almost all built-in commands!):

- Load
http://rsb.info.nih.gov/ij/source/ij/plugin/frame/ThresholdAdjuster.java
into the plugins directory and rename it to Threshold_Adjuster.java
- replace package ij.plugin.frame; by import ij.plugin.frame.*;
- replace all occurrences of ThresholdAdjuster by Threshold_Adjuster
- in public synchronized void adjustmentValueChanged(AdjustmentEvent e)
add as a first line:
         IJ.log("Adjustment:\n"+e+"\nBefore: "+minValue+","+maxValue);
and as a last line:
         IJ.log("After: "+minValue+","+maxValue);

Then run it with "Compile and Run". After restarting ImageJ it
should be available as a command in the Plugins menu.
You should see in the log window if the sliders get modified
and how they modify your values.

If you have problems - e.g. if you cannot compile it because I
have forgotten a modification, please contact me off-list.

I can't try for myself because I don't have ImageJ on any Linux
machine.

Michael
________________________________________________________________


On 26 Aug 2008, at 10:20, Ghislain Bugnicourt wrote:

> Dear Wayne,
>
> Thanks for your response. I'm sorry because I didn't expose it clearly
> enough : the problem with 'Threshold, set' is not present on the  
> Windows and
> Mac ImageJ files.
> Actually, I only found this problem on Ubuntu, and more recently on  
> Debian.
> Therefore, it seems that the linux installing file has a problem. I  
> join my
> previous message to explain what happens.
>
> Thanks a lot for your care.
> Ghislain Bugnicourt
> CNRS - CRETA - France
>
>
>
> Ghislain Bugnicourt wrote:
>>
>> Hi. First of all, thanks for this wonderful customizable imaging  
>> tool.
>>
>> My issue is about the "set" option of the "adjust...threshold"  
>> tool, on
>> 16-bit grey-scale images. I didn't find such a problem in the  
>> archive.
>> In this "set" dialog box, if I enter values that are not available  
>> with
>> the scrolling bars, it modifies the values. For instance, 107  
>> becomes 9,
>> 940 becomes 104, 372 becomes 107, following a law I couldn't  
>> understand,
>> and depending on the image. The images I obtain (even when doing  
>> 'apply')
>> respect those wrong numbers.
>> But what is incredible is that sometimes it works well in exactly  
>> the same
>> conditions (1/10 times).
>>
>> Configuration :
>>  - Ubuntu 8.04 (There's no problem on Mac and Windows. But I  
>> couldn't try
>> another Ubuntu 8.04)
>>  - The compiz bug (blank images) linked with Java was previously  
>> corrected
>> by canceling the visual effects in Ubuntu.
>>  - ImageJ 1.41j, with Java 1.6.0_05
>>  - 16-bit images obtained with Metamorph (immuno-fluorescence on  
>> neuron
>> cultures)
>>
>
> --
> View this message in context: <a href="http://n2.nabble.com/%22Set-Threshold%">http://n2.nabble.com/%22Set-Threshold% 
> 22-records-incorrect-values---16bit-images---Ubuntu-
> tp760077p783457.html
> Sent from the ImageJ mailing list archive at Nabble.com.