[ome-devel] CLI render

Damir Sudar dsudar at lbl.gov
Fri Jul 7 18:31:00 BST 2017


Hi team,

At the OME meeting, I spoke with Simon about the CLI render function 
that he had written primarily for IDR but it's a great capability that I 
was hoping to use as well. Below is Simon's message telling me where to 
find the code. After a few weeks of vacation after the OME meeting and 
now trying to get back into the groove, I had a quick look at it. My 
server is still at 5.2.8 so I had hope to get it going quickly. Alas, I 
ran into a few snags and was hoping you had some wise words.

First one was relatively easy: the render plugin wants to import 
pydict_text_io and that wasn't there in the vanilla 5.2.8. I found a 
pydict_text_io.py in 5.3.3 so copied that into the util directory of my 
5.2.8 server since it didn't look like that was specific to the 5.3.x line.

Next I tried a few of the basic commands of the render plugin:
1 ---
sudard at lincs:~$ omero render info Image:2323633
Previously logged in to localhost:4064 as lincs
Server: [localhost:4064]
Username: [lincs]sudar
Password:
Created session 29f0add7-ccf3-41d0-b958-73aaee5efe52 
(sudar at localhost:4064). Idle timeout: 10 min. Current group: MEP-LINCS
Traceback (most recent call last):
   File "/usr/local/bin/omero", line 125, in <module>
     rv = omero.cli.argv()
   File "/home/omero_user/OMERO.server/lib/python/omero/cli.py", line 
1438, in argv
     cli.invoke(args[1:])
   File "/home/omero_user/OMERO.server/lib/python/omero/cli.py", line 
952, in invoke
     stop = self.onecmd(line, previous_args)
   File "/home/omero_user/OMERO.server/lib/python/omero/cli.py", line 
1029, in onecmd
     self.execute(line, previous_args)
   File "/home/omero_user/OMERO.server/lib/python/omero/cli.py", line 
1111, in execute
     args.func(args)
   File 
"/home/omero_user/OMERO.server/lib/python/omero/plugins/render.py", line 
343, in info
     ro = RenderObject(img)
   File 
"/home/omero_user/OMERO.server/lib/python/omero/plugins/render.py", line 
207, in __init__
     image.getChannels(noRE=True))
   File 
"/home/omero_user/OMERO.server/lib/python/omero/plugins/render.py", line 
206, in <lambda>
     self.channels = map(lambda x: ChannelObject(x),
   File 
"/home/omero_user/OMERO.server/lib/python/omero/plugins/render.py", line 
109, in __init__
     self.init_from_channel(channel)
   File 
"/home/omero_user/OMERO.server/lib/python/omero/plugins/render.py", line 
117, in init_from_channel
     self.min = channel.getWindowMin()
   File 
"/home/omero_user/OMERO.server/lib/python/omero/gateway/__init__.py", 
line 6753, in getWindowMin
     return si.getGlobalMin().val
   File 
"/home/omero_user/OMERO.server/lib/python/omero_model_StatsInfoI.py", 
line 138, in getGlobalMin
     self.errorIfUnloaded()
   File 
"/home/omero_user/OMERO.server/lib/python/omero_model_StatsInfoI.py", 
line 39, in errorIfUnloaded
     raise _omero.UnloadedEntityException("Object unloaded:"+str(self))
omero.UnloadedEntityException: Object unloaded:object #0 
(::omero::model::StatsInfo)
{
     _id = object #1 (::omero::RLong)
     {
         _val = 8730161
     }
     _details = <nil>
     _loaded = False
     _version = <nil>
     _globalMin = <nil>
     _globalMax = <nil>
}
!! 07/06/17 11:12:01.473 error: 2 communicators not destroyed during 
global destruction.sudard at lincs:~$
---

2---
sudard at lincs:~$ omero render copy Image:1041 Image:1112
Using session 648f8a79-d3e0-43ee-95e1-62197af2d679 
(sudar at localhost:4064). Idle timeout: 10 min. Current group: MEP-LINCS
Traceback (most recent call last):
   File "/usr/local/bin/omero", line 125, in <module>
     rv = omero.cli.argv()
   File "/home/omero_user/OMERO.server/lib/python/omero/cli.py", line 
1438, in argv
     cli.invoke(args[1:])
   File "/home/omero_user/OMERO.server/lib/python/omero/cli.py", line 
952, in invoke
     stop = self.onecmd(line, previous_args)
   File "/home/omero_user/OMERO.server/lib/python/omero/cli.py", line 
1029, in onecmd
     self.execute(line, previous_args)
   File "/home/omero_user/OMERO.server/lib/python/omero/cli.py", line 
1111, in execute
     args.func(args)
   File 
"/home/omero_user/OMERO.server/lib/python/omero/plugins/render.py", line 
361, in copy
     self._copy(gateway, args.object, args.target, args.skipthumbs)
   File 
"/home/omero_user/OMERO.server/lib/python/omero/plugins/render.py", line 
373, in _copy
     src_img._closeRE()
   File 
"/home/omero_user/OMERO.server/lib/python/omero/gateway/__init__.py", 
line 1237, in __getattr__
     % (self._obj.__class__.__name__, attr))
AttributeError: 'ImageI' object has no attribute '_closeRE'
---

Rather than trying more of this, I thought to check with you first 
whether I'm missing something fundamental.
Thanks,
- Damir

On 6/2/2017 2:35, Simon Li wrote:
> The render plugin (not tested on 5.3):
> https://github.com/openmicroscopy/openmicroscopy/blob/metadata53/components/tools/OmeroPy/src/omero/plugins/render.py
> Try dropping this into OMERO.server/lib/python/omero/plugins/
>
> Example YAML render settings file:
> https://github.com/IDR/idr-metadata/blob/master/idr0015-UNKNOWN-taraoceans/screenA/idr0015-screenA-renderdef.yml
>
> omero render edit --help
> omero render edit --copy Plate:1 renderdef.yml
> omero render copy Image:SrcID Plate:TargetID
>
>
>
> The University of Dundee is a registered Scottish Charity, No: SC015096 

-- 
Damir Sudar - Affiliate Scientist
Lawrence Berkeley Natl Laboratory / MBIB
One Cyclotron Road, MS 977, Berkeley, CA 94720, USA
T: 510/486-5346 - F: 510/486-5586 - E:DSudar at lbl.gov
http://biosciences.lbl.gov/profiles/damir-sudar-2/

Visiting Scientist, Oregon Health & Science University

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20170707/c5c381de/attachment.html>


More information about the ome-devel mailing list