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

bugzilla at fiji.sc bugzilla at fiji.sc
Wed Nov 4 05:18:18 CST 2015


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

            Bug ID: 1183
           Summary: ij.process.AutoThresholder and
                    fiji.threshold.Auto_Threshold return different values
           Product: Fiji
           Version: unspecified
          Hardware: Macintosh
                OS: Mac OS
            Status: NEW
          Severity: normal
          Priority: P4
         Component: Plugins
          Assignee: imagej-bugs at imagej.net
          Reporter: radoslaw at ejsmont.net
                CC: radoslaw at ejsmont.net

Hi,

I have been developing a jython script ij which I needed to autothreshold some
stacks. I have first used the ij.process.AutoThresholder using histogram I got
from the following snipplet:

```
for zsliceno in range(1, stack.getSize() + 1):
    zslice = stack.getProcessor(zsliceno)
    if zsno == 1:
        histogram = zslice.getHistogram()
    else:
        temp = zslice.getHistogram()
        for i in range(0, len(histogram)):
            histogram[i] += temp[i]
thresholder = AutoThresholder()
threshold = thresholder.getThreshold("Moments", histogram)
```

calling the plugin gives a different value:

```
thresholder = Auto_Threshold()
anarray = thresholder.exec(image, "Moments", False, False, True, True, False,
True)
```

The image is 16-bit. These seems to be a bug in ij.process.AutoThresholder, or
I am doing something terribly wrong :)

Information about your version of Java:

  os.arch => x86_64
  os.name => Mac OS X
  os.version => 10.11.1
  java.version => 1.8.0_51
  java.vendor => Oracle Corporation
  java.runtime.name => Java(TM) SE Runtime Environment
  java.runtime.version => 1.8.0_51-b16
  java.vm.name => Java HotSpot(TM) 64-Bit Server VM
  java.vm.version => 25.51-b03
  java.vm.vendor => Oracle Corporation
  java.vm.info => mixed mode
  java.awt.graphicsenv => sun.awt.CGraphicsEnvironment
  java.specification.name => Java Platform API Specification
  java.specification.version => 1.8
  sun.cpu.endian => little
  sun.desktop => null
  file.separator => /

The up-to-date check says: REMIND_LATER

Information relevant to JAVA_HOME related problems:

  JAVA_HOME is set to:
/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home//jre
  imagej.dir => /Applications/Fiji.app

Information about the version of each plugin:

Activated update sites:
ImageJ: http://update.imagej.net/ (last check:20151026205651)
Fiji: http://update.fiji.sc/ (last check:20151028163859)
3D ImageJ Suite: http://sites.imagej.net/Tboudier/ (last check:20151103085731)

Files not up-to-date:
  968c6425 (MODIFIED) 20151103165434 Contents/Info.plist
  3af43208 (MODIFIED) 20150906115145 jars/jython-shaded-2.7.0.jar
  e85a2018 (LOCAL_ONLY) 20150121223046
plugins/DeconvolutionLab/DeconvolutionLab_.jar
  71331805 (LOCAL_ONLY) 20100820154940 plugins/jacop_.jar

-- 
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/20151104/8fa7f896/attachment.html>


More information about the Imagej-bugs mailing list