How to use the cornerstone-wado-image-loader.configure function in cornerstone-wado-image-loader

To help you get started, we’ve selected a few cornerstone-wado-image-loader examples, based on popular ways it is used in public projects.

github OHIF / Viewers / src / config.js View on Github external
cornerstoneWADOImageLoader.external.cornerstone = cornerstone
cornerstoneWADOImageLoader.external.dicomParser = dicomParser

OHIF.user.getAccessToken = () => {
  // TODO: Get the Redux store from somewhere else
  const state = window.store.getState()
  if (!state.oidc || !state.oidc.user) {
    console.warn('failed to grab access token')
    return
  }

  return state.oidc.user.access_token
}

cornerstoneWADOImageLoader.configure({
  beforeSend: function(xhr) {
    const headers = OHIF.DICOMWeb.getAuthorizationHeader()

    if (headers.Authorization) {
      xhr.setRequestHeader('Authorization', headers.Authorization)
    }
  },
})
github OHIF / Viewers / src / config.js View on Github external
//}

cornerstoneWADOImageLoader.external.cornerstone = cornerstone;
cornerstoneWADOImageLoader.external.dicomParser = dicomParser;

OHIF.user.getAccessToken = () => {
  // TODO: Get the Redux store from somewhere else
  const state = window.store.getState();
  if (!state.oidc || !state.oidc.user) {
    return;
  }

  return state.oidc.user.access_token;
};

cornerstoneWADOImageLoader.configure({
  beforeSend: function(xhr) {
    const headers = OHIF.DICOMWeb.getAuthorizationHeader();

    if (headers.Authorization) {
      xhr.setRequestHeader('Authorization', headers.Authorization);
    }
  },
});
github OHIF / Viewers / OHIFViewer-react / src / config.js View on Github external
};

cornerstoneWADOImageLoader.webWorkerManager.initialize(config);


OHIF.user.getAccessToken = () => {
    // TODO: Get the Redux store from somewhere else
    const state = window.store.getState();
    if (!state.oidc || !state.oidc.user) {
        return;
    }

    return state.oidc.user.access_token;
}

cornerstoneWADOImageLoader.configure({
    beforeSend: function(xhr) {
        const headers = OHIF.DICOMWeb.getAuthorizationHeader();

        if (headers.Authorization) {
            xhr.setRequestHeader("Authorization", headers.Authorization);
        }
    }
});
github OHIF / Viewers / platform / viewer / src / config.js View on Github external
//}

cornerstoneWADOImageLoader.external.cornerstone = cornerstone;
cornerstoneWADOImageLoader.external.dicomParser = dicomParser;

OHIF.user.getAccessToken = () => {
  // TODO: Get the Redux store from somewhere else
  const state = window.store.getState();
  if (!state.oidc || !state.oidc.user) {
    return;
  }

  return state.oidc.user.access_token;
};

cornerstoneWADOImageLoader.configure({
  beforeSend: function(xhr) {
    const headers = OHIF.DICOMWeb.getAuthorizationHeader();

    if (headers.Authorization) {
      xhr.setRequestHeader('Authorization', headers.Authorization);
    }
  },
});

cornerstone-wado-image-loader

Cornerstone Image Loader for DICOM WADO-URI and WADO-RS

MIT
Latest version published 2 months ago

Package Health Score

81 / 100
Full package analysis