# Issue with Image Dimensions After SVS → DICOM Conversion Using OrthancWSIDicomizer

**URL:** https://discourse.orthanc-server.org/t/issue-with-image-dimensions-after-svs-dicom-conversion-using-orthancwsidicomizer/5585
**Category:** General
**Created:** [March 7, 2025, 12:01pm UTC](https://discourse.orthanc-server.org/t/issue-with-image-dimensions-after-svs-dicom-conversion-using-orthancwsidicomizer/5585 "2025-03-07T12:01:39Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Lou-Anne](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/l/3ec8ea/32.png) [@Lou-Anne](https://discourse.orthanc-server.org/u/Lou-Anne)
#### Post date: [March 7, 2025, 12:01pm UTC](https://discourse.orthanc-server.org/t/issue-with-image-dimensions-after-svs-dicom-conversion-using-orthancwsidicomizer/5585/1 "2025-03-07T12:01:39Z")

</div>

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](https://openslide.cs.cmu.edu/download/openslide-testdata/Aperio/)).

### **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

---

<div class="post-metadata">

### Author: ![jodogne](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/jodogne/32/1511_2.png) [@jodogne](https://discourse.orthanc-server.org/u/jodogne)
#### Post date: [March 17, 2025, 2:29pm UTC](https://discourse.orthanc-server.org/t/issue-with-image-dimensions-after-svs-dicom-conversion-using-orthancwsidicomizer/5585/2 "2025-03-17T14:29:57Z")

</div>

Hello,

> [@Lou-Anne](#):
>
> 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”

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:

```txt
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:

```txt
$ 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](https://orthanc.uclouvain.be/hg/orthanc-wsi/rev/33dcd7f68df9).

Kind Regards,  
Sébastien-
