Skip to content

Debug Rendering of PanopTILs segmentations #371

@CPBridge

Description

@CPBridge

(for prioritization by @fedorov)

I have converted a set of segmentations from the PanopTILs dataset from PNG to DICOM Segmentation for ingestion into IDC, but slim is not rendering them. These segmentations are "weird" in a few ways:

  • Only a few small square regions of the full source image are segmented (see below). Most of the image has no segmentation. Therefore the images are stored as TILED_SPARSE, containing only the tiles that have data.
  • The regions are arranged irregularly with respect to each other and in many cases overlap with each other. In this case the pixels that are shared between two tiles are simply duplicated.
  • Because of the above, there is no pyramid for these segmentations. Just a single instance, but they are small because there are so few frames
  • The segmentation tiles have a different pixel spacing to any image pyramid layer (it is close to but not the same as the highest resolution layer)

I think slim should be able to cope with each of these three quirks individually, but perhaps their combination is problematic? I am not sure. Currently, they seem to render nothing at all as far as I can tell. Here are some examples:

https://andrey-slim-test.web.app/studies/2.25.228589557819333797113701560950447208808/?gcp=https://healthcare.googleapis.com/v1/projects/idc-dicom-review/locations/us-central1/datasets/panoptils-seg-test-full-pixel-matrix-2026_02_13-dataset/dicomStores/panoptils-seg-test-full-pixel-matrix-2026_02_13-dicom-store/dicomWeb

https://andrey-slim-test.web.app/studies/2.25.131384308863578757909042205307882861195/?gcp=https://healthcare.googleapis.com/v1/projects/idc-dicom-review/locations/us-central1/datasets/panoptils-seg-test-full-pixel-matrix-2026_02_13-dataset/dicomStores/panoptils-seg-test-full-pixel-matrix-2026_02_13-dicom-store/dicomWeb

https://andrey-slim-test.web.app/studies/2.25.152317768852876987409770031784402458904/?gcp=https://healthcare.googleapis.com/v1/projects/idc-dicom-review/locations/us-central1/datasets/panoptils-seg-test-full-pixel-matrix-2026_02_13-dataset/dicomStores/panoptils-seg-test-full-pixel-matrix-2026_02_13-dicom-store/dicomWeb

There are actually three segmentations series (with one instance each) per slide: "Regions", "Nuclei", and "Borders". I would focus on the regions because they are larger and easier to see

Here is an example of how highdicom and matplotlib renders one of the "regions" series, cropped to the region containing data:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions