dcmjs-org / dcmjs

Javascript implementation of DICOM manipulation
https://dcmjs.netlify.com/
MIT License
287 stars 108 forks source link

Segmentation loading with wadors not working #358

Open emelalkim opened 12 months ago

emelalkim commented 12 months ago

We are working on loading DICOM SEG objects with wadors loading using Cornerstone WadoImageLoader WadoImageLoader version 4.13.0 It works with dcmjs version 0.12.4, but it cannot display with version 0.29.8 We narrowed it down to the changes PR When getting from the metadataProvider, instance retrieval returns undefined

          const sourceImageMetadata = metadataProvider.get(
              "instance",
              imageId
          );

which fails in Rows check

           if (
                Rows !== sourceImageMetadata.Rows ||
                Columns !== sourceImageMetadata.Columns
            ) {

Any help appreciated

pieper commented 12 months ago

I don't really know how that metadataProvider is supposed to work (maybe the API is documented somewhere about what you can expect it to provide and what not, but I didn't find it when I looked many years ago). But if I understand correctly from the commit and PR discussion, "instance" would refer to the full parsed part10 binary and that with rs that wouldn't exist like it does with uri. Probably if the instance isn't available then and needed values should be parsed from the metadata.