Page 1 of 1

Converting Tiffs to OME-TIFF

PostPosted: Sun Oct 18, 2015 10:04 pm
by ctr26
Hi all,

I see here that a LabVIEW based OME-TIFF creator is unlikely to happen very soon. As a work around I plan on using a libtiff dll interface built in labview to export my images there. I would therefore like to use the bioformats command line tools to extract the header of my non-xml tiff files and replace it with a suitable OME header. Two problems have cropped up though.

1

tiffcomment -set 'newmetadata.xml' sample.ome.tif

literally inserts 'newmetadata.xml' into the header rather than the contents of a file. Has anyone else had this problem?

2

I'm not entirely convinced tiffcomment extracts or injects the full XML data I would need to convert a page series of tiffs created by libtiff into an OME-TIFF hyperstack type image. Has anyone else tried to convert a regular TIFF stack to an OME-TIFF hyperstack pre/post or mid stack creation?

Any help welcome, I am fairly new to bioformats but would love to get on board!

Regards,

Craig

Re: Converting Tiffs to OME-TIFF

PostPosted: Mon Oct 19, 2015 7:47 am
by mtbc
Dear Craig,

I know nothing of LabView, but does it help that Bio-Formats now ships with a BSD-licensed OME-TIFF writer that is implemented wholly in C++? https://www.openmicroscopy.org/site/sup ... rview.html gives a summary.

Cheers,

Mark

Re: Converting Tiffs to OME-TIFF

PostPosted: Mon Oct 19, 2015 8:00 am
by sbesson
ctr26 wrote:Hi all,


Hi Craig

ctr26 wrote:tiffcomment -set 'newmetadata.xml' sample.ome.tif

literally inserts 'newmetadata.xml' into the header rather than the contents of a file. Has anyone else had this problem?


The following snippet correctly insert the content of the XML file into the TIFF header for me:

Code: Select all
sbesson@ls30630:tmp $ echo "test" > metadata.xml
sbesson@ls30630:tmp $ tiffcomment -set 'metadata.xml' test.tif


The following allows me to reproduce your issue:

Code: Select all
sbesson@ls30630:tmp $ rm metadata.xml
sbesson@ls30630:tmp $ tiffcomment -set 'metadata.xml' test.tif


Can you check the -set argument you are passing is a relative or absolute path to an existing XML file?

ctr26 wrote:Has anyone else tried to convert a regular TIFF stack to an OME-TIFF hyperstack pre/post or mid stack creation?


To the best my knowledge, several groups have certainly been able to insert OME-XML headers into TIFF stacks to correctly specify their dimensionality and metadata. The trick is to have the header properly formatted here. Are you dealing with a single multi-page TIFF or several multi-page TIFFs?

Best,
Sebastien

Re: Converting Tiffs to OME-TIFF

PostPosted: Mon Oct 19, 2015 10:18 am
by ctr26
Its a single mulipage tiff stack and I fixed the bat issue by using " instead of ', oh windows...