Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OME-TIFF: allow BigTIFF extensions during export #1790

Merged
merged 1 commit into from May 12, 2015

Conversation

melissalinkert
Copy link
Member

This allows switching to BigTIFF without using the setBigTiff API method.
See https://trello.com/c/1q2GATUh/171-bigtiff-extensions-for-ome-tiff.

To test, verify that converting any file to a file with the .ome.btf, .ome.tf2, or .ome.tf8 extension via bfconvert or ImageJ results in a BigTIFF file. When using bfconvert, the output should show a message similar to Switching to BigTIFF based on extension. The converted files should be readable, and showinf should identify them as being OME-TIFF files.

This allows switching to BigTIFF without using the setBigTiff API
method.
@ghost
Copy link

ghost commented May 12, 2015

This works with bfconvert, but not with the ImageJ export dialogue. Looks like the readers.txt and writers.txt are not up-to-date with the reader and writer extensions? Suggested fix is below, but note I didn't see any change to the exporter extension list even after making this change--it worked for plain TIFF, but not for OME-TIFF--is something additional required?

diff --git a/components/formats-api/src/loci/formats/readers.txt b/components/formats-api/src/loci/formats/readers.txt
index ea70211..37af309 100644
--- a/components/formats-api/src/loci/formats/readers.txt
+++ b/components/formats-api/src/loci/formats/readers.txt
@@ -141,7 +141,7 @@ loci.formats.in.NDPIReader            # ndpi
 loci.formats.in.PCORAWReader          # pcoraw

 # TIFF-based readers with slow isThisType
-loci.formats.in.OMETiffReader         # tif
+loci.formats.in.OMETiffReader         # tif, tiff, tf2, tf8, btf
 loci.formats.in.PyramidTiffReader     # tif, tiff
 loci.formats.in.MIASReader            # tif
 loci.formats.in.TCSReader             # xml, tif
@@ -166,7 +166,7 @@ loci.formats.in.LeicaSCNReader        # scn
 loci.formats.in.SlidebookTiffReader   # tiff

 # standard TIFF reader must go last (it accepts any TIFF)
-loci.formats.in.TiffDelegateReader    # tif, tiff
+loci.formats.in.TiffDelegateReader    # tif, tiff, tf2, tf8, btf

 # standard text reader must go last (it accepts any plaintext)
 loci.formats.in.TextReader            # txt, csv
diff --git a/components/formats-api/src/loci/formats/writers.txt b/components/formats-api/src/loci/formats/writers.txt
index 52eb556..37d7556 100644
--- a/components/formats-api/src/loci/formats/writers.txt
+++ b/components/formats-api/src/loci/formats/writers.txt
@@ -3,8 +3,8 @@
 # Please do not edit unless you know what you are doing.

 loci.formats.out.OMEXMLWriter          # ome
-loci.formats.out.OMETiffWriter  # ome.tif, ome.tiff
-loci.formats.out.TiffWriter     # tif, tiff
+loci.formats.out.OMETiffWriter  # ome.tif, ome.tiff, ome.tf2, ome.tf8, ome.btf
+loci.formats.out.TiffWriter     # tif, tiff, tf2, tf8, btf
 loci.formats.out.JPEGWriter     # jpg, jpeg
 loci.formats.out.JPEG2000Writer # jp2
 loci.formats.out.APNGWriter     # png

Not sure why tiff wasn't already a valid OMETiffReader extension.

@melissalinkert
Copy link
Member Author

The extensions listed in readers.txt and writers.txt have no bearing on the functionality here - everything after a # in those files is a comment.

I haven't been able to duplicate the problem with ImageJ so far - could you please verify that what you have installed in ImageJ contains this change?

@ghost
Copy link

ghost commented May 12, 2015

@melissalinkert I just did an ant build of develop+this branch and copied loci_tools.jar into the plugins dir of a stock ImageJ tree (1.49b). I didn't realise the extensions were comments, I thought it was part of the file format.

In the Exporter dialogue, the Files of Type combobox has TIFF with five extensions (tif tiff tf2 tf8 btf) but OME-TIFF only has two (ome.tif ome.tiff). I'll double-check I'm using the right jar just in case I'm doing something stupid.

@melissalinkert
Copy link
Member Author

I assume there is no bio-formats_plugins.jar or bioformats_package.jar present in the ImageJ plugins directory? Does Help > About Plugins > Bio-Formats Plugins show the correct build date and commit hash?

If so, could you please describe exactly what you did and in what way it doesn't work? The new extensions do show up in the Plugins > Bio-Formats > Bio-Formats Exporter file chooser for me, and exporting to a .ome.btf (for example) file does result in a BigTIFF OME-TIFF (confirmed with file, tiffinfo, and showinf), so any additional details here would be helpful.

@ghost
Copy link

ghost commented May 12, 2015

@melissalinkert OK, it was just me being stupid. Everything works correctly and it looks fine to merge.

melissalinkert added a commit that referenced this pull request May 12, 2015
OME-TIFF: allow BigTIFF extensions during export
@melissalinkert melissalinkert merged commit 0cc4aa1 into ome:develop May 12, 2015
@melissalinkert melissalinkert deleted the ome-bigtiff-ext branch May 12, 2015 20:40
@joshmoore joshmoore added this to the 5.1.2 milestone May 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants