Skip to content

Instantly share code, notes, and snippets.

@will-moore
Last active October 10, 2016 15:52
Show Gist options
  • Save will-moore/f22695dbc8d2f8d0752cb6fa44431815 to your computer and use it in GitHub Desktop.
Save will-moore/f22695dbc8d2f8d0752cb6fa44431815 to your computer and use it in GitHub Desktop.
# Alternatively start with omero shell, instead of first 2 lines below, do this:
# $ bin/omero shell --login
# conn = omero.gateway.BlitzGateway(client_obj=client)
conn = BlitzGateway("will", "ome", host="localhost", port=4064)
conn.connect()
updateService = conn.getUpdateService()
roiService = conn.getRoiService()
from omero.rtypes import rstring
imageId = 3731
result = roiService.findByImage(imageId, None)
for roi in result.rois:
for s in roi.copyShapes():
if isinstance(s, omero.model.LineI):
s.markerStart = rstring("Arrow") # OR 'None' to remove markerStart
s.markerEnd = rstring("Arrow")
updateService.saveObject(s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment