ome / omero-figure

An OMERO.web app for creating Figures from images in OMERO
http://figure.openmicroscopy.org
GNU Affero General Public License v3.0
15 stars 30 forks source link

method to build figure without creating file annotation on the server #289

Open carandraug opened 6 years ago

carandraug commented 6 years ago

The Figure_To_Pdf.py script could be used by a client to generate PDF or TIFF from the figure json like so:

script_params = {
    'Figure_JSON' : figure_json,
    'Export_Option' : 'TIFF',
    'Webclient_URI': 'https://omero1.bioch.ox.ac.uk/webclient/',
}
fig_export = TiffExport(conn, script_params, export_images=False)
fig_export.build_figure()

However, this method ends by uploading the built figure as a file annotation to the omero server. Would it be possible to have a method that only does the building of the figure?

will-moore commented 6 years ago

Hi - the figure generated by the Scripting service is initially created in the temp folder where the script runs but this is deleted when the script completes. The only way to pass the figure back to the client that ran the script is to save the file to OMERO.

We really need to separate the figure-generation code from the OMERO.script so that figures can be created independently of the scripting service. This was started in https://github.com/ome/omero-figure/pull/240 (primarily as a way for the web to export figures without the scripting service) but didn't get completed yet.

I've created a card to complete this work: https://trello.com/c/8vNGPi2n/190-export-without-scripting-service

will-moore commented 6 years ago

Apologies - I missed the fact that you're already exporting without the scripting service. But separating the creation of the figure and upload to OMERO as File Annotation etc was included in #240 so it's still relevant.

will-moore commented 3 years ago

Another request for python scripting an export of OMERO.figure that would be nicer if we didn't need to use the script and create a File Annotation. https://forum.image.sc/t/use-python-to-export-figures-from-omero/46520/4