Issue with Image Dimensions After SVS → DICOM Conversion Using OrthancWSIDicomizer

Hello,

I’m encountering an issue when converting an SVS image to DICOM using OrthancWSIDicomizer. After the conversion, the pixel dimensions of the resulting image do not match those of the original file.

Observed Issue

Dicomizer version is linux-standard-base/orthanc-wsi/3.0.

When checking the image before and after conversion with QPath, I noticed a difference in dimensions:

  • Original image dimensions (proprietary format): Pixel width: 0.499 µm / Pixel height: 0.499 µm
  • Image dimensions after conversion: Pixel width: 0.3261 µm / Pixel height: 0.4557 µm

The original image is an SVS file, compatible with OpenSlide (CMU-1.svs).

Error Message Before Conversion

Before the conversion starts, I get the following message in the console:

Your pixel spacing is different along the x and y axes, make sure that you have not inversed the --image-width and the --image-height options

This might indicate an issue with swapped width and height dimensions, but I haven’t manually modified these parameters.

Command Used

I run the conversion using the following command:

./OrthancWSIDicomizer --openslide=./libopenslide.so “path/to/image/CMU-1.svs” --dataset=dataset.json --folder “path/to/output/image”

Questions

  1. Has anyone encountered this issue before?
  2. Is there a specific parameter to adjust to ensure the dimensions remain consistent between the original and converted images?
  3. Could the error message displayed before the conversion explain this difference in dimensions?

Thanks in advance for your help!

Lou-Anne

1 Like

Hello,

This call misses the --force-openslide=1 argument, if you want to use OpenSlide instead of the TIFF reader that is built in OrthancWSIDicomizer. Indeed, setting --openslide is insufficient to force OpenSlide. If adding --force-openslide=1, you will see in the logs:

W0317 15:24:10.080382     7ac7454cba00 Dicomizer.cpp:1207] Width of the imaged volume extracted using OpenSlide: 16.4241mm
W0317 15:24:10.080395     7ac7454cba00 Dicomizer.cpp:1213] Height of the imaged volume extracted using OpenSlide: 22.954mm

And the pixel spacing is correctly set:

$ dcm2xml wsi-000000.dcm | grep PixelSpacing
<element tag="0028,0030" vr="DS" vm="2" len="30" name="PixelSpacing">0.000499000016\0.000499000016</element>

This corresponds to the expected 0.499µm for the pixel width/height.

Also, note that release 3.1 of the whole-slide imaging plugin, which will be released in the next few hours, can extract the imaged volume size information natively from Aperio files, without using OpenSlide. This is implemented by the following changeset.

Kind Regards,
Sébastien-