Viewers: sopInstanceUid always undefined

Created on 9 Mar 2020  路  4Comments  路  Source: OHIF/Viewers

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.

Community

Most helpful comment

Thank you, I see it works well now

All 4 comments

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.

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.

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

Thank you, I see it works well now

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rossetantoine picture rossetantoine  路  5Comments

panzhengo1 picture panzhengo1  路  3Comments

TZubiri picture TZubiri  路  3Comments

christianvargasforero picture christianvargasforero  路  4Comments

christianvargasforero picture christianvargasforero  路  3Comments