You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The app has a variable APP_SERVED_BY_OMERO which can be used to provide different behaviour when the app is in omero-web or standalone. e.g. if standalone:
File > Open asks for a local file or URL to a json file
File > Save will download json file
Export > shows a dialog with info on how to run the export script locally (see below)
OR cli tool omero-figure export my_figure.json output.pdf
Question: do we want to split the app into 2 installable packages for omero-web and export script?
Rename OMERO.figure to OME.figure
In order to advertise the fact that the "figure" app is available to the broad community of non-OMERO users, I think we need to drop "OMERO" from the name.
Re-naming repos is handled pretty well by github - Old URLs are re-directed etc.
The app could be split into 2 packages and export script installable with/without omero support:
$ pip install omero-figure - same as now
$ pip install ome-figure just install the standalone export script
$ pip install ome-figure[omero] install the standalone export script with omero dependency (not omero-web)
Improved support
Handle bioformats2raw.layout
add multiple OME-Zarr images to a figure at once
Use the OME/METADATA.ome.xml for extra metadata (timestamps etc) that isn't in the zarr.json.
Handle OME-Zarr labels - add as ROIs onto an image
omero-cli-zarr could support $ omero zarr export Figure:ID to export figure.json and all images to OME-Zarr. NB: zarr urls in the figure would need to be relative so they are valid when the figure and images are served together.
Workflows for local OME-Zarr data:
Main issue is that the URL you give to OMERO.figure depends on how you serve the OME-zarr images, and the URL doesn't reflect where the images are stored locally. So you need the URL to be valid when running the export script locally.
Use FileGlancer to serve the images
nice browsing of images -> copy URL -> add to standalone figure.
The URL is a unique ID controlled by Fileglancer. Need to have the same server/username etc running for export script to work
We could possibly use Fileglancer to handle POST from the app to run Figure_To_Pdf.py script!
OR use ome_zarr view my_images/figure_images/ to serve a dir of images for a figure
BUT, you will need to run that exact command during local Figure_To_Pdf.py execution.
Plans, explanations, questions and discussions...
Initial Goals
pip install omero-figureimageIdof each panel is the Zarr url OR OMERO image ID.panel.get_img_src()is now async - returns either/webclient/render_image/ID/...ORdata:image/png;base64,iVBORw0KGgoAAAAN...mainbranch deploys stand-alone app to https://will-moore.github.io/omero-figure/ Standalone app #666APP_SERVED_BY_OMEROwhich can be used to provide different behaviour when the app is in omero-web or standalone. e.g. if standalone:pip install omero-figure[export]could install the script and it's dependencies (reportlab, markdown, PIL, zarr, numpy etc)python omero-figure/scripts/omero/Figure_Scripts/Figure_To_Pdf.py path/to/my_figure.json output.pdfomero-figure export my_figure.json output.pdfomero-webandexport script?Rename OMERO.figure to OME.figure
$ pip install omero-figure- same as now$ pip install ome-figurejust install the standalone export script$ pip install ome-figure[omero]install the standalone export script withomerodependency (not omero-web)Improved support
bioformats2raw.layout$ omero zarr export Figure:IDto export figure.json and all images to OME-Zarr. NB: zarr urls in the figure would need to be relative so they are valid when the figure and images are served together.Workflows for local OME-Zarr data:
ome_zarr view my_images/figure_images/to serve a dir of images for a figure