|
1 | 1 | [](https://travis-ci.com/dcmjs-org/dicom-microscopy-viewer) |
2 | 2 |
|
3 | 3 | # DICOM Microscopy Viewer |
4 | | -Web-based viewer for [DICOM Visible Light Whole Slide Microscopy Images](http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_A.32.8.html). |
| 4 | +Vanilla JS library for web-based visualization of [DICOM VL Whole Slide Microscopy Image](http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_A.32.8.html) datasets. |
| 5 | +The library relies on [Openlayers](http://openlayers.org/) for rendering pyramid images and retrieves pyramid tiles (image frames) using [DICOMweb WADO-RS](https://www.dicomstandard.org/dicomweb/retrieve-wado-rs-and-wado-uri/). |
5 | 6 |
|
6 | 7 |
|
7 | | -## Install |
| 8 | +## Installation |
8 | 9 |
|
9 | | -The [dicom-microscopy-viewer](https://www.npmjs.com/package/dicom-microscopy-viewer) package can be installed via `npm` package manager: |
| 10 | +Install the [dicom-microscopy-viewer](https://www.npmjs.com/package/dicom-microscopy-viewer) package using the `npm` package manager: |
10 | 11 |
|
11 | 12 | ```None |
12 | 13 | npm install dicom-microscopy-viewer |
13 | 14 | ``` |
14 | 15 |
|
15 | | -## Build |
| 16 | +## Building and testing |
16 | 17 |
|
17 | | -The library can be build locally with [rollup](https://rollupjs.org/guide/en): |
| 18 | +Build and test code locally: |
18 | 19 |
|
19 | 20 | ```None |
20 | 21 | git clone https://github.com/dcmjs-org/dicom-microscopy-viewer ~/dicom-microscopy-viewer |
21 | 22 | cd ~/dicom-microscopy-viewer |
22 | 23 | npm install |
23 | 24 | npm run build |
| 25 | +npm test |
24 | 26 | ``` |
25 | 27 |
|
26 | | -## Test |
| 28 | +We use [rollup](https://rollupjs.org/guide/en) for bundling and [mochify](https://github.com/mantoni/mochify.js) for testing (based on [mocha](https://mochajs.org/) and [chai](http://www.chaijs.com/)). |
27 | 29 |
|
28 | | -The library can be tested locally with [mochify](https://github.com/mantoni/mochify.js) (using [mocha](https://mochajs.org/) and [chai](http://www.chaijs.com/)): |
29 | | - |
30 | | -```None |
31 | | -git clone https://github.com/dcmjs-org/dicom-microscopy-viewer ~/dicom-microscopy-viewer |
32 | | -cd ~/dicom-microscopy-viewer |
33 | | -npm install |
34 | | -npm test |
35 | | -``` |
36 | 30 |
|
37 | 31 | ## Usage |
38 | 32 |
|
| 33 | +The viewer can be embedded in any website. |
| 34 | + |
| 35 | +To this end |
| 36 | + |
| 37 | +* Create an instance of the `DICOMMicroscopy` viewer. The constructor requires an instance of `DICOMwebClient` for retrieving frames from the archive as well as the [Study Instance UID](http://dicom.nema.org/medical/dicom/2018b/output/chtml/part03/sect_C.7.2.html#para_a73c2743-6150-4a31-9da7-0d50edb8cd67) and [Series Instance UID](http://dicom.nema.org/medical/dicom/2018b/output/chtml/part03/sect_C.7.3.html#para_b0bcb555-c05c-4c1d-8b7e-8904168a3d38). |
| 38 | + |
| 39 | +* Call the `render()` method, passing it the HTML element or the name of the element, which shall contain the viewport. |
| 40 | + |
| 41 | + |
39 | 42 | ```js |
40 | 43 | const url = 'http://localhost:8080/dicomweb'; |
41 | 44 | const client = new DICOMwebClient.api.DICOMwebClient({url}); |
|
0 commit comments