Skip to content

Commit 202ab4c

Browse files
author
hackermd
committed
Rename viewer class
DICOM specifies other Visibile Light Microscopy Image SOP classes. The existing viewer class specifically deals with VL Whole Slide Microscopy Image instances.
1 parent 44e860b commit 202ab4c

File tree

4 files changed

+10
-14
lines changed

4 files changed

+10
-14
lines changed

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,9 @@ We use [rollup](https://rollupjs.org/guide/en) for bundling and [mochify](https:
3030

3131
## Usage
3232

33-
The viewer can be embedded in any website.
33+
The viewer can be embedded in any website, one only needs to
3434

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 metadata for each DICOM image instance formatted according to the [
35+
* Create an instance of the `VLWholeSlideMicroscopyImageViewer`. The constructor requires an instance of `DICOMwebClient` for retrieving frames from the archive as well as the metadata for each DICOM image instance formatted according to the [
3836
DICOM JSON Model](http://dicom.nema.org/medical/dicom/current/output/chtml/part18/sect_F.2.html).
3937

4038
* Call the `render()` method, passing it the HTML element or the name of the element, which shall contain the viewport.
@@ -69,11 +67,11 @@ client.searchForInstances(searchInstanceOptions).then((instances) => {
6967
return(Promise.all(promises));
7068
}).then(metadata => {
7169
metadata = metadata.filter(m => m);
72-
const viewer = new DICOMMicroscopyViewer.api.DICOMMicroscopyViewer({
70+
const viewer = new DICOMMicroscopyViewer.api.VLWholeSlideMicroscopyImageViewer({
7371
client,
7472
metadata
7573
});
76-
viewer.render({container: 'activeViewport'});
74+
viewer.render({container: 'viewport'});
7775
});
7876
```
7977

build/dicom-microscopy-viewer.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49447,8 +49447,6 @@
4944749447
let rowFraction = j / tilesPerRow;
4944849448
let rowIndex = Math.ceil(rowFraction);
4944949449
let colIndex = j - (rowIndex * tilesPerRow) + tilesPerRow;
49450-
// let colFraction = 1 - (rowIndex - rowFraction);
49451-
// let colIndex = Math.ceil((totalPixelMatrixColumns * colFraction) / columns);
4945249450
let index = rowIndex + '-' + colIndex;
4945349451
let frameNumber = j - offset + 1;
4945449452
frameMapping[index] = `${sopInstanceUID}/frames/${frameNumber}`;
@@ -50290,7 +50288,7 @@
5029050288
const _interactions = Symbol('interactions');
5029150289

5029250290

50293-
class DICOMMicroscopyViewer {
50291+
class VLWholeSlideMicroscopyImageViewer {
5029450292

5029550293
/*
5029650294
* options:
@@ -50979,7 +50977,7 @@
5097950977
}
5098050978

5098150979
let api = {
50982-
DICOMMicroscopyViewer,
50980+
VLWholeSlideMicroscopyImageViewer,
5098350981
};
5098450982
let scoord = {
5098550983
Point: Point$1,

src/api.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ const _controls = Symbol('controls');
120120
const _interactions = Symbol('interactions');
121121

122122

123-
class DICOMMicroscopyViewer {
123+
class VLWholeSlideMicroscopyImageViewer {
124124

125125
/*
126126
* options:
@@ -828,4 +828,4 @@ class DICOMMicroscopyViewer {
828828

829829
}
830830

831-
export { DICOMMicroscopyViewer };
831+
export { VLWholeSlideMicroscopyImageViewer };

src/dicom-microscopy-viewer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { DICOMMicroscopyViewer } from './api.js';
1+
import { VLWholeSlideMicroscopyImageViewer } from './api.js';
22
import { Point, Multipoint, Polyline, Circle, Ellipse } from './scoord.js';
33

44
let api = {
5-
DICOMMicroscopyViewer,
5+
VLWholeSlideMicroscopyImageViewer,
66
};
77
let scoord = {
88
Point,

0 commit comments

Comments
 (0)