[Python] Errors When Opening an DICOM-file with OpenSlide in Python

Discussão em 'Python' iniciado por Stack, Janeiro 22, 2025.

  1. Stack

    Stack Membro Participativo

    I have a pipeline which requires me to open an DICOM file with the OpenSlide (Paths are examples):

    input_path = "/home/my_dir/LEVEL_0_E.dcm
    def openslide_dcm(input_path):

    wsi = openslide.OpenSlide(input_path)

    print("Slide dimensions:", wsi.dimensions)
    print("Available levels:", wsi.level_count)
    print("Level dimensions:", wsi.level_dimensions)

    ...


    Opening a DICOM File using OpenSlide should be possible. Since Opening the image with QuPath using OpenSlide as the Server type works fine. Nevertheless I get following Error:

    File "/home/yung/PycharmProjects/Imaging/.venv/lib/python3.10/site-packages/openslide/lowlevel.py", line 203, in _check_open
    raise OpenSlideUnsupportedFormatError("Unsupported or missing image file")


    openslide.lowlevel.OpenSlideUnsupportedFormatError: Unsupported or missing image file

    How can this be fixed?

    Continue reading...

Compartilhe esta Página