Closed stelfrich closed 7 years ago
As also noted on the forum thread, it is the responsibility of the caller to ensure that the result fits into the given type. (The Image Calculator cannot know what kind of calculation you'll do, and therefore cannot simply assume DoubleType or some such, as this wouldn't always be desirable. It's hard to follow the principle of least surprise here...)
It could be documented a bit better, though.
It could be documented a bit better, though.
Indeed! Especially since we have the situation of an Image Calculator menu item in ImageJ/Fiji with close ties to the ImageJ1 "world" and an Image Calculator node using ImgLib2 under the hood. So I guess this should be clearly stated in the documentation of the Image Calculator node.
Well, we also have an ImageJ2 ImageCalculator
that presumably acts the same as KNIP's ImageCalculator regarding the types. :-D (and then Ops!)
Well, we also have an ImageJ2 ImageCalculator that presumably acts the same as KNIP's ImageCalculator regarding the types. :-D
As if the situation wasn't confusing enough already. :sob:
It could be documented a bit better, though.
See #472.
When output type of the Image Calculator node is set to
UnsignedByteType
, results are not the same when the output type is set to e.g.FloatType
and the conversion toUnsignedByteType
is done subsequently via clipping.See also http://forum.imagej.net/t/macro-help-for-simple-automated-image-arithmetic/5184/6