We're Hiring!

Convert to OME-TIFF

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

Convert to OME-TIFF

Postby bhcho » Mon Apr 05, 2010 2:28 pm

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?
bhcho
 
Posts: 236
Joined: Mon Apr 05, 2010 2:15 pm

Re: Convert to OME-TIFF

Postby mlinkert » Mon Apr 05, 2010 9:08 pm

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
User avatar
mlinkert
Team Member
 
Posts: 353
Joined: Fri May 29, 2009 2:12 pm
Location: Southwest Wisconsin

Re: Convert to OME-TIFF

Postby bhcho » Mon Apr 05, 2010 9:33 pm

Thanks Melissa,

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

BK
bhcho
 
Posts: 236
Joined: Mon Apr 05, 2010 2:15 pm

Re: Convert to OME-TIFF

Postby mlinkert » Thu Apr 08, 2010 9:48 pm

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
User avatar
mlinkert
Team Member
 
Posts: 353
Joined: Fri May 29, 2009 2:12 pm
Location: Southwest Wisconsin

Re: Convert to OME-TIFF

Postby bhcho » Fri Apr 09, 2010 1:18 am

Thanks Melissa,

Now it works!
bhcho
 
Posts: 236
Joined: Mon Apr 05, 2010 2:15 pm


Return to Developer Discussion

Who is online

Users browsing this forum: No registered users and 1 guest