<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
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 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 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: rgb(76, 47, 45); font-family: Courier; background-color: rgb(223, 219, 196);" class="">{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 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: rgb(36, 41, 46); orphans: 2; widows: 2;" class="">$ 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 class="">
</div>
<div class=""> Regards,</div>
<div class=""><br class="">
</div>
<div class=""> Will.</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On 10 May 2017, at 12:53, Phan Minh-Son (M.) <<a href="mailto:minh-son.phan@polytechnique.edu" class="">minh-son.phan@polytechnique.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">
<div style="font-family: arial, helvetica, sans-serif; font-size: 12pt;" class="">
<p class="">Dear all,<br class="">
</p>
<p class="">We've just built a simple Omero web app<span class="Object" role="link" id="OBJ_PREFIX_DWT564_com_zimbra_url">:
<a href="https://github.com/msphan/omero-catmaid" class="">https://github.com/msphan/omero-catmaid</a>. It is
</span>designed to serve the url convention in Catmaid which is a software for visualization and annotation of large scale image (<a href="http://catmaid.readthedocs.io" class="">http://catmaid.readthedocs.io</a>).<br class="">
</p>
<div class="">In brief, the func render_tile() in our app is rewritten from the func render_image_region() in webgateway by modifying the url format, handling the tile zoom level. The code is still very simple, there are several aspects that could be optimized.
We would highly appreciate any comments, advices you may provide.</div>
<div class=""><br class="">
</div>
<div class="">- Authentication: we now use a session key added into url to handle the Omero login request. However, this requires modification of url setup in Catmaid each time when we login into Omero. Are there other alternative ways for the login process?</div>
<div class=""><br class="">
</div>
<div class="">- Parallel loading of image tile: since Catmaid support this feature, so is it also possible in Omero to respond the parallel requests?</div>
<div class=""><br class="">
</div>
<div class="">- Image tile zoom: in render_tile() func, we simply calculate scaled size of image tile at a specified zoom level, then render the jpeg using renderJpegRegion() and finally resize it. The code is quite redundant and the render speed depends on
the zoom level. So for a very large image, the render tile speed is slow for high values of zoom level. Would you have any comments/advices to speed up the render tile?</div>
<div class=""><br class="">
</div>
<div class="">Many thanks and best regards,<br class="">
</div>
<div class=""><br class="webkit-block-placeholder">
</div>
<p data-marker="__SIG_PRE__" class="">Son</p>
<p data-marker="__SIG_PRE__" class=""><br data-mce-bogus="1" class="">
</p>
<div data-marker="__SIG_PRE__" class=""><br data-mce-bogus="1" class="">
</div>
</div>
</div>
_______________________________________________<br class="">
ome-devel mailing list<br class="">
<a href="mailto:ome-devel@lists.openmicroscopy.org.uk" class="">ome-devel@lists.openmicroscopy.org.uk</a><br class="">
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
<br>
<span style="font-size:10pt;">The University of Dundee is a registered Scottish Charity, No: SC015096</span>
</body>
</html>