[ome-users] Writing conventional TIFF through BioFormats exporter

simon andrews simon.andrews at babraham.ac.uk
Tue Jun 18 13:36:03 BST 2013


On 18 Jun 2013, at 11:55, Curtis Rueden wrote:

> Good point. A similar approach would be to programmatically invoke the Bio-Formats Exporter at the same level ImageJ would internally:
>
> LociExporter bfExporter = new LociExporter();
> bfExporter.setup(arg, myImagePlus);
> bfExporter.run(null); // ImageProcessor argument is ignored here
>
> Where "arg" is the same argument string passed to run.

OK, I'm nearly there, but I think I might be stuck at the end.  After a lot of going through the source for the plugins I can now use the method you suggested above along with a command string such as:

outfile=[d:/whatever/file.tif] splitz=[0] splitc=[0] splitt=[0]

..to get the filename set and to not prompt for the splitting options.  What I still can't do is prevent the popup for the compression type.  Looking at the Exporter.java code I don't think it's possible to do this as the plugin.arg value is read at the start of the run() method but only the outfile, splitZ, splitC and splitT values are read, then plugin.arg is set to null so there's no way to get anything out of there after that.  The compression options code also doesn't seem to have any logic to read a default value.

If this is right then I can't see that I can do what I need through the plugin interface.  Am I reading this right or am I still missing something?

Cheers

Simon.

The Babraham Institute, Babraham Research Campus, Cambridge CB22 3AT Registered Charity No. 1053902.
The information transmitted in this email is directed only to the addressee. If you received this in error, please contact the sender and delete this email from your system. The contents of this e-mail are the views of the sender and do not necessarily represent the views of the Babraham Institute. Full conditions at: www.babraham.ac.uk<http://www.babraham.ac.uk/email_disclaimer.html>



More information about the ome-users mailing list