<html>
    <head>
      <base href="http://fiji.sc/bugzilla/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:ctrueden@wisc.edu" title="Curtis Rueden <ctrueden@wisc.edu>"> <span class="fn">Curtis Rueden</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEEDSINFO "
   title="NEEDSINFO - Bug in the Intermodes algorithm of threshold"
   href="http://fiji.sc/bugzilla/show_bug.cgi?id=938">bug 938</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>NEEDSINFO
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>bnorthan@gmail.com, ctrueden@wisc.edu, g.landini@bham.ac.uk
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEEDSINFO "
   title="NEEDSINFO - Bug in the Intermodes algorithm of threshold"
   href="http://fiji.sc/bugzilla/show_bug.cgi?id=938#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_NEEDSINFO "
   title="NEEDSINFO - Bug in the Intermodes algorithm of threshold"
   href="http://fiji.sc/bugzilla/show_bug.cgi?id=938">bug 938</a>
              from <span class="vcard"><a class="email" href="mailto:ctrueden@wisc.edu" title="Curtis Rueden <ctrueden@wisc.edu>"> <span class="fn">Curtis Rueden</span></a>
</span></b>
        <pre>Thanks for the report, and macro to reproduce!

The ImageJ 1.x implementation is in a class called AutoThresholder:

<a href="https://github.com/imagej/ImageJA/blob/v1.49h/src/main/java/ij/process/AutoThresholder.java#L176-L220">https://github.com/imagej/ImageJA/blob/v1.49h/src/main/java/ij/process/AutoThresholder.java#L176-L220</a>

And the "Auto Threshold" implementation, which is part of Fiji, can be found
at:

<a href="https://github.com/fiji/Auto_Threshold/blob/0565751243a83688c84857475adb51ae836a843e/src/main/java/fiji/threshold/Auto_Threshold.java#L493-L541">https://github.com/fiji/Auto_Threshold/blob/0565751243a83688c84857475adb51ae836a843e/src/main/java/fiji/threshold/Auto_Threshold.java#L493-L541</a>

The ImageJ 1.x implementation returns 1713 when "Dark background" is checked.
The Fiji Auto_Threshold implementation returns 525.

It was not clear to me from your bug report which algorithm you believe to be
correct, and which incorrect. However, seeing as how the minimum data value of
the entire "Neuron" sample image is 526, the value 525 seems obviously wrong to
me. So I conclude that the ImageJ 1.x result is correct, while the Fiji
Auto_Threshold result is incorrect. Right?

As an aside: there is a third implementation, recently ported from Fiji's
Auto_Thresold, in the ImageJ OPS library:

<a href="https://github.com/imagej/imagej-ops/blob/114183192d41e9dcbe0e6450512170f8a566dc6e/src/main/java/net/imagej/ops/threshold/global/methods/ComputeIntermodesThreshold.java#L58-L100">https://github.com/imagej/imagej-ops/blob/114183192d41e9dcbe0e6450512170f8a566dc6e/src/main/java/net/imagej/ops/threshold/global/methods/ComputeIntermodesThreshold.java#L58-L100</a>

Since it was ported from Fiji's Auto_Threshold, it also suffers from this bug.

Gadea: Could you please confirm that the ImageJ 1.x code produces the correct
result, and the Fiji Auto_Threshold code an incorrect one? If so, I will fix
the bug in the two affected libraries.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>