Orthanc and Openslide region support

I have a .svn file with multiple regions on the slide. It does not appear that Orthanc dicomizer supports multiple regions?

When I run the following command:

orthancwsidicomizer --folder c:\dicomizer\4B6FBFB8-B228-4F1D-8097-99AEBDAAF294_j2000_out --compression jpeg2000 --jpeg-quality 100 --pyramid 1 --openslide=libopenslide-0.dll c:\dicomizer\4B6FBFB8-B228-4F1D-8097-99AEBDAAF294.scn --threads 1

I get a pyramid of one of the regions.



I assume you are talking about “.scn” files produced by Leica slide scanners:

For the moment, OpenSlide (the underlying library that is used by Orthanc to decode non-TIFF whole-slide images) does not support multiple regions in Leica images, as discussed in the following thread:

This explains why the Orthanc DICOM-izer only imports one image. As a consequence, I highly recommend you to avoid the use of such non-standard proprietary formats, and try and export pyramidal TIFF images from your scanner.


I am not sure that is the case anymore(?).

Here is what openslide reports:

C:\openslide\bin>openslide-show-properties.exe C:\dicomizer\1EFD8A11-F2D2-49F7-9EF3-53FE3FBC9071.scn
leica.aperture: ‘0.4’
leica.barcode: ‘34ST4G’
leica.creation-date: ‘2017-11-03T13:19:45.523Z’
leica.device-model: ‘Leica SCN400;Leica SCN’
leica.device-version: ‘ 2012/05/10 13:29:07;’
leica.illumination-source: ‘brightfield’
leica.objective: ‘20’
openslide.bounds-height: ‘63004’
openslide.bounds-width: ‘38496’
openslide.bounds-x: ‘9400’
openslide.bounds-y: ‘32193’
openslide.level-count: ‘5’
openslide.level[0].downsample: ‘1’
openslide.level[0].height: ‘153470’
openslide.level[0].width: ‘53130’
openslide.level[1].downsample: ‘3.9998986524159981’
openslide.level[1].height: ‘38368’
openslide.level[1].width: ‘13283’
openslide.level[2].downsample: ‘15.998992404088622’
openslide.level[2].height: ‘9592’
openslide.level[2].width: ‘3321’
openslide.level[3].downsample: ‘63.940425691937421’
openslide.level[3].height: ‘2400’
openslide.level[3].width: ‘831’
openslide.level[4].downsample: ‘254.57204056653262’
openslide.level[4].height: ‘602’
openslide.level[4].width: ‘209’
openslide.mpp-x: ‘0.5’
openslide.mpp-y: ‘0.5’
openslide.objective-power: ‘20’
openslide.quickhash-1: ‘8fd3494c83131222f593f3d206cc4ab1d724cf3852672a98bd5a4ce4ab5b3984’
openslide.region[0].height: ‘19936’
openslide.region[0].width: ‘38496’
openslide.region[0].x: ‘9400’
openslide.region[0].y: ‘75261’
openslide.region[1].height: ‘21216’
openslide.region[1].width: ‘17600’
openslide.region[1].x: ‘26276’
openslide.region[1].y: ‘32193’
openslide.vendor: ‘leica’
tiff.ResolutionUnit: ‘centimeter’
tiff.XResolution: ‘20000’
tiff.YResolution: ‘20000’

My sample contains 2 pyramids which is correctly identified in the openslide.region[]. both are at the same magnification.

Dicomizer output:

W1106 10:01:21.521036 FromDcmtkBridge.cpp:192] Loading the embedded dictionaries
W1106 10:01:21.637803 ApplicationToolbox.cpp:41] Performance warning in whole-slide imaging: Non-release build, runtime debug assertions are turned on
W1106 10:01:21.642816 ApplicationToolbox.cpp:235] Orthanc WSI version: mainline (20171106T175825)
W1106 10:01:21.781184 Dicomizer.cpp:821] The input image is: c:\dicomizer\1EFD8A11-F2D2-49F7-9EF3-53FE3FBC9071.scn
W1106 10:01:21.795722 Dicomizer.cpp:824] File format of the input image: TIFF
W1106 10:01:29.782291 Dicomizer.cpp:904] Compression of the individual source tiles: JPEG
W1106 10:01:31.682823 Dicomizer.cpp:138] Size of source tiles: 512x512
W1106 10:01:31.683824 Dicomizer.cpp:139] Pixel format: RGB24
W1106 10:01:31.684828 Dicomizer.cpp:140] Smoothing is disabled
W1106 10:01:31.685831 Dicomizer.cpp:151] No repainting of the background
W1106 10:01:31.685831 Dicomizer.cpp:163] Size of target tiles: 512x512
W1106 10:01:31.686833 Dicomizer.cpp:167] Target image compression: Jpeg with quality 100
W1106 10:01:31.687836 Dicomizer.cpp:81] The target pyramid will have 7 levels
W1106 10:01:31.688838 Dicomizer.cpp:89] Creating level 0 of size 38496x19936
W1106 10:01:31.690844 Dicomizer.cpp:89] Creating level 1 of size 19248x9968
W1106 10:01:31.696860 Dicomizer.cpp:89] Creating level 2 of size 9624x4984
W1106 10:01:31.696860 Dicomizer.cpp:89] Creating level 3 of size 4812x2492
W1106 10:01:31.698865 Dicomizer.cpp:89] Creating level 4 of size 2406x1246
W1106 10:01:31.699866 Dicomizer.cpp:89] Creating level 5 of size 1203x623
W1106 10:01:31.700870 Dicomizer.cpp:89] Creating level 6 of size 602x312
W1106 10:01:35.232303 Dicomizer.cpp:105] Constructing the 3 lower levels of the pyramid
W1106 10:01:35.234309 ApplicationToolbox.cpp:94] Running 50 tasks
W1106 10:01:35.235311 ApplicationToolbox.cpp:95] Using 10 threads for the computation



So it looks like Orthanc is assuming that region[0] is the entire image and only processing within those bounds.


As written in the OpenSlide issue report, to the best of my knowledge, OpenSlide can only decode “region[0]”, just like Orthanc (even if the “openslide-show-properties” command-line tool reports the presence of multiple regions).

I however don’t have access to such a multi-region “.scn” sample image, so I cannot confirm this behavior. If I am wrong, please provide a sample invocation of the “openslide-write-png” command-line tool from the OpenSlide package that would decode other regions than the first one.

Or please share a sample image so that we can provide further support.


Hey Sébastien,

Here is a sample image, sorry about the size.


I will also look into openslide…


Using vips I was able make a pyramid using:

vips dzsave C:\dicomizer\Leica-2.scn[level=0] leica --properties