scifio / scifio-ome-xml

SCIFIO plug-in providing support for the OME data model, including readers, writers and translators for OME-XML and OME-TIFF formats.
http://scif.io/
BSD 2-Clause "Simplified" License
2 stars 3 forks source link

Nullpointer Exception when writing ome-xml using ImgSaver #22

Closed gab1one closed 9 years ago

gab1one commented 10 years ago

When writing ome-xml using the ImgSaver method here, I get a nullpointer exception in the java.io.File class. This is because here meta.getDatasetName() returns null. You can look at the stacktrace here.

hinerm commented 10 years ago

Thanks @gab1one I can't reproduce this particular bug on my end (although I did find a couple others, which are hopefully fixed now).

Can you share a sample dataset that causes this error?

hinerm commented 10 years ago

Side note: how is the source Img being populated? Was it opened with SCIFIO?

gab1one commented 9 years ago

Hi @hinerm, the Img is filled with random values, I can write it in all other formats but not ome-xml. It happens with all images I tried it with, I think something goes wrong when setting the metadata.

hinerm commented 9 years ago

Hi @gab1one,

I think I resolved the issue. Could you try using the latest SCIFIO master and the fix-ome-writing SCIFIO-OME-XML topic branch and see if it works for?

Thanks!

gab1one commented 9 years ago

Bug is gone with these builds, thanks a lot for fixing this !