[ImageJ-bugs] [Bug 1183] ij.process.AutoThresholder and fiji.threshold.Auto_Threshold return different values

bugzilla at fiji.sc bugzilla at fiji.sc
Thu Nov 5 22:26:16 CST 2015


http://fiji.sc/bugzilla/show_bug.cgi?id=1183

Wayne Rasband <wsr at nih.gov> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |wsr at nih.gov
         Resolution|---                         |WONTFIX

--- Comment #1 from Wayne Rasband <wsr at nih.gov> ---
The ij.process.AutoThresholder class currently only works with 8-bit
histograms. To threshold a 16-bit image, ImageJ converts the image to 8-bits,
gets the threshold and then scales it to a 16-bit threshold. This JavaScript
demonstrates how to get the thresholds of each image in a 16-bit stack.

  imp = IJ.openImage("http://imagej.nih.gov/ij/images/t1-head.zip");
  stack = imp.getStack();
  for (i=1; i<=stack.getSize(); i++) {
    ip = stack.getProcessor(i);
    ip.setAutoThreshold("Moments dark");
    print(i+" "+ip.getMinThreshold());
  }

I updated the AutoThresholder JavaDocs to make it clear that it only works with
8-bit images.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-bugs/attachments/20151106/0f785c4e/attachment.html>


More information about the Imagej-bugs mailing list