diff --git a/.vscode/settings.json b/.vscode/settings.json index 50eed834..b47d5fe9 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -18,13 +18,15 @@ // === "editor.formatOnSave": true, - "eslint.autoFixOnSave": true, "eslint.run": "onSave", - "eslint.validate": [ - { "language": "javascript", "autoFix": true }, - { "language": "javascriptreact", "autoFix": true } - ], - "prettier.disableLanguages": [], + "eslint.validate": ["javascript", "javascriptreact"], + // "eslint.validate": [ + // { "language": "javascript", "autoFix": true }, + // { "language": "javascriptreact", "autoFix": true } + // ], "prettier.endOfLine": "lf", - "workbench.colorCustomizations": {} + "workbench.colorCustomizations": {}, + "editor.codeActionsOnSave": { + "source.fixAll.eslint": true + } } diff --git a/README.md b/README.md index f9a7703b..aeaffa45 100644 --- a/README.md +++ b/README.md @@ -1,102 +1,109 @@ -[![NPM version][npm-version-image]][npm-url] [![NPM downloads][npm-downloads-image]][npm-url] [![MIT License][license-image]][license-url] [![Build Status][travis-image]][travis-url] +[![NPM version][npm-version-image]][npm-url] +[![NPM downloads][npm-downloads-image]][npm-url] +[![MIT License][license-image]][license-url] +[![Build Status][travis-image]][travis-url] [![Coverage Status][coverage-image]][coverage-url] -cornerstone WADO Image Loader -============================= +# cornerstone WADO Image Loader -A [cornerstone](https://github.com/cornerstonejs/cornerstone) Image Loader for DICOM P10 instances over -HTTP (WADO-URI) or DICOMWeb (WADO-RS). This can be used to integrate cornerstone with WADO-URI -servers, DICOMWeb servers or any other HTTP based server that returns DICOM P10 instances - (e.g. [Orthanc](http://www.orthanc-server.com/) or custom servers) +A [cornerstone](https://github.com/cornerstonejs/cornerstone) Image Loader for +DICOM P10 instances over HTTP (WADO-URI) or DICOMWeb (WADO-RS). This can be used +to integrate cornerstone with WADO-URI servers, DICOMWeb servers or any other +HTTP based server that returns DICOM P10 instances (e.g. +[Orthanc](http://www.orthanc-server.com/) or custom servers) -Troubleshooting ---------------- +## Troubleshooting -Having problems viewing your images with cornerstonWADOImageLoader? Check out the +Having problems viewing your images with cornerstonWADOImageLoader? Check out +the [troubleshooting guide](https://github.com/cornerstonejs/cornerstoneWADOImageLoader/wiki/troubleshooting). -Live Examples ---------------- +## Live Examples [Click here for a live example of this library in use!](http://rawgithub.com/cornerstonejs/cornerstoneWADOImageLoader/master/examples/index.html) You can also see it in action with the [cornerstoneDemo application](https://github.com/chafey/cornerstoneDemo). -Install -------- +## Install Get the distributed unminimized file: -* [cornerstoneWADOImageLoader.js](https://unpkg.com/cornerstone-wado-image-loader/dist/cornerstoneWADOImageLoader.js) +- [cornerstoneWADOImageLoader.js](https://unpkg.com/cornerstone-wado-image-loader/dist/cornerstoneWADOImageLoader.js) or the distributed minimized file: -* [cornerstoneWADOImageLoader.min.js](https://unpkg.com/cornerstone-wado-image-loader/dist/cornerstoneWADOImageLoader.min.js) +- [cornerstoneWADOImageLoader.min.js](https://unpkg.com/cornerstone-wado-image-loader/dist/cornerstoneWADOImageLoader.min.js) -Usage -------- +## Usage -The cornerstoneWADOImageLoader depends on the following external libraries which should be loaded before cornerstoneWADOImageLoader.js: +The cornerstoneWADOImageLoader depends on the following external libraries which +should be loaded before cornerstoneWADOImageLoader.js: - -1. [dicomParser](https://github.com/cornerstonejs/dicomParser) +1. [dicomParser](https://github.com/cornerstonejs/dicomParser) 2. [cornerstone](https://github.com/cornerstonejs/cornerstone) -*New in 1.0.0*: Specify the cornerstone instance you want to register the loader with. +_New in 1.0.0_: Specify the cornerstone instance you want to register the loader +with. -````javascript +```javascript cornerstoneWADOImageLoader.external.cornerstone = cornerstone; -```` +``` Have your code configure the web worker framework: ```javascript - var config = { - maxWebWorkers: navigator.hardwareConcurrency || 1, - startWebWorkersOnDemand : true, - }; - cornerstoneWADOImageLoader.webWorkerManager.initialize(config); +var config = { + maxWebWorkers: navigator.hardwareConcurrency || 1, + startWebWorkersOnDemand: true, +}; +cornerstoneWADOImageLoader.webWorkerManager.initialize(config); ``` -See the [web workers](docs/WebWorkers.md) documentation for more details on configuring. - -Key Features ------------- - -* Implements a [cornerstone ImageLoader](https://github.com/cornerstonejs/cornerstone/wiki/ImageLoader) for DICOM P10 Instances via a HTTP get request. - * Can be used with a WADO-URI server - * Can be used with Orthanc's file endpoint - * Can be used with any server that returns DICOM P10 instances via HTTP GET -* Implements a [cornerstone ImageLoader](https://github.com/cornerstonejs/cornerstone/wiki/ImageLoader) for WADO-RS (DICOMWeb) -* Supports many popular transfer syntaxes and photometric interpretations [see full list](https://github.com/cornerstonejs/cornerstoneWADOImageLoader/blob/master/docs/TransferSyntaxes.md) and [codec](docs/Codecs.md) for more information. -* Framework to execute CPU intensive tasks in [web workers](docs/WebWorkers.md) - * Used for image decoding - * Can be used for your own CPU intensive tasks (e.g. image processing) - -Backlog -------- - -* Support for images with pixel padding -* Support for high bit (e.g. mask out burned in overlays) -* Free up DICOM P10 instance after decoding to reduce memory consumption -* Add support for compressed images to WADO-RS loader -* Look at using EMSCRIPTEN based build of IJG for JPEG -* Consolidate all EMSCRIPTEN codecs into one build to cut down on memory use and startup times -* Add support for bulk data items to WADO-RS Loader -* Add events to webWorkerManager so its activity can be monitored -* Add support for issuing progress events from web worker tasks - -FAQ -=== +See the [web workers](docs/WebWorkers.md) documentation for more details on +configuring. + +## Key Features + +- Implements a + [cornerstone ImageLoader](https://github.com/cornerstonejs/cornerstone/wiki/ImageLoader) + for DICOM P10 Instances via a HTTP get request. + - Can be used with a WADO-URI server + - Can be used with Orthanc's file endpoint + - Can be used with any server that returns DICOM P10 instances via HTTP GET +- Implements a + [cornerstone ImageLoader](https://github.com/cornerstonejs/cornerstone/wiki/ImageLoader) + for WADO-RS (DICOMWeb) +- Supports many popular transfer syntaxes and photometric interpretations + [see full list](https://github.com/cornerstonejs/cornerstoneWADOImageLoader/blob/master/docs/TransferSyntaxes.md) + and [codec](docs/Codecs.md) for more information. +- Framework to execute CPU intensive tasks in [web workers](docs/WebWorkers.md) + - Used for image decoding + - Can be used for your own CPU intensive tasks (e.g. image processing) + +## Backlog + +- Support for images with pixel padding +- Support for high bit (e.g. mask out burned in overlays) +- Free up DICOM P10 instance after decoding to reduce memory consumption +- Add support for compressed images to WADO-RS loader +- Look at using EMSCRIPTEN based build of IJG for JPEG +- Consolidate all EMSCRIPTEN codecs into one build to cut down on memory use and + startup times +- Add support for bulk data items to WADO-RS Loader +- Add events to webWorkerManager so its activity can be monitored +- Add support for issuing progress events from web worker tasks + +# FAQ _Why is this a separate library from cornerstone?_ -Mainly to avoid adding a dependency to cornerstone for the DICOM parsing library. While cornerstone is -intended to be used to display medical images that are stored in DICOM, cornerstone aims to simplify -the use of medical imaging and therefore tries to hide some of the complexity that exists within -DICOM. It is also desirable to support display of non DICOM images so a DICOM independent image model -makes sense. +Mainly to avoid adding a dependency to cornerstone for the DICOM parsing +library. While cornerstone is intended to be used to display medical images that +are stored in DICOM, cornerstone aims to simplify the use of medical imaging and +therefore tries to hide some of the complexity that exists within DICOM. It is +also desirable to support display of non DICOM images so a DICOM independent +image model makes sense. _How do I build this library myself?_ @@ -110,8 +117,8 @@ _How do I create imageIds that work with this image loader?_ See the documentation [here](docs/ImageIds.md) -Copyright -============ +# Copyright + Copyright 2016 Chris Hafey [chafey@gmail.com](mailto:chafey@gmail.com) + + + + +
+ + +
Image Load Progress:
+ +
+
+
+ +
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+
+
+ Apply Modality LUT + Apply VOI LUT +
+
+
+
+
+
+
+
+
+ Transfer Syntax:
+ SOP Class:
+ Samples Per Pixel:
+ Photometric Interpretation:
+ Number Of Frames:
+ Planar Configuration:
+ Rows:
+ Columns:
+ Pixel Spacing:
+ Row Pixel Spacing:
+ Column Pixel Spacing:
+ Bits Allocated:
+ Bits Stored:
+ High Bit:
+ Pixel Representation:
+ WindowCenter:
+ WindowWidth:
+ RescaleIntercept:
+ RescaleSlope:
+ Basic Offset Table Entries:
+ Fragments:
+ Max Stored Pixel Value:
+ Min Stored Pixel Value:
+ Total Time:
+ Load Time:
+ Decode Time:
+
+
+
+ + + + + + + + + + + + + + + + + + + + + diff --git a/examples/utils/initializeWebWorkers.js b/examples/utils/initializeWebWorkers.js index d6f69eac..99bd9d4f 100644 --- a/examples/utils/initializeWebWorkers.js +++ b/examples/utils/initializeWebWorkers.js @@ -9,11 +9,10 @@ try { decodeTask: { initializeCodecsOnStartup: false, usePDFJS: false, - strict: true - } - } + strict: true, + }, + }, }); } catch (error) { throw new Error('cornerstoneWADOImageLoader is not loaded'); } - diff --git a/examples/wadors/index.html b/examples/wadors/index.html index c20e4ba6..afde0b36 100644 --- a/examples/wadors/index.html +++ b/examples/wadors/index.html @@ -67,7 +67,7 @@

Example of displaying a WADO-RS RetreiveFrame response using Cornerstone

- + - +