This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
omero=# select * from dbpatch; | |
id | currentpatch | currentversion | permissions | finished | message | previouspatch | previousversion | external_id | |
----+--------------+----------------+-------------+----------------------------+----------------------------------------------------------------------------------------------+---------------+-----------------+------------- | |
28 | 19 | OMERO5.1DEV | -52 | 2015-02-17 10:50:02.216445 | Database updated. | 18 | OMERO5.1DEV | | |
1 | 7 | OMERO5.1DEV | -52 | 2014-07-24 11:11:25.913143 | Database ready. | 0 | OMERO5.1DEV | | |
2 | 8 | OMERO5.1DEV | -52 | 2014-08-19 11:18:11.136204 | Database updated. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import omero | |
from omero.gateway import BlitzGateway | |
conn = BlitzGateway("ben", "ome", host='localhost', port=4064) | |
conn.connect() | |
conn.SERVICE_OPTS.setOmeroGroup('-1') | |
update = conn.getUpdateService() | |
projectId = 1 | |
project = conn.getObject("Project", projectId) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
from omero.gateway import BlitzGateway | |
conn = BlitzGateway("username", "passwork", port=4064, host="localhost") | |
conn.connect() | |
image = conn.getObject("Image", 54973) | |
dataset = image.getParent() |
This is how I tested the performance of OMERO.webclient paths_to_object, handling pagination of the object when in a Dataset or Orphaned collection of many images, as described ome/openmicroscopy#4511
First, I added print statements to components/tools/OmeroWeb/omeroweb/webclient/views.py to print the time that paths_to_object takes to return:
+ n = time()
paths = paths_to_object(conn, experimenter_id, project_id, dataset_id,
image_id, screen_id, plate_id, acquisition_id,
well_id, group_id)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import omero | |
from omero.rtypes import rstring | |
import omero.grid | |
from omero.gateway import BlitzGateway | |
USERNAME = "will" | |
PASSWORD = "ome" | |
HOST = "localhost" | |
PORT = 4064 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example of how to subclass ImageWrapper to extend renderImage() | |
# First part of this can be placed in a different python file | |
# As long as it is imported before being used | |
import omero | |
import omero.gateway | |
import PIL.ImageOps | |
class NewImageWrapper (omero.gateway.ImageWrapper): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from omero.gateway import BlitzGateway | |
from omero.constants.namespaces import NSCREATED | |
user = 'root' | |
pw = 'omero' | |
host = 'localhost' | |
conn = BlitzGateway(user, pw, host=host, port=4064) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# DEMO of how to use code example at https://gist.github.com/will-moore/5782494#file-metadata_search-py-L13 | |
import omero | |
from omero.rtypes import rint, wrap, rdouble, unwrap | |
from omero.gateway import BlitzGateway | |
conn = BlitzGateway('will', 'ome', host='localhost', port=4064) | |
conn.connect() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from omero.gateway import BlitzGateway | |
from datetime import datetime | |
import time | |
conn = BlitzGateway('will', 'ome', host="localhost") | |
conn.connect() |