imi-bigpicture / wsidicomizer

Python library for converting WSI files to DICOM
Apache License 2.0
57 stars 8 forks source link

SVS to DICOM Conversion Resulting in Automatic Zooming Issue in Viewer #101

Closed abespalko closed 5 months ago

abespalko commented 6 months ago

Description: When converting SVS (Whole Slide Imaging) files to DICOM format and subsequently rendering them in various DICOM viewers such as OHIF, an unexpected behavior is observed. Upon initial rendering, the DICOM file appears to be zoomed in, and attempts to zoom out result in an automatic zoom back to the initial position. This behavior has been consistently replicated using SVS files obtained from OpenSlide Demo. It's important to note that this issue seems isolated to SVS files, as conversion and rendering of other file formats proceed without any such complications.

Screenshot 2024-04-01 at 15 23 49

Steps to Reproduce:

  1. Download an SVS file from the OpenSlide Demo website (e.g., https://openslide.org/demo/).
  2. Convert the SVS file to DICOM format using a conversion tool (specify the tool and version used if relevant).
  3. Open the resulting DICOM file in a DICOM viewer such as OHIF.
  4. Observe that the image appears to be zoomed in upon initial rendering.
  5. Attempt to zoom out using viewer controls.
  6. Notice that the image automatically zooms back to the initial zoomed-in position.

Expected Behavior:

Attachments:

Video demonstrating current behavior: This video illustrates the current behavior of the DICOM viewer when opening a converted SVS file, showcasing the automatic zooming-in phenomenon and the inability to maintain a zoomed-out view of the entire slide.

erikogabrielsson commented 6 months ago

Hi @abespalko and thanks for the detailed issue.

abespalko commented 6 months ago

The add_missing_levels option is now functional!

Here is the SVS slide link: SVS Slide

I think it would be beneficial to have that option available for the CLI as well.

erikogabrielsson commented 6 months ago

I will add the option to the CLI in the next release.