Open dietzc opened 9 years ago
The problem is that Knime hasn't filled in the ImgPlus.set/getValid bits field:
If you did this for integer images, the bridge would normalize properly. Floating-point images should probably not be normalized.
I should probably pass this through the bridge because applications like ImageJ and Ilastik need to have the image un-normalized: converted to 8-bit or 16-bit ranges for analysis.
So how can I decide on KNIME side which images I should normalize between 0...1 and which I shouldn't? Can I get this information from the pipeline?
Is there some way you can call ImgPlus.setValidBits()? It should be easy for 8-bit (if you have a byte image, setValidBits(8), but for 16, some of them are really 12 (0-4095) which you can tell by reading the TIFF. If you do that, it's my job to normalize (or the job of the bridge).
CellProfiler, for now, only accepts images with pixel values between 0 and 1. We should normalize the images in the knime-bridge, rather than in KNIME itself. Therefore we can directly do it on the underlying data-array, which is faster. Additionally, users don't need to worry about a suitable format for CellProfiler, as the bridge takes care about.