This file contains 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
# This script shows a simple connection to OMERO, printing details of the connection. | |
# NB: You will need to edit the 'host', 'user' and 'password' fields before running. | |
# Connect to the Python Blitz Gateway | |
# See OmeroPy/Gateway for more info | |
# import the libraries we need | |
from omero.gateway import BlitzGateway | |
from omero.rtypes import * |
This file contains 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 | |
import omero | |
from omero.rtypes import rtime, rlong, rstring, rlist, rint | |
from omero_model_ExperimenterI import ExperimenterI | |
from omero_model_ExperimenterGroupI import ExperimenterGroupI | |
from omero_model_PermissionsI import PermissionsI | |
conn = BlitzGateway('root', 'omero', host='localhost'); | |
print conn.connect() |
This file contains 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
#!/usr/bin/env python | |
""" | |
Script for adding annotations to Project. | |
""" | |
import omero.clients | |
from omero import client_wrapper | |
from omero.rtypes import * | |
import random | |
from datetime import datetime |
This file contains 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
#!/usr/bin/env python | |
""" | |
Script for switching rows / columns of wells in plate. See https://www.openmicroscopy.org/community/posting.php?mode=reply&f=4&t=1211 | |
""" | |
import omero | |
import omero.clients | |
from omero.gateway import BlitzGateway | |
from omero.rtypes import rint |
This file contains 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
#!/usr/bin/env python | |
""" | |
Script for switching rows / columns of wells in plate. See https://www.openmicroscopy.org/community/posting.php?mode=reply&f=4&t=1211 | |
""" | |
import omero | |
import omero.clients | |
from omero.gateway import BlitzGateway | |
from omero.rtypes import rint |
This file contains 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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# Sript to look for images with key-value pairs in Original Metadata | |
# See https://www.openmicroscopy.org/community/viewtopic.php?f=4&t=1226 | |
import omero | |
import omero.scripts as scripts | |
from omero.gateway import BlitzGateway | |
from omero.rtypes import * |
This file contains 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.scripts as scripts | |
from omero.gateway import BlitzGateway | |
from omero.rtypes import rstring, rlong | |
def renameChannels(conn, parameterMap): | |
updateService = conn.getUpdateService() |
This file contains 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
def createImageFromNumpySeq (self, zctPlanes, imageName, sizeZ=1, sizeC=1, sizeT=1, description=None, dataset=None): | |
""" | |
Creates a new multi-dimensional image from the sequence of 2D numpy arrays in zctPlanes. | |
zctPlanes should be a generator of numpy 2D arrays of shape (sizeY, sizeX) ordered | |
to iterate through T first, then C then Z. | |
Example usage: | |
original = conn.getObject("Image", 1) | |
sizeZ = original.getSizeZ() | |
sizeC = original.getSizeC() | |
sizeT = original.getSizeT() |
This file contains 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
Get the ID of the 'user' group: | |
omero=# select * from experimentergroup where name='user'; | |
id | description | permissions | name | version | external_id | |
----+-------------+-------------+------+---------+------------- | |
1 | | -52 | user | 0 | | |
Get the ID of the Experimenter you want, using login name: |
This file contains 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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
""" | |
This script tries to restore the colors for the selected LIF/LSM images. | |
@author Pierre Pouchin | |
<a href="mailto:[email protected]">[email protected]</a> | |
@version 4.3 | |
""" |
OlderNewer