Login  Register

ZProjector.SUM_METHOD output

Posted by jni on Feb 24, 2014; 11:40pm
URL: http://imagej.273.s1.nabble.com/ZProjector-SUM-METHOD-output-tp5006664.html

Hi all,

I'm just trying to sum all z-slices of a stack together. I assumed that
would be easy enough with the ij.plugin.ZProjector class, but the result is
not what I expected.

In the below Jython interpreter session, imps[0] is a 16bit grayscale image:

```
>>> conv = ImageConverter(imps[0])

>>> conv.convertToGray16()

>>> stats = imps[0].getStatistics()

>>> print(stats.max)
72.0

>>> print(imps[0].getDimensions())
array('i', [1024, 1024, 1, 31, 1])

>>> proj = ZProjector()

>>> proj.setMethod(ZProjector.SUM_METHOD)

>>> proj.setImage(imps[0])

>>> proj.doProjection()

>>> impout = proj.getProjection()

>>> stats = impout.getStatistics()

>>> print(stats.max)
3256.0

>>> print(31*72)
2232
```

Clearly the ZProjector is doing a little bit more than summing. Can anyone
tell me what that is and why?

Thanks!

Juan.

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