<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_RESOLVED  bz_closed"
   title="RESOLVED INVALID - Macro stops running when no object found 3D object Count"
   href="http://fiji.sc/bugzilla/show_bug.cgi?id=1175">bug 1175</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>CONFIRMED
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>INVALID
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - Macro stops running when no object found 3D object Count"
   href="http://fiji.sc/bugzilla/show_bug.cgi?id=1175#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - Macro stops running when no object found 3D object Count"
   href="http://fiji.sc/bugzilla/show_bug.cgi?id=1175">bug 1175</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>This problem occurs when the threshold given is outside the range of the data.
The UI does not allow you to input such thresholds, but from a macro it is
possible -- hence the error message.

You can work around it with the following code:

  newImage("HyperStack", "8-bit color-mode", 121, 154, 1, 114, 1);
  getStatistics(area, mean, min, max, std, histogram);
  if (max < 128) threshold = max;
  else threshold = 128;
  print "Using threshold of " + threshold);
  run("3D Objects Counter", "threshold=" + threshold +
      " slice=50 min.=10 max.=2124276 " +
      "objects surfaces centroids centres_of_masses statistics summary");

You may need to do something similar for invalid values of other parameters
too; I'm not sure.

I guess the plugin could be changed to not show this error message when running
from a macro. If anyone wants to adopt the 3D Objects Counter plugin (currently
unmaintained), that would be great.</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>