-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add annotation examples from saeri scripts #2010
Conversation
|
||
for ann in project.listAnnotations(): | ||
print ann.getId(), ann.OMERO_TYPE, | ||
print " added by ", ann.link.getDetails().getOwner().getOmeName() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sometimes properties are hidden behind "getDetails()", in other cases, they are not. Is there a way to get my head around this ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't know the best way to clarify this. Details are not specific to any particular object. All objects have details and owner (except Group and Experimenter) but other properties e.g. name or strokeWidth are specific to certain objects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can check https://docs.openmicroscopy.org/omero/5.5.1/developers/Model/EveryObject.html to see if things have details.
link.save() | ||
|
||
# Find Annotations linked to Object(s), filtering by namespace optional | ||
for link in conn.getAnnotationLinks('Image', parent_ids=image_ids, ns=namespace): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace - I might know what that is, but still, no idea what types and usages there are (client-editable namespace for KVPs, some other special namespaces ... ?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is a good spot (within a code block) to describe namespace usage in more detail. But not sure of the best place to point to either.
|
||
tag_ann = omero.gateway.TagAnnotationWrapper(conn) | ||
tag_ann.setTextValue("Not owned by me") | ||
# update details of the wrapped omero.model.AnnotationI _obj |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would guess that the whole "wrapped objects" workflow and syntax is explained somewhere else in this doc or another doc ? (the underscore with a ... space ?) Definitely a point which warrants more attention I guess.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is explained in a bit more detail above and further at https://docs.openmicroscopy.org/omero/5.5.1/developers/PythonBlitzGateway.html
I think this sentence is not accurate - https://github.com/ome/ome-documentation/pull/2010/files#diff-3bd9f4e3933d8044e9084726276de4cbR14 - we do not describe anything more about BlitzGateway on this page. Instead, this is all described in another, linked page ? |
Here, https://github.com/ome/ome-documentation/pull/2010/files#diff-3bd9f4e3933d8044e9084726276de4cbR34 the link directly to the Ice part of the doc should be given - to minimize the confusion. |
Here, https://github.com/ome/ome-documentation/pull/2010/files#diff-3bd9f4e3933d8044e9084726276de4cbR17 |
Couple of new comments, the fixed changes look good. |
omero/developers/Python.rst
Outdated
print "\nAnnotations on Dataset:", dataset.getName() | ||
for ann in dataset.listAnnotations(): | ||
namespace = "imperial.training.demo" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or something more generic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@will-moore : did you see this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thanks
2 comments above. Otherwise, good to get this in. (My only question would likely be whether or not these should be part of the examples so that they are regularly tested.) |
Co-Authored-By: Mark Carroll <m.t.b.carroll@dundee.ac.uk>
I started porting some examples to Training... |
Added examples to Training at ome/openmicroscopy#6187 |
hi Will,
I have got the github notification but i cannot understand whether or not it was in reply to my question.
Are the python scripts you helped me with back in Dundee still OK to be used in the new Omero?
OR since you guys are moving to py3, then all the scripts will need to be changed?
thanks a lot for clarifying.
iLaria
…________________________________
From: Will Moore <notifications@github.com>
Sent: 27 November 2019 10:37:32
To: ome/ome-documentation
Cc: Ilaria Marengo; Mention
Subject: Re: [ome/ome-documentation] Add annotation examples from saeri scripts (#2010)
Added examples to Training at ome/openmicroscopy#6187<ome/openmicroscopy#6187>
If this is good to merge, please go ahead. Otherwise I can list again tomorrow...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#2010>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AEDM6SIGCRUCGYLTIRHRCZTQVZZZZANCNFSM4IJL6SYA>.
This email and any files transmitted with it are confidential and intended solely for the use of the individual(s) or entity named above.
If you have received this email in error you must not use, copy, distribute, disseminate or disclose the information contained in it.
Please notify us immediately, delete the email from your computer system, and destroy any hard copies you may have created.
|
Hi Ilaria, Apologies for not replying to your e-mail earlier. But in general, I would try to run the scripts as they are and see if you get any errors. Cheers, Will |
Hello Will,
thanks a lot for your email. It makes more sense to me.
At the moment my intention is still to keep the version i have 5.5.1 which runs on py2.7
We are still in our testing "phase" of OMERO here in the Falklands.
If I get a new job (fingers crossed) then i will be moving to the latest version.
My question was really to understand future implications of all the upgrades and changes occurring to OMERO.
Have a good week and send my greetings to the rest of the team!
iLaria
…________________________________
From: Will Moore <notifications@github.com>
Sent: 29 November 2019 12:27:15
To: ome/ome-documentation
Cc: Ilaria Marengo; Mention
Subject: Re: [ome/ome-documentation] Add annotation examples from saeri scripts (#2010)
Hi Ilaria,
Apologies for not replying to your e-mail earlier.
Your scripts should be fine to run in Python 3 on the OMERO 5.6.0 server.
They might need 1 or 2 fixes but I expect that to be quite minimal. Most of the changes we've had to make for Python 3 have been reading/writing files, division of numbers etc.
So, probably the reading/writing of csv files will be the biggest fix.
E.g. changes to Batch_Image_Export script https://github.com/ome/omero-scripts/pull/159/files#diff-a5c72ab8f196397473c89460868f64d4
But in general, I would try to run the scripts as they are and see if you get any errors.
And let us know if you have any problems.
Cheers,
Will
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#2010>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AEDM6SOCXMPS6JISUZCTBJ3QWEYFHANCNFSM4IJL6SYA>.
This email and any files transmitted with it are confidential and intended solely for the use of the individual(s) or entity named above.
If you have received this email in error you must not use, copy, distribute, disseminate or disclose the information contained in it.
Please notify us immediately, delete the email from your computer system, and destroy any hard copies you may have created.
|
Add missing examples to the OMERO Python page, based on code needed by @ilamarengo
See #2009
cc @jburel, @pwalczysko