Using deepzoom_tile.py on Windows 32 Bit and other stuff

Benjamin Gilbert bgilbert at cs.cmu.edu
Wed Sep 26 16:10:08 EDT 2012


On 09/26/2012 02:33 PM, PD Dr. M. Weihrauch wrote:
> I have written a short "how-to-guide" for the installation of your great
> scripts under Windows 32 - you will find it in the Openslide Wiki.

Thanks!  I renamed the page and added a link on the front page of the wiki.

> 2. However, I tried to do the same on a Windows 64 Bit. I installed
> Python 2.6 for Win64, I downloaded the openslide binaries for 64 bit and
> put them into system32 as well as the WOW64 folder directly. But, after
> doing everything and running the deepzoom_tile.py, the script is running
> but is constantly producing errors.

PIL has a Python component and a C component.  According to your 
screenshot, the Python package is installed, but the 64-bit C module 
could not be found.

> 3. Also, I saw that when I e. g. do: python deepzoom_tile.py
> C:\testfolder\test.svs C:\testfolder\test, that the "test_files" is
> created in the script-directory and not under C:\testfolder. That is on
> both, 32/64 Bit Windows of course.

The output directory is specified with the -o option, not with a second 
bare argument.  You need "python deepzoom_tile.py C:\testfolder\test.svs 
-o C:\testfolder\test".

> To understand more about the concept of your script: as I have
> seen from the source, it runs on port 5000.

By default, yes.

> a) Is one tile requested from the script at a time? And in what format?
> Is the -c option for that?

The script generates each tile as it is requested by the OpenSeadragon 
viewer.  The format is specified by the -f option.  Use --help to get a 
summary of the command-line options.

-c lets you load a Flask configuration file.  See the Flask 
documentation for details on the format.

> b) A seadragon-client would then request tiles from the server and e. g.
> an apache modrewrite is redirecting to the python script?

Correct.  On our server, we use nginx reverse-proxying to a gunicorn 
application server.

> c) Isn't the python script to slow to serve tiles? E. g. on my regular
> 4-quad-core machine with 8 GB of RAM the static tiler does less than
> 1000 tiles per minute --> appr. 2,5 hours per 80,000 tiles total for an
> image of appr. 60,000 x 60,000. If 10 users would surf on my server,
> then there would be problems for the script to serve them quickly?!

Most browsing sessions only read a small fraction of the tiles in an 
image.  We use dynamic tiling in our system (Algum) and have never had 
any problems, though admittedly we have a small number of users. 
Whether to use static or dynamic tiling depends on your use case: if you 
have many slides, each of which will only be viewed briefly, static 
tiling is a waste of CPU time.  If you have a few slides which will be 
viewed many times (e.g. in an educational setting), static tiling may be 
better.

The demo site <http://openslide.org/demo/> is statically tiled and 
stored in Amazon S3, mostly to reduce tile access latency (at least for 
users on the west coast of the US).  We also have a dynamic tiling demo 
here:

     http://diamond.cs.cmu.edu/dynamic-tiling/

This is an unmodified copy of deepzoom_server.py, running against 
CMU-2.mrxs, on a quad-core 2 GHz Xeon in Pittsburgh, PA, USA.

> 5. Do you know, what the "overlap" in the deepzoom format is for? On the
> web, nobody really seems to know, why an overlap should produce any
> better results for the view than to have overlap=0. -

It could help to avoid seams between tiles as the browser scales and 
renders them.  I don't know how much it matters, however.

> 6. What are the options jobs, output and viewer for in your
> deepzoom_tile.py? If viewer is default "true", there is no directory
> being exported there (but I did not use the option). What are the
> parameters that you can send? I. E.: --jobs=2 (?), --viewer=true /
> false?, --output=?

- jobs configures parallelism; set it to the number of CPU cores you have.

- viewer changes the output format to include an HTML directory tree 
with a self-contained OpenSeadragon viewer.  The option defaults to 
false and doesn't take an argument; just say --viewer.

- output changes the output path; see above.

--Benjamin Gilbert



More information about the openslide-users mailing list