{"id":26611125,"url":"https://github.com/cornerstonejs/cornerstonewadoimageloader","last_synced_at":"2025-12-12T03:45:12.241Z","repository":{"id":15595908,"uuid":"18331941","full_name":"cornerstonejs/cornerstoneWADOImageLoader","owner":"cornerstonejs","description":"[Deprecated] Use Cornerstone3D Instead https://cornerstonejs.org/","archived":false,"fork":false,"pushed_at":"2023-12-15T16:37:36.000Z","size":29451,"stargazers_count":286,"open_issues_count":164,"forks_count":267,"subscribers_count":42,"default_branch":"master","last_synced_at":"2025-05-06T10:13:55.315Z","etag":null,"topics":["cornerstone","cornerstone-image-loader","dicom","javascript","nci-itcr","wado"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cornerstonejs.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-04-01T14:19:26.000Z","updated_at":"2025-04-25T10:17:10.000Z","dependencies_parsed_at":"2023-02-10T06:01:04.009Z","dependency_job_id":"91241fc0-d9c0-46b8-a867-b11c650f4117","html_url":"https://github.com/cornerstonejs/cornerstoneWADOImageLoader","commit_stats":{"total_commits":413,"total_committers":52,"mean_commits":"7.9423076923076925","dds":0.6828087167070218,"last_synced_commit":"2d947aff9d8430bd9c1a1ee4c3a1d105e65708f3"},"previous_names":["chafey/cornerstonewadoimageloader"],"tags_count":110,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cornerstonejs%2FcornerstoneWADOImageLoader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cornerstonejs%2FcornerstoneWADOImageLoader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cornerstonejs%2FcornerstoneWADOImageLoader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cornerstonejs%2FcornerstoneWADOImageLoader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cornerstonejs","download_url":"https://codeload.github.com/cornerstonejs/cornerstoneWADOImageLoader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254384983,"owners_count":22062422,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cornerstone","cornerstone-image-loader","dicom","javascript","nci-itcr","wado"],"created_at":"2025-03-24T02:25:42.460Z","updated_at":"2025-12-12T03:45:12.186Z","avatar_url":"https://github.com/cornerstonejs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :no_entry: [DEPRECATED] Active at new home [@cornerstonejs/dicom-image-loader](https://github.com/cornerstonejs/cornerstone3D-beta/tree/main/packages/dicomImageLoader)\n\nThis repo is no longer supported, please consider using [@cornerstonejs/dicom-image-loader](https://github.com/cornerstonejs/cornerstone3D-beta/tree/main/packages/dicomImageLoader) instead. There you can find \n- Typescript support (and type definitions)\n- Better developer experience (e.g. mono repo, linting, etc)\n\n# cornerstone WADO Image Loader\n\nA [cornerstone](https://github.com/cornerstonejs/cornerstone) Image Loader for\nDICOM P10 instances over HTTP (WADO-URI) or DICOMWeb (WADO-RS). This can be used\nto integrate cornerstone with WADO-URI servers, DICOMWeb servers or any other\nHTTP based server that returns DICOM P10 instances (e.g.\n[Orthanc](http://www.orthanc-server.com/) or custom servers)\n\n## Key Features\n\n- Implements a\n  [cornerstone ImageLoader](https://github.com/cornerstonejs/cornerstone/wiki/ImageLoader)\n  for DICOM P10 Instances via a HTTP get request.\n  - Can be used with a WADO-URI server\n  - Can be used with Orthanc's file endpoint\n  - Can be used with any server that returns DICOM P10 instances via HTTP GET\n- Implements a\n  [cornerstone ImageLoader](https://github.com/cornerstonejs/cornerstone/wiki/ImageLoader)\n  for WADO-RS (DICOMWeb)\n- Supports many popular transfer syntaxes and photometric interpretations\n  [see full list](https://github.com/cornerstonejs/cornerstoneWADOImageLoader/blob/master/docs/TransferSyntaxes.md)\n  and [codec](docs/Codecs.md) for more information.\n- Framework to execute CPU intensive tasks in [web workers](docs/WebWorkers.md)\n  - Used for image decoding\n  - Can be used for your own CPU intensive tasks (e.g. image processing)\n\n## Live Examples\n\n[Click here for a live example of this library in use!](http://rawgithub.com/cornerstonejs/cornerstoneWADOImageLoader/master/examples/index.html)\n\nYou can also see it in action with the\n[cornerstoneDemo application](https://github.com/chafey/cornerstoneDemo).\n\n## Install\n\nGet the distributed unminimized file:\n\n- [cornerstoneWADOImageLoader.js](https://unpkg.com/cornerstone-wado-image-loader)\n\nor the distributed minimized file:\n\n- [cornerstoneWADOImageLoader.bundle.min.js](https://unpkg.com/cornerstone-wado-image-loader)\n\n## Usage\n\nThe cornerstoneWADOImageLoader depends on the following external libraries which\nshould be loaded before cornerstoneWADOImageLoader.js:\n\n1. [dicomParser](https://github.com/cornerstonejs/dicomParser)\n2. [cornerstone](https://github.com/cornerstonejs/cornerstone)\n\n_New in 1.0.0_: Specify the cornerstone instance you want to register the loader\nwith.\n\n```javascript\ncornerstoneWADOImageLoader.external.cornerstone = cornerstone;\n```\n\nHave your code configure the web worker framework:\n\n```javascript\nvar config = {\n  maxWebWorkers: navigator.hardwareConcurrency || 1,\n  startWebWorkersOnDemand: true,\n};\ncornerstoneWADOImageLoader.webWorkerManager.initialize(config);\n```\n\nSee the [web workers](docs/WebWorkers.md) documentation for more details on\nconfiguring.\n\n## Upgrade to CWIL v4.x\n\nCornerstone-WADO-Image-Loader (CWIL) v4.0.x has been released, which adds\nsupport for using WebAssembly (WASM) builds of each codec. This significantly\nimproves image decoding performance and enables us to load codec at runtime when\nneeded dynamically, which reduces the build time and complexity.\n\nIn addition, we have improved the image loading performance in CWIL v4.x. In\nprevious versions of CWIL, image loading includes fetching AND decoding an image\nbefore returning a promise completion, preventing more requests from being made\nuntil the queue is empty. This limitation has been fixed in CWIL v4, which\nseparates image retrieval and decoding into two steps. Now after an image is\nretrieved, a new request is sent to the server immediately.\n\n|                     | Improvement                                        |\n| ------------------- | -------------------------------------------------- |\n| CWIL Bundle Size    | 30x smaller (3.0 MB vs 87 kb with dynamic import)  |\n| JPEG Baseline Codec | 4.5x faster (2.87 ms for 512x512 16 bit CT Slice)  |\n| JPEG 2000 Codec     | 1.8x faster (41.02 ms for 512x512 16 bit CT Slice) |\n\n### Steps to upgrade\n\n#### Dynamic Import\n\nIn v4.x, we have added dynamic importing support for the codecs as needed. To be\nable to use such feature, instead of\n\n```js\nimport cornerstoneWADOImageLoader from 'cornerstone-wado-image-loader';\n```\n\nyou need to do:\n\n```js\nimport cornerstoneWADOImageLoader from 'cornerstone-wado-image-loader/dist/dynamic-import/cornerstoneWADOImageLoader.min.js';\n```\n\nThis way, codecs are loaded dynamically when needed. You have another option to\ncreate an alias in the webpack config file as we do\n[here](https://github.com/OHIF/Viewers/blob/33307d3cd28599cbb4d7189560afdd7f65033ab8/platform/viewer/.webpack/webpack.pwa.js#L65)\nfor OHIF Viewer.\n\n```js\nresolve: {\n  alias: {\n    'cornerstone-wado-image-loader':\n      'cornerstone-wado-image-loader/dist/dynamic-import/cornerstoneWADOImageLoader.min.js',\n  },\n},\n```\n\nIn addition WASM builds of the codec files should be made available in the build\nfolder. We use `CopyWebpackPlugin` to copy the WASM files to the build folder.\nSee\n[here](https://github.com/OHIF/Viewers/blob/33307d3cd28599cbb4d7189560afdd7f65033ab8/platform/viewer/.webpack/webpack.pwa.js#L100)\nfor how we do it in OHIF Viewer.\n\n```js\n plugins: [\n  new CopyWebpackPlugin([\n    {\n      from:\n        '../../../node_modules/cornerstone-wado-image-loader/dist/dynamic-import',\n      to: DIST_DIR,\n    },\n  ]),\n```\n\nNote 1: You need to give the correct path in the `CopyWebpackPlugin`, the above\npath is relative to the `node_modules` folder in the OHIF Viewer.\n\nNote 2: For other http servers like IIS, you need to configure it to serve WASM\nfiles with the correct MIME type.\n\n## Troubleshooting\n\nHaving problems viewing your images with cornerstonWADOImageLoader? Check out\nthe\n[troubleshooting guide](https://github.com/cornerstonejs/cornerstoneWADOImageLoader/wiki/troubleshooting).\n\n## Backlog\n\n- Support for images with pixel padding\n- Support for high bit (e.g. mask out burned in overlays)\n- Free up DICOM P10 instance after decoding to reduce memory consumption\n- Add support for compressed images to WADO-RS loader\n- Look at using EMSCRIPTEN based build of IJG for JPEG\n- Consolidate all EMSCRIPTEN codecs into one build to cut down on memory use and\n  startup times\n- Add support for bulk data items to WADO-RS Loader\n- Add events to webWorkerManager so its activity can be monitored\n- Add support for issuing progress events from web worker tasks\n\n# FAQ\n\n_Why is this a separate library from cornerstone?_\n\nMainly to avoid adding a dependency to cornerstone for the DICOM parsing\nlibrary. While cornerstone is intended to be used to display medical images that\nare stored in DICOM, cornerstone aims to simplify the use of medical imaging and\ntherefore tries to hide some of the complexity that exists within DICOM. It is\nalso desirable to support display of non DICOM images so a DICOM independent\nimage model makes sense.\n\n_How do I build this library myself?_\n\nSee the documentation [here](docs/Building.md)\n\n_How do I add my own custom web worker tasks?_\n\nSee the documentation [here](docs/WebWorkers.md)\n\n_How do I create imageIds that work with this image loader?_\n\nSee the documentation [here](docs/ImageIds.md)\n\n# What Transfer Syntaxes are supported?\n\nSee [transfer syntaxes](docs/TransferSyntaxes.md)\n\n# Copyright\n\nCopyright 2016 Chris Hafey [chafey@gmail.com](mailto:chafey@gmail.com)\n\n\u003c!--\n  LINKS\n--\u003e\n\n\u003c!-- prettier-ignore-start --\u003e\n\n[license-image]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat\n[license-url]: LICENSE\n\n[npm-url]: https://npmjs.org/package/cornerstone-wado-image-loader\n[npm-version-image]: http://img.shields.io/npm/v/cornerstone-wado-image-loader.svg?style=flat\n[npm-downloads-image]: http://img.shields.io/npm/dm/cornerstone-wado-image-loader.svg?style=flat\n\n[travis-url]: http://travis-ci.org/cornerstonejs/cornerstoneWADOImageLoader\n[travis-image]: https://travis-ci.org/cornerstonejs/cornerstoneWADOImageLoader.svg?branch=master\n\n[coverage-url]: https://coveralls.io/github/cornerstonejs/cornerstoneWADOImageLoader?branch=master\n[coverage-image]: https://coveralls.io/repos/github/cornerstonejs/cornerstoneWADOImageLoader/badge.svg?branch=master\n\n\u003c!-- prettier-ignore-end --\u003e\n\n```\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcornerstonejs%2Fcornerstonewadoimageloader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcornerstonejs%2Fcornerstonewadoimageloader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcornerstonejs%2Fcornerstonewadoimageloader/lists"}