Skip to content

OME-Zarr and standalone app #668

@will-moore

Description

@will-moore

Plans, explanations, questions and discussions...

Initial Goals

  • OMERO.figure continues to behave exactly as before for OMERO users
    • Install web app with pip install omero-figure
    • Manually install reportlab and markdown on the server and copy script or use App GUI
  • Add public OME-Zarr images (urls) to figures. Zarr #663
    • The imageId of each panel is the Zarr url OR OMERO image ID.
    • Rendering happens in the browser using ome-zarr.js
    • panel.get_img_src() is now async - returns either /webclient/render_image/ID/... OR data:image/png;base64,iVBORw0KGgoAAAAN...
    • The Figure_To_Pdf.py script needs to handle OME-Zarr urls Export script handles OME-zarr images #662
  • Pushing to main branch deploys stand-alone app to https://will-moore.github.io/omero-figure/ Standalone app #666
    • 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)
  • Users can run the Figure_To_Pdf.py locally to convert figure.json -> PDF / TIFF Standalone python script #669
    • 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.pdf
    • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions