OMERO-RAW extension for QuPath allows to directly access to the raw pixels of images. All types of images (RGB, fluorescence, ...) are supported with this extension.
Github repo : https://github.com/BIOP/qupath-extension-biop-omero
Be Careful : QuPath has been updated to 0.5.x. If you still use the 0.4.4 version of QuPath, please keep the qupath-extension-biop-omero-0.7.0 (latest versions are only QuPath 0.5.x compatible) and follow installation by replacing QuPath_Common_Data_0.5 by QuPath_Common_Data_0.4
Prerequisites
Edit > Preferences
.Extension
menu, double-click on the text areaQuPath_Common_Data_0.5
folder (generally, it is C:\QuPath_Common_Data_0.5
with extensions
, models
and qupath-scripts
folder inside)Downloads
qupath-extension-biop-omero-x.x.x.zip
and Unzip it.libs
folder inside OMERO Java
libs
folder and the two unzipped .jar files to C:\QuPath_Common_Data_0.5\extensions
.If there are previous version(s) of
qupath-extension-biop-omero-x.x.x.jar
orsimple-omero-client-x.x.x.jar
in the folder, delete them and keep only the latest one.
Update
Downloads
qupath-extension-biop-omero-x.x.x.zip
and Unzip it.libs
folder inside OMERO Java
Installation
qupath-extension-biop-omero-x.x.x.jar
, simple-omero-client-x.x.x.jar
and libs
folder in QuPath-x.x.x/app
QuPath-x.x.x.cfg
and QuPath-x.x.x (console).cfg
(under QuPath-x.x.x/app
folder)app.classpath=$APPDIR/qupath-extension-biop-omero-x.x.x.jar
app.classpath=$APPDIR/simple-omero-client-x.x.x.jar
app.classpath=$APPDIR/libs/*
C:\QuPath_Common_Data_0.5
by the copied folder.Already installed on BIOP computers
Prerequisites
Step by step
Create a new OMERO server via the command Extensions → OMERO RAW → Browse server… → New server
.
https://omero-server.epfl.ch
4064
for EPFL).Prerequisites
Step by step
It is also possible to select an entire dataset or project to import. Images will be imported individually, without any hierarchy.
More info...
Open in browser
Import OMERO images to QuPath
Import objects
.If ROIs have a comment formatted as mentionned in the "Send annotations to OMERO" section, QuPath will resolve the hierarchy between ROIs.
Import
If you did not have a QuPath project open, the import popup window will not appear. The image will be loaded and a small window popups up to choose the image type.
You can have a look at all active or inactive server used in the current session. You can log-in, log-out or remove every current servers.
Extensions → OMERO RAW → Manage server connections
Log in
, Log out
or remove
depending on what you want to do.The following procedure decribes how to save your annotations as ROIs in OMERO, as well as annotations and detections table. An option can be checked to delete existing ROIs/tables in OMERO in order to keep your project up-to-date and to not mix with previous annotations.
On QuPath
Extensions → OMERO RAW → Send to OMERO → Annotations
On the popup window, select import options
OK
OK
All annotations are automatically sent to OMERO without the need to select them.
Back to the webclient
Type:Class1&Class2:ObjetID:ParentID
.Do not change the format of this comment. If it changes, or if there is no comment, QuPath will not be able to recognize what kind of object/class it is neither to resolve the hierarchy. It will automatically assign the ROI as an annotation object, without any class, at the root hierarchy.
On OMERO, it is only possible to visualize 500 ROIs at the same time. A slider with the number of pages allows you to navigate between all ROIs.
QP Type table_qpprojName_Date
.You can save your QuPath metadata fields on OMERO. If the key
and the value
are identical, then it is sent as an OMERO tag. If they are different, then it is sent as an OMERO key-value pair.
On QuPath
Extensions → OMERO RAW → Send to OMERO → Metadata
On the popup window, select sending options, for key-values and tags separately
Be careful : On OMERO, there is the possibility to have two identical keys with different values. THIS SCENARIO SHOULD BE AVOIDED AT ANY PRICE. If such a case happens, no key-values will be uploaded on OMERO neither be updated and a popup window informs you to change keys to have all UNIQUE keys
OK
OK
Back to the webclient
QuPath view settings can be applied to the image on OMERO
Extensions → OMERO RAW → Send to OMERO → Image & channels settings
OK
As mentionned in the previous section, ROIs can be imported to QuPath at the image import.
But there is also the possibilty to add them to the qupath project at any time. Moreover, if you collaborate with different people on the image, you have the possibility to import from OMERO only the ROIs from a certain user in the current group.
Extensions → OMERO RAW → Import from OMERO → Annotations
On the popup
All
, then all ROIs are importedIf the ROIs stored in OMERO were previously coming from QuPath, then the class and hierarchy of each of them will be automatically retrieved.
You can import your OMERO tags and key-value pairs to QuPath, in the form of QuPath metadata fields. As the tags are on key-word, the key and the value of the QP metadata field will be identical.
Extensions → OMERO RAW → Import from OMERO → Metadata
On the popup window, select import options
Be careful : On OMERO, there is the possibility to have two identical keys with different values. THIS SCENARIO SHOULD BE AVOIDED AT ANY PRICE. If such a case happens, no key-values will be uploaded on OMERO neither be updated and a popup window informs you to change keys to have all UNIQUE keys
Key-values / tags are imported in QuPath as metadata fields.
OMERO channel settings can be loaded on the image in QuPath
Step by step
Extensions → OMERO RAW → Import from OMERO → Channel settings
OK
Automate → Shared scripts → Extension → OMERO
. For extenal users, template scripts are available on our GitHub.If you don't see them, go under
Edit → Preferences → Automation
and enter the path of thequpath-scripts
folder (e.g.C:\QuPath_Common_Data_0.5\qupath-scripts
)
OmeroRawScripting
To check before running every QuPath-OMERO scripts
1/. A project must be open in QuPath.
2/. The connection toomero-server.epfl.ch
needs to be established (with credentials) before running the script.
Client
: OmeroRawClient.getSimpleClient()
./*
* = DEPENDENCIES =
* - qupath-extension-biop-omero - latest version : https://github.com/BIOP/qupath-extension-biop-omero/releases
*
* = REQUIREMENTS =
* - A project must be open in QuPath
* - The connection to omero-server.epfl.ch needs to be established (with credentials) before running the script
* - The current image should have been imported from OMERO.
*
* = TO MAKE THE SCRIPT RUN =
* - You need to have some annotations and/or detections on the current image. If it is not the case, create some.
* - Run the script.
*
* * = AUTHOR INFORMATION =
*...
This piece of code is necessary to add at the beginning of your own scripts if you want to use QuPath-OMERO command.
// get the current displayed image on QuPath
ImageServer<?> server = QP.getCurrentServer()
// check if the current server is an OMERO server. If not, throw an error
if(!(server instanceof OmeroRawImageServer)){
Dialogs.showErrorMessage("Sending ROIs","Your image is not from OMERO ; please use an image that comes from OMERO to use this script");
return
}
def roisOwner = "" // to get rois from all owners, you can set the owner to empty string, or use Utils.ALL_USERS
boolean showNotif = true
Collection<PathObject> pathObjects = QP.getAnnotationObjects()
boolean wasSent = OmeroRawScripting.sendPathObjectsToOmero(server, pathObjects, deleteROI, roisOwner, showNotif)
// display success
if(wasSent)
println "ROIs successfully sent to OMERO"
else
println "An issue occurs when trying to send a ROIs to OMERO"
You can visit this website to get the documentation of each available method for scripting.
In your own scripts, if you use the command
omeroImageData = entry.readImageData()
on an imageEntry from OMERO, please do not forget to addomeroImageData.getServer().close()
to force close the hidden open server (and release ressources in your OMERO server)