Image Converter Node: Double to UnsignedByteType

Hi KNIP,

we are currently loading images (previously saved as DoubleType images using the Image Writer node in the KNIP toolbox) into KNIME using the image reader node. We would like to convert them to UnsignedByteType by scaling using the Imge Converter node, however this seems to be unsuccessful (i.e. the images just stay as double type).

Do you have any suggestions? (if required I can upload an example workflow as well, values in the double type images dont exceed 16bit)

Cheers and thanks in advance,

Ben

Hi Ben,

You could try to first convert the image to FloatType with the "Copy" option activated and then convert the resulting image with the "Normalize and Scale" to the "UnsignedByteType" image.

If this does not work I would be happy to take a look at your workflow.

 

Cheers

Tim

Hi Tim,

Thanks for that! I found a similar solution using a copy to “Long Type” first.

Purely out of interest, do you know what the mechanism in java is resulting in this behaviour?

Cheers,
Ben

Hi Ben,

I think we may have a problem with the way we normalize double images, which we should fix in the future! Thanks for pointing that out.

If you have any further questions, we are happy to answer them!

Best,

Christian

Dear Christian,

thanks a lot for this answer! I will post if I have trouble elsewhere.

Best,

Ben