knime-ip / knip

KNIME Image Processing Extension
https://www.knime.com/community/image-processing
49 stars 11 forks source link

Image Writer loses data when writing ICS format #454

Open imagejan opened 7 years ago

imagejan commented 7 years ago

When writing an image (X,Y,Z,Time,Channel) in ics format, the resulting file has much less planes than expected. See the workflow uploaded here:

http://jmp.sh/IV7snca

Note: writing the file using Scifio in Fiji (File > Export > Image...) works as expected, so it's not a SCIFIO issue.

dietzc commented 7 years ago

Thanks for the detailed workflow and explanation. I was able to reproduce the problem. However, it may still be SCIFIO related. Are you sure the image is written with SCIFIO in ImageJ2 and not BioFormats or IJ1? Anyway, we will investigate it!

imagejan commented 7 years ago

Hm, I'm pretty sure that File > Export > Image will use SCIFIO. Anyways, thanks for investigating!

tibuch commented 6 years ago

Any news on this issue? I try to read ics images with libics (https://github.com/svi-opensource/libics). If I read this example image (http://loci.wisc.edu/sample-data/qdna1) everything works fine. I can also convert it to tif and save it as tif. KNIME/Fiji are able to open the original example image and it is possible to save it as tif. But if the image is saved as ics from KNIME/Fiji and then read with libics I get 5 dimensions (original has 2) and the converted tif is mixed up. Opening the image written by KNIME/Fiji works just fine.

gab1one commented 6 years ago

Opening the image written by KNIME/Fiji works just fine. Which image do you mean in that sentence? The one read as ICS and written as TIF?

tibuch commented 6 years ago

That is confusing, sorry. What I did:

  1. Read example ICS image with KNIME/Fiji.
  2. Write this image with KNIME/Fiji as ICS. (example_from_knime_fiji.ics)
  3. Read this image (example_from_knime_fiji.ics) which works fine.
  4. Read this image via libics results in 5 dimensions.
gab1one commented 6 years ago

So the metadata was modified during reading?

tibuch commented 6 years ago

Maybe, but it was definitely modified during writing. And it was modified in such a way that it can't be read by libics but KNIME/Fiji can still read it.

gab1one commented 6 years ago

Sorry now I understand, this seems to be a bug in the scifio ics format. I will file it there.

tibuch commented 6 years ago

Thanks!