[ome-devel] Linking Omero and Catmaid

Phan Minh-Son (M.) minh-son.phan at polytechnique.edu
Fri May 12 09:14:16 BST 2017


Hi Will, 


De: "William Moore (Staff)" <W.Moore at dundee.ac.uk> 
À: "ome-devel" <ome-devel at lists.openmicroscopy.org.uk> 
Envoyé: Jeudi 11 Mai 2017 14:15:30 
Objet: Re: [ome-devel] Linking Omero and Catmaid 

Hi, 

It’s great to see a new OMERO.web app and nice that Catmaid can talk to OMERO! 

- Authentication: If you log in to OMERO.web (e.g. /webclient/) in the same browser you’re running Catmaid, then all subsequent 
requests should be able to use the sessionId in the cookie to re-connect to OMERO with the login_required decorator you’ve used. 

> Thanks for your suggestion, it worked well and we were able to fetch images from Catmaid without adding session key. 


- Parallel loading of image tiles: Yes, every request is asynchronously handled by individual web server workers. If you’re using the 
development server then there’s only a single process, but when deployed using nginx there’ll typically be 5 workers handling requests in parallel. 

> We deployed using nginx and configured HTTP/2 on Omero. The tile loading is faster now. I'm not sure that HTTP/2 is useful in this case, but it was suggested by Catmaid community. 


- Image tile zoom: You’ll need to use the ‘level’ parameter of img.renderJpegRegion(z, t, scalex, scaley, scalew, scaleh, level=level, compression=c) 
However, this works in the opposite direction from ‘zoom’ in your API: level=0 is the most zoomed-out level. 

If you do img.getZoomLevelScaling() 
you’ll get a dictionary of supported zoom levels for the image, and the relative zoom fractions. 
e.g. {0: 1.0, 1: 0.24999023831526337, 2: 0.06248779789407921, 3: 0.031237391157215185, 4: 0.010451510458018247} 
NB: with all the different formats that OMERO / Bio-Formats supports, many do not zoom 2x with each zoom level, as you can see from this svs image example. 

In this image, zooming from level 0 (most zoomed out) to level 4 will give a zoom of ~95 x (1/0.01045). 
In your case, zm=0 would be level 4 (with x and y unchanged). 
Zooming to zm=1 would be level 3 but then you have to scale the x and y accordingly since these no-longer map to the original image size. 
I’m afraid I don’t have time to work out the exact logic for this but hopefully you can figure this out. 
Let us know if you need more help. 
This should mean that you don’t need to resize the image with PIL. 

> Thank you very much. I'll try it out. 


Other points: 

Your install instructions: $ OMERO.py/bin/omero config append omero.web.apps '"omero-catmaid"' 
This should be “omero_catmaid” (underscore instead of -). 

You’re also missing a Http404 import 
from django.http import Http404 

> Oups, thanks. 


Regards, 

Will. 

Best regards, 
Son 


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


More information about the ome-devel mailing list