Page 1 of 1

Convert to OME-TIFF

PostPosted: Mon Apr 05, 2010 2:28 pm
by bhcho
I'm trying to convert image files into OME-TIFF file using ConvertToOmeTiff.java.
I successfully comiled the source code using loci_tools.jar and ome-xml.jar (both are trunk build version)
But when I run it, I got the following run time error messages.

java ConvertToOmeTiff img_1_d.tiff
Converting img_1_d.tiff to img_1_d.ome.tif java.lang.IllegalArgumentException: Output stream expected to be not-null
at loci.formats.tiff.TiffSaver.<init>(TiffSaver.java:74)
at loci.formats.out.TiffWriter.saveBytes(TiffWriter.java:119)
at loci.formats.out.TiffWriter.saveBytes(TiffWriter.java:214)
at loci.formats.out.OMETiffWriter.saveBytes(OMETiffWriter.java:224)
at ConvertToOmeTiff.main(ConvertToOmeTiff.java:55)

any ideas?

Re: Convert to OME-TIFF

PostPosted: Mon Apr 05, 2010 9:08 pm
by mlinkert
I successfully comiled the source code using loci_tools.jar and ome-xml.jar (both are trunk build version)


If you have loci_tools.jar, you do not need ome-xml.jar. loci_tools.jar contains all of Bio-Formats' dependencies, including ome-xml.jar.

But when I run it, I got the following run time error messages.

java ConvertToOmeTiff img_1_d.tiff
Converting img_1_d.tiff to img_1_d.ome.tif java.lang.IllegalArgumentException: Output stream expected to be not-null
at loci.formats.tiff.TiffSaver.<init>(TiffSaver.java:74)
at loci.formats.out.TiffWriter.saveBytes(TiffWriter.java:119)
at loci.formats.out.TiffWriter.saveBytes(TiffWriter.java:214)
at loci.formats.out.OMETiffWriter.saveBytes(OMETiffWriter.java:224)
at ConvertToOmeTiff.main(ConvertToOmeTiff.java:55)


From the exception, it looks like you have an outdated version of ConvertToOmeTiff.java. I would recommend that you update to the latest version (Subversion revision 6038); you can either check it out from the Bio-Formats Subversion repository, or download it here:

https://skyking.microscopy.wisc.edu/tra ... eTiff.java

Please let us know if you continue to experience problems after updating.

Regards,
-Melissa

Re: Convert to OME-TIFF

PostPosted: Mon Apr 05, 2010 9:33 pm
by bhcho
Thanks Melissa,

Unfortunately, I have the same problem after I update the source code.

BK

Re: Convert to OME-TIFF

PostPosted: Thu Apr 08, 2010 9:48 pm
by mlinkert
Hi,

Thanks for the update. I was able to reproduce this problem, and have fixed it in the very latest trunk build of loci_tools.jar. Can you please try updating your loci_tools.jar, and see if that fixes the problem for you?

Regards,
-Melissa

Re: Convert to OME-TIFF

PostPosted: Fri Apr 09, 2010 1:18 am
by bhcho
Thanks Melissa,

Now it works!