<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>Hi Will,<br></div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><b>De: </b>"William Moore (Staff)" <W.Moore@dundee.ac.uk><br><b>À: </b>"ome-devel" <ome-devel@lists.openmicroscopy.org.uk><br><b>Envoyé: </b>Jeudi 11 Mai 2017 14:15:30<br><b>Objet: </b>Re: [ome-devel] Linking Omero and Catmaid<br></div><div><br></div><div data-marker="__QUOTED_TEXT__">Hi,<div class=""><br class=""></div><div class=""> It’s great to see a new OMERO.web app and nice that Catmaid can talk to OMERO!</div><div class=""><br class=""></div><div class=""> - Authentication: If you log in to OMERO.web (e.g. /webclient/) in the same browser you’re running Catmaid, then all subsequent</div><div class="">requests should be able to use the sessionId in the cookie to re-connect to OMERO with the login_required decorator you’ve used.</div><div class=""><br data-mce-bogus="1"></div><div class="">> Thanks for your suggestion, it worked well and we were able to fetch images from Catmaid without adding session key.<br data-mce-bogus="1"></div><div class=""><br data-mce-bogus="1"></div><div class=""><br class=""></div><div class=""> - Parallel loading of image tiles: Yes, every request is asynchronously handled by individual web server workers. If you’re using the</div><div class="">development server then there’s only a single process, but when deployed using nginx there’ll typically be 5 workers handling requests in parallel.</div><div class=""><br data-mce-bogus="1"></div><div class="">> 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.<br data-mce-bogus="1"></div><div class=""><br data-mce-bogus="1"></div><div class=""><br class=""></div><div class=""> - Image tile zoom: You’ll need to use the ‘level’ parameter of img.renderJpegRegion(z, t, scalex, scaley, scalew, scaleh, level=level, compression=c)</div><div class="">However, this works in the opposite direction from ‘zoom’ in your API: level=0 is the most zoomed-out level. </div><div class=""><br class=""></div><div class="">If you do img.getZoomLevelScaling()</div><div class="">you’ll get a dictionary of supported zoom levels for the image, and the relative zoom fractions.</div><div class="">e.g. <span style="color: #4c2f2d; font-family: Courier; background-color: #dfdbc4;" class="" data-mce-style="color: #4c2f2d; font-family: Courier; background-color: #dfdbc4;">{0: 1.0, 1: 0.24999023831526337, 2: 0.06248779789407921, 3: 0.031237391157215185, 4: 0.010451510458018247}</span></div><div class="">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.</div><div class=""><br class=""></div><div class="">In this image, zooming from level 0 (most zoomed out) to level 4 will give a zoom of ~95 x (1/0.01045).</div><div class="">In your case, zm=0 would be level 4 (with x and y unchanged).</div><div class="">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.</div><div class="">I’m afraid I don’t have time to work out the exact logic for this but hopefully you can figure this out.</div><div class="">Let us know if you need more help.</div><div class="">This should mean that you don’t need to resize the image with PIL.</div><div class=""><br data-mce-bogus="1"></div><div class="">> Thank you very much. I'll try it out.<br data-mce-bogus="1"></div><div class=""><br data-mce-bogus="1"></div><div class=""><br class=""></div><div class="">Other points:</div><div class=""><br class=""></div><div class="">Your install instructions: <span style="font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6px; line-height: inherit; color: #24292e; orphans: 2; widows: 2;" class="" data-mce-style="font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6px; line-height: inherit; color: #24292e; orphans: 2; widows: 2;">$ OMERO.py/bin/omero config append omero.web.apps '"omero-catmaid"'</span></div><div class="">This should be “omero_catmaid” (underscore instead of -).</div><div class=""><br class=""></div><div class="">You’re also missing a Http404 import</div><div class="">from django.http import Http404</div><div class=""><br data-mce-bogus="1"></div><div class="">> Oups, thanks.<br data-mce-bogus="1"></div><div class=""><br data-mce-bogus="1"></div><div class=""><br class=""></div><div class=""> Regards,</div><div class=""><br class=""></div><div class=""> Will.</div><div class=""><br data-mce-bogus="1"></div><div class="">Best regards,<br data-mce-bogus="1"></div><div class="">Son<br data-mce-bogus="1"></div><div class=""><br class=""></div><br class=""></div></div></body></html>