I'm trying to create .dzi file from a .svs file (downloaded from openslide.org test biomedical data). We found couple of libs including vips, php-vips and openslide's own lib openslide written in python scripting, c## as well as the one in php: (https://github.com/BlakSneil/Openslide-PHP-Bindings)
Openslide-php-bindings seemed most easy of all, so i downloaded and tried it out, but i was unable to get any headway in creating the .dzi file from a .svs file. On testing the script it threw up this error.
( ! ) Fatal error: Uncaught Error: Call to undefined function openslide_open() in C:\wamp\www\xxxxxx
any help from you guys would be great, as i'm totally stuck on how to get this .svs file converted to .dzi for days on end.
Edit: as per jcuppit, we are trying php-vips. Based on https://github.com/libvips/php-vips installation instructions, tried to install php-vips on our linux centos aws ec2 server, we encountered this error in cli
[root@xx /]# yum install libvips-dev
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: d36uatko69830t.cloudfront.net
* epel: mirrors.piconets.webwerks.in
* extras: d36uatko69830t.cloudfront.net
* remi: mirror.23media.com
* remi-php55: mirror.23media.com
* remi-php56: mirror.23media.com
* remi-safe: mirror.23media.com
* updates: d36uatko69830t.cloudfront.net
No package libvips-dev available.
Error: Nothing to do
In php-vips you'd do this:
Docs here:
https://libvips.github.io/libvips/API/current/Making-image-pyramids.md.html
However, php-vips won't work on Windows, which seems to be the platform you are using.
If you can't change platform, your best bet would be to shell out to
vips.exeand do it on the command-line instead. Download the libvips Windows build from here:https://github.com/libvips/libvips/releases
You need
vips-dev-w64-all-8.9.1.zipto get openslide support.Try running it in the terminal to make sure it's working:
Then just run that from php.
You'll find pyramid creation is very slow on Windows because the Windows file system hates many small files in one directory. You'll see a dramatic speedup if you write to a large zip file instead. Try:
Now
dzsavewill create an uncompressed zip file containing all the tiles. You'll find it's three or four times faster, and the zip is obviously easier to manage.