How to use the cornerstone-wado-image-loader.wadouri 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.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cornerstonejs / react-cornerstone-viewport / src / metadataProvider.js View on Github external
function wadoUriMetaDataProvider(type, imageId) {
  const {
    parseImageId,
    dataSetCacheManager,
  } = cornerstoneWADOImageLoader.wadouri;
  const parsedImageId = parseImageId(imageId);
  const dataSet = dataSetCacheManager.get(parsedImageId.url);

  if (!dataSet) {
    return;
  }

  if (type === 'generalImageModule') {
    return {
      instanceNumber: dataSet.intString('x00200013'),
      lossyImageCompression: dataSet.string('x00282110'),
      lossyImageCompressionRatio: dataSet.string('x00282112'),
      lossyImageCompressionMethod: dataSet.string('x00282114'),
    };
  }
github OHIF / ohif-core / src / classes / StudyLoadingListener.js View on Github external
_checkCachedData() {
    const dataSet = cornerstoneWADOImageLoader.wadouri.dataSetCacheManager.get(
      this._dataSetUrl
    );

    if (dataSet) {
      const dataSetLength = dataSet.byteArray.length;

      this._updateProgress({
        percentComplete: 100,
        loaded: dataSetLength,
        total: dataSetLength,
      });
    }
  }