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
Copy file name to clipboardExpand all lines: README.rst
+38-9Lines changed: 38 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,36 +70,37 @@ Optional: To change the maximum active channel count from the default of 10:
70
70
Now restart OMERO.web as normal.
71
71
72
72
73
-
Enabling figure export
74
-
----------------------
73
+
Enabling figure export from OMERO
74
+
---------------------------------
75
75
76
76
This section assumes that an OMERO.server is already installed.
77
77
78
78
Figures can be exported as PDF or TIFF files using a script that runs on the OMERO.server. This script needs to be uploaded to the OMERO.server and its dependencies
79
79
installed in the OMERO.server virtual environment.
80
80
81
-
The script can be uploaded using two alternative workflows, both of which require you to have the correct admin privileges.
82
-
To find where OMERO.figure has been installed using pip, run:
81
+
The script can be uploaded using various workflows, all of which require you to have the correct admin privileges.
82
+
83
+
*Option 1*: Log in to the webclient as an Admin and open the OMERO.figure app. If the OMERO script is not found or is not up to date, you will
84
+
see a warning message with a button to upload the script. Click the button to upload the script from the OMERO.figure app.
85
+
86
+
*Option 2*: Upload the script from the installation directory. To find where OMERO.figure has been installed using pip, run:
83
87
84
88
::
85
89
86
90
$ pip show omero-figure
87
91
88
92
The command will display the absolute path to the directory where the application is installed e.g. ``~/<virtualenv_name>/lib/python3.6/site-packages``. Go to that directory.
89
93
90
-
*Option 1*: Connect to the OMERO server and upload the script via the CLI. It is important to be in the correct directory when uploading so that the script is uploaded with the full path: ``omero/figure_scripts/Figure_To_Pdf.py``:
94
+
Connect to the OMERO server and upload the script via the CLI. It is important to be in the correct directory when uploading so that the script is uploaded with the full path: ``omero/figure_scripts/Figure_To_Pdf.py``:
*Option 2*: Alternatively, before starting the OMERO.server, copy the script from the figure install
101
+
*Option 3*: Alternatively, before starting the OMERO.server, copy the script from the figure install
98
102
``/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py`` to the OMERO.server ``path/to/OMERO.server/lib/scripts/omero/figure_scripts``. Then restart the OMERO.server.
99
103
100
-
*Option 3*: Upload the script through the OMERO web interface: For this, log into your OMERO web interface as admin, select the scripts icon and click on the "Upload Script" button.
101
-
Select the ``Figure_To_Pdf.py`` script from the directory where you copied it to locally and upload it into the directory ``omero/figure_scripts``.
102
-
103
104
Now install the script's dependencies:
104
105
105
106
@@ -117,6 +118,34 @@ Now install the script's dependencies:
117
118
118
119
$ pip install markdown
119
120
121
+
122
+
Run Figure export locally
123
+
-------------------------
124
+
125
+
If your figure contains only OME-Zarr images (no images from OMERO), then
126
+
the export script can be run locally to convert a figure JSON file to PDF or TIFF.
127
+
NB: the OME-Zarr URLs must be accessible from the machine where the export script is run.
128
+
NB: channel LUTs are not currently supported when rendering OME-Zarr images for PDF or TIFFs.
129
+
Any LUTs will be rendered with white color.
130
+
131
+
Download the figure JSON (File > Save, in the standalone app) then install the export script.
132
+
Here, we create a new conda environment and install the export script:
133
+
134
+
::
135
+
136
+
$ conda create --name figure_export python=3.12
137
+
$ conda activate figure_export
138
+
$ pip install "omero-figure[export]"
139
+
140
+
To export the figure as PDF or TIFF, run the script with the path to the figure JSON and the output file path as arguments:
141
+
Use the ``.pdf`` extension for PDF export and ``.tiff`` for TIFF export. This example exports the
142
+
downloaded `figure_json/my_figure.json` to `my_figure.pdf` in the current directory:
0 commit comments