Serving deepzoom tiles out of whole slide

Benjamin Gilbert bgilbert at cs.cmu.edu
Sat Apr 20 04:23:25 EDT 2013


On 04/20/2013 03:48 AM, PD Dr. M. Weihrauch wrote:
> What is the currently best way to serve deepzoom tiles out of whole
> untiled slide-files, e. g. SVS? I have found the server-python-script
> from Benjamin, but couldn't figure out how it works.
>
> We have Windows-servers and would like to display the slides with
> seadragon over the web. Where does the dzi-file come from and how can
> you dynamically react to the client requests (e. g. "5/3_2.jpg")?

Hi Martin,

To understand those scripts, you'll want to look at the documentation 
for the Flask web framework:

     http://flask.pocoo.org/

Flask receives an incoming HTTP request, parses the request URL, and 
routes the request to a handler function such as dzi() or tile().  Both 
of those functions are just thin wrappers around the Deep Zoom helper 
code in openslide.deepzoom, which generates the appropriate pixels and 
can also generate the DZI XML.

deepzoom_server.py and slidedeck.py are meant as examples.  In a 
deployed system, you'll probably want to write your own tile and DZI 
handlers using your preferred Python web framework.

(Of course you don't have to do it in Python, but then you'll have to 
reimplement openslide.deepzoom in your preferred language.)

For performance, your web app should cache some number of open slide 
handles, since openslide_open() can be expensive.  You may also want to 
do some tile caching, either in your app or with an HTTP reverse proxy, 
since some slide formats (Hamamatsu, sometimes Aperio) can be very 
inefficient in the upper pyramid levels.

--Benjamin Gilbert



More information about the openslide-users mailing list