Viewers icon indicating copy to clipboard operation
Viewers copied to clipboard

sopInstanceUid always undefined

Open trung1704ptit opened this issue 6 years ago • 4 comments

Hi there,

We want to check the currentImageIdIndex of stack, but always get undefined. In file: "/extentions/cornerstone/src/OHIFCornerstoneViewport.js"

` if (sopInstanceUid) { const index = stack.imageIds.findIndex(imageId => { const sopCommonModule = cornerstone.metaData.get( 'sopCommonModule', imageId ); if (!sopCommonModule) { return; }

    return sopCommonModule.sopInstanceUID === sopInstanceUid;
  });

  if (index > -1) {
    stack.currentImageIdIndex = index;
  } else {
    console.warn(
      'SOPInstanceUID provided was not found in specified DisplaySet'
    );
  }
}`

The sopInstanceUid always get undefined. We follow the code to fix it, but cannot figure out where it was wrong.

trung1704ptit avatar Mar 09 '20 03:03 trung1704ptit

This PR cleans up metadata usage: https://github.com/OHIF/Viewers/pull/1481 I recommend keeping an eye on it.

My best guess is that you're butting up against the same issues that caused @JamesAPetts to pursue his PR.

dannyrb avatar Mar 09 '20 16:03 dannyrb

Yeah its likely this is a WADO-RS / WADO-URI metadata fetching issue, if you can try using the fix later today when its pushed to master and report back that's be awesome.

JamesAPetts avatar Mar 09 '20 18:03 JamesAPetts

That PR is merged, so feel free to give it a test.

JamesAPetts avatar Mar 10 '20 10:03 JamesAPetts

Thank you, I see it works well now

trung1704ptit avatar Mar 12 '20 08:03 trung1704ptit