NKI-AI / dlup

Dlup are the Deep Learning Utilities for Pathology developed at the Netherlands Cancer Institute
Apache License 2.0
25 stars 7 forks source link

Openslide returns zero-values #20

Closed frank closed 3 years ago

frank commented 3 years ago

Describe the bug The bug relates to NKI-AI/openslide, (and openslide/openslide). It is independent of dlup.

When fetching regions and thumbnails at specific levels, large amounts of zero-values appear at the top and left side of the image. This only happens with some slides and not with others.

To Reproduce

This shows: thumbnail

The same doesn't happen when fetching thumbnails of size 512, 1024, or 2048.

Expected behavior The whole slide should be visible.

Environment dlup version: - How installed: - Python version: 3.9.5 Operating System: Ubuntu 20.04.2 LTS

Additional context None.

jonasteuwen commented 3 years ago

I cannot reproduce this. Can you give the other library versions involved? What is the cairo version?

frank commented 3 years ago

Showing all installed versions of cairo here, and all package versions in the conda environment here.

frank commented 3 years ago

Upgrading pixman from 0.38 to 0.40 solved the issue. Thanks @YoniSchirris for the tip. Note that the latest version of pixman on apt is 0.38

jonasteuwen commented 3 years ago

How did you install the latest pixman?

frank commented 3 years ago

Download and extract pixman 0.40:

cd ~
wget https://www.cairographics.org/releases/pixman-0.40.0.tar.gz
tar -xf pixman-0.40.0.tar.gz
rm pixman-0.40.0.tar.gz
cd pixman-0.40.0

Install it:

mkdir build
cd build
meson --prefix=/usr
ninja
ninja install

Add it to the system's search path:

echo 'export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:~/pixman-0.40.0/build/pixman/"' >> ~/.bashrc

Use .zshrc instead of .bashrc if using ZSH.

jonasteuwen commented 3 years ago

Let's add this somewhere to the documentation. The Dockerfile in docker_fix installs the latest versions.

jonasteuwen commented 3 years ago

Closing as it is not really a dlup bug.