histolab has only one system-wide dependency: OpenSlide
.
You can download and install it from https://openslide.org/download/ according to your operating system.
Warning
There is a known bug in Pixman versions 0.38.*
that causes OpenSlide
to produce images with black boxes for large images. See issue openslide/openslide#291 for reference. Install version 0.40 (latest) depending on your operating system.
If you are running histolab on Ubuntu 21.04 you probably already have Pixman 0.40 and you are all set, go have fun
If you are using a conda environment, it is sufficient to run:
text
conda install -c anaconda pixman==0.40
Otherwise, to force a working version of libpixman
to be loaded before a bad version, you need to exploit the LD_PRELOAD mechanism on Linux. Make sure you have that file installed first.
text
export LD_PRELOAD=/path/of/libpixman-1.so.0.40.0:$LD_PRELOAD
If necessary, build libpixman
from source. It's an easy build since it doesn't have any dependencies:
text
wget https://cairographics.org/releases/pixman-0.40.0.tar.gz tar -xvf pixman-0.40.0.tar.gz cd pixman-0.40.0 ./configure make sudo make install
If OpenSlide
is installed via brew
, pixman 0.40 will be automatically installed
OpenSlide
builds are the same for all Windows versions and they include pixman 0.34.
Pixman 0.40 can be retrieved using pacman
(the package manager of Arch Linux, see https://www.msys2.org/ for more info):
text
pacman -S mingw-w64-x86_64-pixman
Once pixman 0.40 is installed you have to link the current version of the dll
to the OpenSlide
installation. The only thing to do is overwrite libpixman-1-0.dll
in the bin
directory of OpenSlide
with the one installed with pixman 0.40 that should be placed in /mingw64/bin/libpixman-1-0.dll
.
For example if OpenSlide
is installed in C:\
you should replace C:\OpenSlide\bin\libpixman-1-0.dll
with /mingw64/bin/libpixman-1-0.dll
.
text
ldconfig -v | grep libpixman
text
brew list --versions pixman
text
(Get-Item "C:OpenSlidebinlibpixman-1-0.dll").VersionInfo | format-list