NOTICE! This is a static HTML version of a legacy Fiji BugZilla bug.

The Fiji project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Bug 315 - Bio-Formats Exporter throws FormatException when trying to save 16-bit stacks as Quicktime movie
Bio-Formats Exporter throws FormatException when trying to save 16-bit stacks...
Status: RESOLVED MOVED
Product: Fiji
Classification: Unclassified
Component: Bio-Formats
unspecified
Macintosh Mac OS
: P2 normal
Assigned To: ImageJ Bugs Mailing List
Depends on:
Blocks:
 
Reported: 2011-05-17 17:36 CDT by Jan Eglinger
Modified: 2014-06-16 16:45 CDT
1 user (show)

See Also:

Description Jan Eglinger 2011-05-17 17:36:42 CDT
When I tried to save a 16-bit stack as a Quicktime .mov file using Plugins > LOCI > Bio-Formats Exporter, it throws a FormatException, after having asked the user for a file name and having created an empty file.
Instead, it should rather complain *before* asking for the file name, or, even better, offer to convert to 8-bit before saving.

loci.formats.FormatException: Unsupported image type 'uint16'.
	at loci.formats.FormatWriter.checkParams(FormatWriter.java:360)
	at loci.formats.out.QTWriter.saveBytes(QTWriter.java:171)
	at loci.formats.FormatWriter.saveBytes(FormatWriter.java:112)
	at loci.plugins.out.Exporter.run(Exporter.java:441)
	at loci.plugins.LociExporter.run(LociExporter.java:73)
	at ij.plugin.filter.PlugInFilterRunner.processOneImage(PlugInFilterRunner.java:256)
	at ij.plugin.filter.PlugInFilterRunner.<init>(PlugInFilterRunner.java:105)
	at ij.IJ.runUserPlugIn(IJ.java:195)
	at ij.IJ.runPlugIn(IJ.java:154)
	at ij.Executer.runCommand(Executer.java:147)
	at ij.Executer.run(Executer.java:78)
	at java.lang.Thread.run(Thread.java:680)
Comment 1 Johannes Schindelin 2011-05-17 19:42:57 CDT
There are formats handling 16-bit, so I would not like Bio-Formats to complain before saving :-)

As to the offer to convert to 8-bit: I could imagine that it would make sense to have a stronger distinction in Bio-Formats between interactive and non-interactive mode, and have the question whether to convert to 8-bit only in interactive mode.

But then, this might make problems with recording...
Comment 2 Curtis Rueden 2011-05-17 20:30:51 CDT
I agree with Johannes that for logistical reasons, you can't complain before asking for the filename, because the filename given affects whether the export is possible.

However, the idea of prompting to convert to a legal type is a good one. At the ImageJ/plugin level, we could implement it using another GenericDialog prompt, which asks whether to convert, based on feedback from the image writer. So it would be shown conditionally. It should then work in a macro with the default setting (which would be to perform the conversion).

There might also be changes necessary at the IFormatWriter API level though—I would need to double check. In the meantime, I don't think the current behavior is that bad, since it does tell you why the export failed—it's just ugly.

I have filed a ticket on the OME/Bio-Formats Trac at:
  http://trac.openmicroscopy.org/ome/ticket/5323
Comment 3 Jan Eglinger 2011-05-17 21:22:02 CDT
Of course, I agree, complaining before asking for the name (and format) would be useless. What I meant was rather showing an error message before starting to write the file to disk.

Something else I noticed is that a (8-bit) stack is inverted after it has been saved to Quicktime format. I noticed it only when I scrolled through the stack after saving...

Cheers,
Jan
Comment 4 Curtis Rueden 2011-05-17 23:47:59 CDT
(In reply to comment #3)
> Something else I noticed is that a (8-bit) stack is inverted after it has been
> saved to Quicktime format. I noticed it only when I scrolled through the stack
> after saving...

I tried exporting the "MRI Stack" sample as QuickTime and reopening a few different ways, but was unable to duplicate this inversion behavior. Could you please refile as a separate bug, and include either a macro or step-by-step instructions for duplicating?
Comment 5 Curtis Rueden 2011-10-20 16:59:16 CDT
I am still able to duplicate this bug with today's version of Fiji.
Comment 6 Curtis Rueden 2014-05-16 21:03:04 CDT
The latest incarnation of this feature request is here:
    https://github.com/imagej/imagej-plugins-commands/issues/5

The idea is to address the issue with ImageJ2 and SCIFIO... eventually.
Comment 7 Curtis Rueden 2014-06-16 16:45:32 CDT
I am closing this bug as "moved" since there is an issue on GitHub (https://github.com/imagej/imagej-plugins-commands/issues/5) and this is a feature request. Please comment on the GitHub issue if you want to receive notification regarding any progress.