Bug(s) in ThresholdAdjuster.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Bug(s) in ThresholdAdjuster.java

CARL Philippe (LBP)
Dear all / Wayne,

 

By launching the following macro:

 

run("Blobs (25K)");

run("Threshold...");

setAutoThreshold("Default dark");

waitForUser("set threshold values");

setThreshold(100, 255);

 

you will see that the new threshold values are not really applied in the
Threshold window and this until you modify one of the slider values, and
thus modifying in the same time one of the previously set value.

This issue can be solved by adding:

ij.plugin.frame.ThresholdAdjuster.updateScrollBars();

at the line 3079 of the ij.macro. Functions.java file

and by making the method updateScrollBars() as public

at the line 510 of the ij.plugin.frame. ThresholdAdjuster.java file (i.e.
public void updateScrollBars() {).

 

In the same time, I saw that the Set button of the Threshold window is not
really updating the plot and scrollbars values.

I was able to partially solve these issues by modifying the doSet method of
the ij.plugin.frame. ThresholdAdjuster.java file at line 610 and adding:

minSlider.setValue ((int)level1);

maxSlider.setValue ((int)level2);

which will then correctly updating the scrollbars values.

And with the following lines:

plot.minThreshold = (int)level1;

plot.maxThreshold = (int)level2;

plot.repaint();

I wanted to update as well the plot values, but the lines are not doing the
job and I’m actually not able to figure out how to solve this last issue.

 

Wayne: I thank you very much in advance for considering these corrections
and would really like to understand how to really solve the plot issue.

 

Also why is a “IJ.wait(500);” needed at the line 608 of the the
ij.plugin.frame. ThresholdAdjuster.java file?

 

My best regards,

 

Philippe

 

Philippe CARL

Laboratoire de Biophotonique et Pharmacologie

UMR 7213 CNRS - Université de Strasbourg

Faculté de Pharmacie

74 route du Rhin

67401 ILLKIRCH

Tel : +33(0)3 68 85 41 84

 


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html