[ome-users] Writing conventional TIFF through BioFormats exporter

simon andrews simon.andrews at babraham.ac.uk
Tue Jun 18 15:39:52 BST 2013


Thanks for that.  I've implemented a similar solution by hacking around the existing plugin code within my application, but I've taken some of the ideas from your example which I'm sure is the more correct way to do things.

Anyway - it's all working now.  Thanks for the help

Simon.


On 18 Jun 2013, at 14:43, Curtis Rueden wrote:

Hi Simon,

> What I still can't do is prevent the popup for the compression type.

Yeah, the issue was a bit tricky. I took a crack at it and came up with this workaround:

https://gist.github.com/ctrueden/5805462

Hope it helps you. There is probably a simpler way but I don't have time to investigate further.

Regards,
Curtis


On Tue, Jun 18, 2013 at 7:36 AM, simon andrews <simon.andrews at babraham.ac.uk<mailto:simon.andrews at babraham.ac.uk>> wrote:

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/><http://www.babraham.ac.uk/email_disclaimer.html>


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>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20130618/6bb0c19f/attachment.html>


More information about the ome-users mailing list