dicom-microscopy-viewer 0.36.2 → 0.36.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -42
- package/{build → dist}/08929516bda4c4fd2597.module.wasm +0 -0
- package/{build → dist}/4f2853de305c1b5afcac.module.wasm +0 -0
- package/{build → dist}/6ae9c6e051fd2bd70fad.module.wasm +0 -0
- package/{build → dist}/6b62efd6c7f30afd4c78.module.wasm +0 -0
- package/{build → dist}/7e1d2da75b59525e1933.module.wasm +0 -0
- package/{build → dist}/d051f2d564fae150ce94.module.wasm +0 -0
- package/dist/dicom-microscopy-viewer.js +2 -0
- package/{build → dist}/dicom-microscopy-viewer.js.LICENSE.txt +0 -0
- package/dist/dicom-microscopy-viewer.js.map +1 -0
- package/{build → dist}/e6305f756142e57c92cd.module.wasm +0 -0
- package/{build → dist}/f3e0c999ad06a34a7f75.module.wasm +0 -0
- package/docs/annotation.AnnotationGroup.html +142 -43
- package/docs/annotation.html +2 -2
- package/docs/annotation.js.html +47 -34
- package/docs/annotations__AnnotationManager.js.html +2 -2
- package/docs/annotations_markups__MarkupManager.js.html +2 -2
- package/docs/api.html +2 -2
- package/docs/color.PaletteColorLookupTable.html +42 -14
- package/docs/color.html +6 -6
- package/docs/color.js.html +14 -14
- package/docs/dicom-microscopy-viewer.js.html +2 -2
- package/docs/events.html +316 -2
- package/docs/events.js.html +13 -4
- package/docs/index.html +44 -44
- package/docs/mapping.ParameterMapping.html +342 -27
- package/docs/mapping.Transformation.html +221 -14
- package/docs/mapping.html +2 -2
- package/docs/mapping.js.html +41 -32
- package/docs/metadata.Comprehensive3DSR.html +254 -5
- package/docs/metadata.MicroscopyBulkSimpleAnnotations.html +254 -5
- package/docs/metadata.ParametricMap.html +254 -5
- package/docs/metadata.SOPClass.html +399 -0
- package/docs/metadata.Segmentation.html +254 -5
- package/docs/metadata.VLWholeSlideMicroscopyImage.html +255 -7
- package/docs/metadata.html +14 -32
- package/docs/metadata.js.html +55 -21
- package/docs/opticalPath.OpticalPath.html +453 -26
- package/docs/opticalPath.html +2 -2
- package/docs/opticalPath.js.html +16 -17
- package/docs/pyramid.js.html +2 -2
- package/docs/roi.ROI.html +317 -25
- package/docs/roi.html +2 -2
- package/docs/roi.js.html +26 -19
- package/docs/scoord3d.Ellipse.html +14 -18
- package/docs/scoord3d.Ellipsoid.html +14 -18
- package/docs/scoord3d.Multipoint.html +14 -18
- package/docs/scoord3d.Point.html +13 -17
- package/docs/scoord3d.Polygon.html +14 -18
- package/docs/scoord3d.Polyline.html +14 -18
- package/docs/scoord3d.Scoord3D.html +608 -0
- package/docs/scoord3d.html +5 -2
- package/docs/scoord3d.js.html +101 -54
- package/docs/segment.Segment.html +160 -48
- package/docs/segment.html +2 -2
- package/docs/segment.js.html +37 -33
- package/docs/utils.html +148 -4
- package/docs/utils.js.html +6 -6
- package/docs/viewer.LabelImageViewer.html +14 -15
- package/docs/viewer.OverviewImageViewer.html +15 -15
- package/docs/viewer.VolumeImageViewer.html +215 -282
- package/docs/viewer.html +2 -2
- package/docs/viewer.js.html +150 -133
- package/package.json +4 -3
- package/src/annotation.js +45 -32
- package/src/color.js +12 -12
- package/src/events.js +11 -2
- package/src/mapping.js +39 -30
- package/src/metadata.js +53 -19
- package/src/opticalPath.js +14 -15
- package/src/roi.js +24 -17
- package/src/scoord3d.js +99 -52
- package/src/segment.js +35 -31
- package/src/utils.js +4 -4
- package/src/viewer.js +258 -207
- package/webpack.config.js +11 -1
- package/build/dicom-microscopy-viewer.js +0 -2
- package/build/dicom-microscopy-viewer.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dicom-microscopy-viewer",
|
|
3
|
-
"version": "0.36.
|
|
3
|
+
"version": "0.36.5",
|
|
4
4
|
"description": "Interactive web-based viewer for DICOM Microscopy Images",
|
|
5
5
|
"main": "./src/dicom-microscopy-viewer.js",
|
|
6
6
|
"standard": {
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
"build": "webpack --mode=development",
|
|
25
25
|
"build:prod": "webpack --mode=production",
|
|
26
26
|
"prepublishOnly": "npm run build:prod",
|
|
27
|
-
"generateStaticSite": "npm run build:prod && cp -R ./
|
|
27
|
+
"generateStaticSite": "npm run build:prod && cp -R ./dist ./examples",
|
|
28
28
|
"generateDocs": "jsdoc -c ./jsdoc_conf.json",
|
|
29
29
|
"fmt": "standard 'src/**/.js' --fix",
|
|
30
30
|
"lint": "standard 'src/**/*.js'",
|
|
31
|
-
"clean": "rm -rf ./
|
|
31
|
+
"clean": "rm -rf ./dist ./node_modules"
|
|
32
32
|
},
|
|
33
33
|
"repository": {
|
|
34
34
|
"type": "git",
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"@babel/core": "7.17",
|
|
51
51
|
"@babel/preset-env": "7.16",
|
|
52
52
|
"babel-jest": "27.5",
|
|
53
|
+
"babel-loader": "^8.2.3",
|
|
53
54
|
"css-loader": "^6.6",
|
|
54
55
|
"jest": "^27.5",
|
|
55
56
|
"jest-canvas-mock": "^2.3",
|
package/src/annotation.js
CHANGED
|
@@ -5,23 +5,25 @@ import {
|
|
|
5
5
|
|
|
6
6
|
const _attrs = Symbol('attrs')
|
|
7
7
|
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* Annotation Group.
|
|
10
|
+
*
|
|
11
|
+
* Describes an item of the Annotation Group Sequence of a DICOM Microscopy Bulk
|
|
12
|
+
* Simple Annotations instance.
|
|
9
13
|
*
|
|
10
14
|
* @class
|
|
11
15
|
* @memberof annotation
|
|
12
16
|
*/
|
|
13
17
|
class AnnotationGroup {
|
|
14
18
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* @param {Object} options - Options for construction of Annotation Group
|
|
18
|
-
* @param {string} options.uid - Unique tracking identifier
|
|
19
|
+
* @param {Object} options - Options
|
|
20
|
+
* @param {string} options.uid - Annotation Group UID
|
|
19
21
|
* @param {number} options.number - Annotation Group Number (one-based index value)
|
|
20
22
|
* @param {string} options.label - Annotation Group Label
|
|
21
23
|
* @param {string} options.algorithmName - Annotation Group Algorithm Name
|
|
22
|
-
* @param {
|
|
23
|
-
* @param {
|
|
24
|
-
* @param {
|
|
24
|
+
* @param {Object} options.algorithmType - Annotation Group Algorithm Type
|
|
25
|
+
* @param {Object} options.propertyCategory - Annotation Property Category Code
|
|
26
|
+
* @param {Object} options.propertyType - Annotation Property Type Code
|
|
25
27
|
* @param {string} options.studyInstanceUID - Study Instance UID of Annotation instances
|
|
26
28
|
* @param {string} options.seriesInstanceUID - Series Instance UID of Annotation instances
|
|
27
29
|
* @param {string[]} options.sopInstanceUIDs - SOP Instance UIDs of Annotation instances
|
|
@@ -89,83 +91,94 @@ class AnnotationGroup {
|
|
|
89
91
|
throw new Error('SOP Instance UIDs are required.')
|
|
90
92
|
}
|
|
91
93
|
this[_attrs].sopInstanceUIDs = sopInstanceUIDs
|
|
94
|
+
Object.freeze(this)
|
|
92
95
|
}
|
|
93
96
|
|
|
94
|
-
/**
|
|
97
|
+
/**
|
|
98
|
+
* Annotation Group UID
|
|
95
99
|
*
|
|
96
|
-
* @
|
|
100
|
+
* @type string
|
|
97
101
|
*/
|
|
98
102
|
get uid () {
|
|
99
103
|
return this[_attrs].uid
|
|
100
104
|
}
|
|
101
105
|
|
|
102
|
-
/**
|
|
106
|
+
/**
|
|
107
|
+
* Annotation Group Number.
|
|
103
108
|
*
|
|
104
|
-
* @
|
|
109
|
+
* @type number
|
|
105
110
|
*/
|
|
106
111
|
get number () {
|
|
107
112
|
return this[_attrs].number
|
|
108
113
|
}
|
|
109
114
|
|
|
110
|
-
/**
|
|
115
|
+
/**
|
|
116
|
+
* Annotation Group Label
|
|
111
117
|
*
|
|
112
|
-
* @
|
|
118
|
+
* @type string
|
|
113
119
|
*/
|
|
114
120
|
get label () {
|
|
115
121
|
return this[_attrs].label
|
|
116
122
|
}
|
|
117
123
|
|
|
118
|
-
/**
|
|
124
|
+
/**
|
|
125
|
+
* Annotation Group Algorithm Identification
|
|
119
126
|
*
|
|
120
|
-
* @
|
|
127
|
+
* @type string
|
|
121
128
|
*/
|
|
122
129
|
get algorithmName () {
|
|
123
130
|
return this[_attrs].algorithmName
|
|
124
131
|
}
|
|
125
132
|
|
|
126
|
-
/**
|
|
133
|
+
/**
|
|
134
|
+
* Annotation Group Generation Type
|
|
127
135
|
*
|
|
128
|
-
* @
|
|
136
|
+
* @type Object
|
|
129
137
|
*/
|
|
130
138
|
get algorithmType () {
|
|
131
139
|
return this[_attrs].algorithmType
|
|
132
140
|
}
|
|
133
141
|
|
|
134
|
-
/**
|
|
142
|
+
/**
|
|
143
|
+
* Annotation Property Category
|
|
135
144
|
*
|
|
136
|
-
* @
|
|
145
|
+
* @type Object
|
|
137
146
|
*/
|
|
138
147
|
get propertyCategory () {
|
|
139
148
|
return this[_attrs].propertyCategory
|
|
140
149
|
}
|
|
141
150
|
|
|
142
|
-
/**
|
|
151
|
+
/**
|
|
152
|
+
* Annotation Property Type
|
|
143
153
|
*
|
|
144
|
-
* @
|
|
154
|
+
* @type Object
|
|
145
155
|
*/
|
|
146
156
|
get propertyType () {
|
|
147
157
|
return this[_attrs].propertyType
|
|
148
158
|
}
|
|
149
159
|
|
|
150
|
-
/**
|
|
160
|
+
/**
|
|
161
|
+
* Study Instance UID of DICOM Microscopy Bulk Simple Annotations objects.
|
|
151
162
|
*
|
|
152
|
-
* @
|
|
163
|
+
* @type string
|
|
153
164
|
*/
|
|
154
165
|
get studyInstanceUID () {
|
|
155
166
|
return this[_attrs].studyInstanceUID
|
|
156
167
|
}
|
|
157
168
|
|
|
158
|
-
/**
|
|
169
|
+
/**
|
|
170
|
+
* Series Instance UID of DICOM Microscopy Bulk Simple Annotations objects.
|
|
159
171
|
*
|
|
160
|
-
* @
|
|
172
|
+
* @type string
|
|
161
173
|
*/
|
|
162
174
|
get seriesInstanceUID () {
|
|
163
175
|
return this[_attrs].seriesInstanceUID
|
|
164
176
|
}
|
|
165
177
|
|
|
166
|
-
/**
|
|
178
|
+
/**
|
|
179
|
+
* SOP Instance UIDs of DICOM Microscopy Bulk Simple Annotations objects.
|
|
167
180
|
*
|
|
168
|
-
* @
|
|
181
|
+
* @type string[]
|
|
169
182
|
*/
|
|
170
183
|
get sopInstanceUIDs () {
|
|
171
184
|
return this[_attrs].sopInstanceUIDs
|
|
@@ -175,10 +188,10 @@ class AnnotationGroup {
|
|
|
175
188
|
/**
|
|
176
189
|
* Fetch graphic data (point coordinates) of an annotation group.
|
|
177
190
|
*
|
|
178
|
-
* @param {
|
|
179
|
-
* @param {
|
|
180
|
-
* @param {
|
|
181
|
-
* @param {
|
|
191
|
+
* @param {Object} options
|
|
192
|
+
* @param {Object} options.metadataItem - Metadata of Annotation Group Sequence item
|
|
193
|
+
* @param {Object} options.bulkdataItem - Bulkdata of Annotation Group Sequence item
|
|
194
|
+
* @param {Object} options.client - DICOMweb client
|
|
182
195
|
*
|
|
183
196
|
* @returns {Promise<TypedArray>} Graphic data
|
|
184
197
|
*
|
package/src/color.js
CHANGED
|
@@ -24,7 +24,7 @@ Object.freeze(ColormapNames)
|
|
|
24
24
|
/**
|
|
25
25
|
* Create a color map.
|
|
26
26
|
*
|
|
27
|
-
* @param {
|
|
27
|
+
* @param {Object} options
|
|
28
28
|
* @param {string} options.name - Name of the color map
|
|
29
29
|
* @param {string} options.bins - Number of color bins
|
|
30
30
|
*
|
|
@@ -64,11 +64,11 @@ function createColormap ({ name, bins }) {
|
|
|
64
64
|
/**
|
|
65
65
|
* Build a palette color lookup table object from a colormap.
|
|
66
66
|
*
|
|
67
|
-
* @param {
|
|
67
|
+
* @param {Object} options
|
|
68
68
|
* @param {number[][]} options.data - Array of RGB triplets for each color
|
|
69
69
|
* @param {number} options.firstValueMapped - First value that should be mapped
|
|
70
70
|
*
|
|
71
|
-
* @returns {PaletteColorLookupTable} Mapping of grayscale pixel values to RGB color triplets
|
|
71
|
+
* @returns {color.PaletteColorLookupTable} Mapping of grayscale pixel values to RGB color triplets
|
|
72
72
|
*
|
|
73
73
|
* @memberof color
|
|
74
74
|
*/
|
|
@@ -118,9 +118,7 @@ function buildPaletteColorLookupTable ({ data, firstValueMapped }) {
|
|
|
118
118
|
*/
|
|
119
119
|
class PaletteColorLookupTable {
|
|
120
120
|
/**
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
* @param {object} options
|
|
121
|
+
* @param {Object} options
|
|
124
122
|
* @param {string} options.uid - UID
|
|
125
123
|
* @param {number[]} options.redDescriptor - Red LUT descriptor
|
|
126
124
|
* @param {number[]} options.greenDescriptor - Green LUT descriptor
|
|
@@ -314,18 +312,20 @@ class PaletteColorLookupTable {
|
|
|
314
312
|
}
|
|
315
313
|
|
|
316
314
|
/**
|
|
317
|
-
*
|
|
315
|
+
* Palette Color Lookup Table UID
|
|
318
316
|
*
|
|
319
|
-
* @
|
|
317
|
+
* @type string
|
|
320
318
|
*/
|
|
321
319
|
get uid () {
|
|
322
320
|
return this[_attrs].uid
|
|
323
321
|
}
|
|
324
322
|
|
|
325
323
|
/**
|
|
326
|
-
*
|
|
324
|
+
* Palette Color Lookup Table Data.
|
|
325
|
+
*
|
|
326
|
+
* RGB color triplet for each value mapped.
|
|
327
327
|
*
|
|
328
|
-
* @
|
|
328
|
+
* @type number[][]
|
|
329
329
|
*/
|
|
330
330
|
get data () {
|
|
331
331
|
if (this[_attrs].data == null) {
|
|
@@ -400,9 +400,9 @@ class PaletteColorLookupTable {
|
|
|
400
400
|
}
|
|
401
401
|
|
|
402
402
|
/**
|
|
403
|
-
*
|
|
403
|
+
* First value mapped
|
|
404
404
|
*
|
|
405
|
-
* @
|
|
405
|
+
* @type number
|
|
406
406
|
*/
|
|
407
407
|
get firstValueMapped () {
|
|
408
408
|
return this[_attrs].firstValueMapped
|
package/src/events.js
CHANGED
|
@@ -5,19 +5,28 @@ const PROJECT_NAME = 'dicommicroscopyviewer'
|
|
|
5
5
|
* normalized, and re-triggered with a `dicommicroscopyviewer` prefix.
|
|
6
6
|
* This allows handling of events consistently across different browsers.
|
|
7
7
|
*
|
|
8
|
-
* @enum {
|
|
9
|
-
* @memberof
|
|
8
|
+
* @enum {string}
|
|
9
|
+
* @memberof events
|
|
10
10
|
* @readonly
|
|
11
11
|
*/
|
|
12
12
|
const EVENTS = {
|
|
13
|
+
/** Triggered when a ROI was added. */
|
|
13
14
|
ROI_ADDED: `${PROJECT_NAME}_roi_added`,
|
|
15
|
+
/** Triggered when a ROI was removed. */
|
|
14
16
|
ROI_REMOVED: `${PROJECT_NAME}_roi_removed`,
|
|
17
|
+
/** Triggered when a ROI was drawn. */
|
|
15
18
|
ROI_DRAWN: `${PROJECT_NAME}_roi_drawn`,
|
|
19
|
+
/** Triggered when a ROI was selected. */
|
|
16
20
|
ROI_SELECTED: `${PROJECT_NAME}_roi_selected`,
|
|
21
|
+
/** Triggered when a ROI was modified. */
|
|
17
22
|
ROI_MODIFIED: `${PROJECT_NAME}_roi_modified`,
|
|
23
|
+
/** Triggered when a viewport move has started. */
|
|
18
24
|
MOVE_STARTED: `${PROJECT_NAME}_move_started`,
|
|
25
|
+
/** Triggered when a viewport move has ended. */
|
|
19
26
|
MOVE_ENDED: `${PROJECT_NAME}_move_ended`,
|
|
27
|
+
/** Triggered when a loading of data has started. */
|
|
20
28
|
LOADING_STARTED: `${PROJECT_NAME}_loading_started`,
|
|
29
|
+
/** Triggered when a loading of data has ended. */
|
|
21
30
|
LOADING_ENDED: `${PROJECT_NAME}_loading_ended`
|
|
22
31
|
}
|
|
23
32
|
|
package/src/mapping.js
CHANGED
|
@@ -1,27 +1,31 @@
|
|
|
1
1
|
const _attrs = Symbol('attrs')
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* lookup table (LUT) or alternatively by the slope and intercept parameters if
|
|
9
|
-
* the transformation can be described by a linear function.
|
|
4
|
+
* Transformation of a range of stored values into real world values in a
|
|
5
|
+
* defined unit. The transformation may either be described by a lookup table
|
|
6
|
+
* (LUT) or alternatively by the slope and intercept parameters if the
|
|
7
|
+
* transformation can be described by a linear function.
|
|
10
8
|
*
|
|
11
9
|
* @class
|
|
12
10
|
* @memberof mapping
|
|
13
11
|
*/
|
|
14
12
|
class Transformation {
|
|
15
13
|
/**
|
|
16
|
-
*
|
|
14
|
+
* @param {Object} options - Options
|
|
15
|
+
* @param {string} options.label - LUT Label
|
|
16
|
+
* @param {number} options.firstValueMapped - First value mapped by LUT
|
|
17
|
+
* @param {number} options.lastValueMapped - Last value mapped by LUT
|
|
18
|
+
* @param {lut} options.lut - LUT data
|
|
19
|
+
* @param {number} options.intercept - Intercept of linear function
|
|
20
|
+
* @param {number} options.slope - Slope of linear function
|
|
17
21
|
*/
|
|
18
22
|
constructor ({
|
|
19
23
|
label,
|
|
20
24
|
firstValueMapped,
|
|
21
25
|
lastValueMapped,
|
|
26
|
+
lut,
|
|
22
27
|
intercept,
|
|
23
|
-
slope
|
|
24
|
-
lut
|
|
28
|
+
slope
|
|
25
29
|
}) {
|
|
26
30
|
if (label === undefined) {
|
|
27
31
|
throw new Error('LUT Label is required.')
|
|
@@ -60,22 +64,27 @@ class Transformation {
|
|
|
60
64
|
}
|
|
61
65
|
|
|
62
66
|
/**
|
|
63
|
-
*
|
|
67
|
+
* Parameter Mapping.
|
|
68
|
+
*
|
|
69
|
+
* Describes an individual parameter encoded in a DICOM Parametric Map instance.
|
|
64
70
|
*
|
|
65
71
|
* @class
|
|
66
72
|
* @memberof mapping
|
|
67
73
|
*/
|
|
68
74
|
class ParameterMapping {
|
|
69
|
-
|
|
70
|
-
*
|
|
75
|
+
/**
|
|
71
76
|
* @param {Object} options
|
|
72
77
|
* @param {string} options.uid - Unique tracking identifier
|
|
73
78
|
* @param {number} options.number - Mapping Number (one-based index value)
|
|
74
79
|
* @param {string} options.label - Mapping Label
|
|
75
|
-
* @param {string} options.studyInstanceUID - Study Instance UID of
|
|
76
|
-
*
|
|
77
|
-
* @param {string
|
|
78
|
-
*
|
|
80
|
+
* @param {string} options.studyInstanceUID - Study Instance UID of DICOM
|
|
81
|
+
* Parametric Map instances
|
|
82
|
+
* @param {string} options.seriesInstanceUID - Series Instance UID of DICOM
|
|
83
|
+
* Parametric Map instances
|
|
84
|
+
* @param {string[]} options.sopInstanceUIDs - SOP Instance UIDs of DICOM
|
|
85
|
+
* Parametric Map instances
|
|
86
|
+
* @param {string|undefined} options.paletteColorLookupTableUID - Palette
|
|
87
|
+
* Color Lookup Table UID
|
|
79
88
|
*/
|
|
80
89
|
constructor ({
|
|
81
90
|
uid,
|
|
@@ -124,63 +133,63 @@ class ParameterMapping {
|
|
|
124
133
|
}
|
|
125
134
|
|
|
126
135
|
/**
|
|
127
|
-
*
|
|
136
|
+
* Unique Tracking Identifier
|
|
128
137
|
*
|
|
129
|
-
* @
|
|
138
|
+
* @type string
|
|
130
139
|
*/
|
|
131
140
|
get uid () {
|
|
132
141
|
return this[_attrs].uid
|
|
133
142
|
}
|
|
134
143
|
|
|
135
144
|
/**
|
|
136
|
-
*
|
|
145
|
+
* Mapping Number.
|
|
137
146
|
*
|
|
138
|
-
* @
|
|
147
|
+
* @type number
|
|
139
148
|
*/
|
|
140
149
|
get number () {
|
|
141
150
|
return this[_attrs].number
|
|
142
151
|
}
|
|
143
152
|
|
|
144
153
|
/**
|
|
145
|
-
*
|
|
154
|
+
* Mapping Label
|
|
146
155
|
*
|
|
147
|
-
* @
|
|
156
|
+
* @type string
|
|
148
157
|
*/
|
|
149
158
|
get label () {
|
|
150
159
|
return this[_attrs].label
|
|
151
160
|
}
|
|
152
161
|
|
|
153
162
|
/**
|
|
154
|
-
*
|
|
163
|
+
* Study Instance UID of DICOM Parametric Map instances.
|
|
155
164
|
*
|
|
156
|
-
* @
|
|
165
|
+
* @type string
|
|
157
166
|
*/
|
|
158
167
|
get studyInstanceUID () {
|
|
159
168
|
return this[_attrs].studyInstanceUID
|
|
160
169
|
}
|
|
161
170
|
|
|
162
171
|
/**
|
|
163
|
-
*
|
|
172
|
+
* Series Instance UID of DICOM Parametric Map instances.
|
|
164
173
|
*
|
|
165
|
-
* @
|
|
174
|
+
* @type string
|
|
166
175
|
*/
|
|
167
176
|
get seriesInstanceUID () {
|
|
168
177
|
return this[_attrs].seriesInstanceUID
|
|
169
178
|
}
|
|
170
179
|
|
|
171
180
|
/**
|
|
172
|
-
*
|
|
181
|
+
* SOP Instance UIDs of DICOM Parametric Map instances.
|
|
173
182
|
*
|
|
174
|
-
* @
|
|
183
|
+
* @type string[]
|
|
175
184
|
*/
|
|
176
185
|
get sopInstanceUIDs () {
|
|
177
186
|
return this[_attrs].sopInstanceUIDs
|
|
178
187
|
}
|
|
179
188
|
|
|
180
189
|
/**
|
|
181
|
-
*
|
|
190
|
+
* Palette Color Lookup Table UID.
|
|
182
191
|
*
|
|
183
|
-
* @
|
|
192
|
+
* @type string
|
|
184
193
|
*/
|
|
185
194
|
get paletteColorLookupTableUID () {
|
|
186
195
|
return this[_attrs].paletteColorLookupTableUID
|
package/src/metadata.js
CHANGED
|
@@ -263,7 +263,7 @@ function getFrameMapping (metadata) {
|
|
|
263
263
|
* Bulkdata elements will be extracted and returned as a separate mapping.
|
|
264
264
|
*
|
|
265
265
|
* @param {Object} metadata - Metadata structured according to the DICOM JSON model
|
|
266
|
-
*
|
|
266
|
+
*
|
|
267
267
|
* @returns {Object} Formatted dataset and remaining bulkdata
|
|
268
268
|
*
|
|
269
269
|
* @memberof metadata
|
|
@@ -348,7 +348,8 @@ function formatMetadata (metadata) {
|
|
|
348
348
|
/**
|
|
349
349
|
* Group DICOM metadata of monochrome slides by Optical Path Identifier.
|
|
350
350
|
*
|
|
351
|
-
* @param {
|
|
351
|
+
* @param {metadata.VLWholeSlideMicroscopyImage[]} images - DICOM VL Whole
|
|
352
|
+
* Slide Microscopy Image instances.
|
|
352
353
|
*
|
|
353
354
|
* @returns {Object} Groups of DICOM VL Whole Slide Microscopy Image instances
|
|
354
355
|
* @memberof metadata
|
|
@@ -377,7 +378,8 @@ function groupMonochromeInstances (images) {
|
|
|
377
378
|
/**
|
|
378
379
|
* Group DICOM metadata of color images slides by Optical Path Identifier.
|
|
379
380
|
*
|
|
380
|
-
* @param {
|
|
381
|
+
* @param {metadata.VLWholeSlideMicroscopyImage[]} images - DICOM VL Whole
|
|
382
|
+
* Slide Microscopy Image instances.
|
|
381
383
|
*
|
|
382
384
|
* @returns {Object} Groups of DICOM VL Whole Slide Microscopy Image instances
|
|
383
385
|
* @memberof metadata
|
|
@@ -404,7 +406,18 @@ function groupColorInstances (images) {
|
|
|
404
406
|
return channels
|
|
405
407
|
}
|
|
406
408
|
|
|
409
|
+
/**
|
|
410
|
+
* DICOM Service Object Pair (SOP) Class.
|
|
411
|
+
*
|
|
412
|
+
* @class
|
|
413
|
+
* @abstract
|
|
414
|
+
* @memberof metadata
|
|
415
|
+
*/
|
|
407
416
|
class SOPClass {
|
|
417
|
+
/**
|
|
418
|
+
* @param {Object} options
|
|
419
|
+
* @param {Object} options.metadata - Metadata of a DICOM SOP instance in DICOM JSON format
|
|
420
|
+
*/
|
|
408
421
|
constructor ({ metadata }) {
|
|
409
422
|
if (metadata == null) {
|
|
410
423
|
throw new Error(
|
|
@@ -418,25 +431,38 @@ class SOPClass {
|
|
|
418
431
|
Object.freeze(this)
|
|
419
432
|
}
|
|
420
433
|
|
|
434
|
+
/**
|
|
435
|
+
* Get metadata of instance in DICOM JSON format.
|
|
436
|
+
*
|
|
437
|
+
* The metadata may include bulkdata references via "BulkDataURI".
|
|
438
|
+
*
|
|
439
|
+
* @returns {Object} metadata in DICOM JSON format
|
|
440
|
+
*/
|
|
421
441
|
get json () {
|
|
422
442
|
return this[_metadata]
|
|
423
443
|
}
|
|
424
444
|
|
|
445
|
+
/**
|
|
446
|
+
* Get references to bulkdata of instance in DICOM JSON format.
|
|
447
|
+
*
|
|
448
|
+
* @returns {Object} bulkdata references in DICOM JSON format
|
|
449
|
+
*/
|
|
425
450
|
get bulkdataReferences () {
|
|
426
451
|
return this[_bulkdataReferences]
|
|
427
452
|
}
|
|
428
453
|
}
|
|
429
454
|
|
|
430
|
-
/**
|
|
431
|
-
*
|
|
455
|
+
/**
|
|
456
|
+
* DICOM VL Whole Slide Microscopy Image instance.
|
|
432
457
|
*
|
|
433
458
|
* @class
|
|
459
|
+
* @extends metadata.SOPClass
|
|
434
460
|
* @memberof metadata
|
|
435
461
|
*/
|
|
436
462
|
class VLWholeSlideMicroscopyImage extends SOPClass {
|
|
437
463
|
/**
|
|
438
|
-
* @
|
|
439
|
-
* @
|
|
464
|
+
* @param {Object} options
|
|
465
|
+
* @param {Object} options.metadata - Metadata of a VL Whole Slide Microscopy Image in DICOM JSON format
|
|
440
466
|
*/
|
|
441
467
|
constructor ({ metadata }) {
|
|
442
468
|
super({ metadata })
|
|
@@ -449,15 +475,17 @@ class VLWholeSlideMicroscopyImage extends SOPClass {
|
|
|
449
475
|
}
|
|
450
476
|
}
|
|
451
477
|
|
|
452
|
-
/**
|
|
478
|
+
/**
|
|
479
|
+
* DICOM Comprehensive 3D SR instance.
|
|
453
480
|
*
|
|
454
481
|
* @class
|
|
482
|
+
* @extends metadata.SOPClass
|
|
455
483
|
* @memberof metadata
|
|
456
484
|
*/
|
|
457
485
|
class Comprehensive3DSR extends SOPClass {
|
|
458
486
|
/**
|
|
459
|
-
* @
|
|
460
|
-
* @
|
|
487
|
+
* @param {Object} options
|
|
488
|
+
* @param {Object} options.metadata - Metadata of DICOM Structured Report instance in DICOM JSON format
|
|
461
489
|
*/
|
|
462
490
|
constructor ({ metadata }) {
|
|
463
491
|
super({ metadata })
|
|
@@ -470,15 +498,17 @@ class Comprehensive3DSR extends SOPClass {
|
|
|
470
498
|
}
|
|
471
499
|
}
|
|
472
500
|
|
|
473
|
-
/**
|
|
501
|
+
/**
|
|
502
|
+
* DICOM Microscopy Bulk Simple Annotations instance.
|
|
474
503
|
*
|
|
475
504
|
* @class
|
|
505
|
+
* @extends metadata.SOPClass
|
|
476
506
|
* @memberof metadata
|
|
477
507
|
*/
|
|
478
508
|
class MicroscopyBulkSimpleAnnotations extends SOPClass {
|
|
479
509
|
/**
|
|
480
|
-
* @
|
|
481
|
-
* @
|
|
510
|
+
* @param {Object} options
|
|
511
|
+
* @param {Object} options.metadata - Metadata of a DICOM Microscopy Bulk Simple Annotations instance in DICOM JSON format
|
|
482
512
|
*/
|
|
483
513
|
constructor ({ metadata }) {
|
|
484
514
|
super({ metadata })
|
|
@@ -491,15 +521,17 @@ class MicroscopyBulkSimpleAnnotations extends SOPClass {
|
|
|
491
521
|
}
|
|
492
522
|
}
|
|
493
523
|
|
|
494
|
-
/**
|
|
524
|
+
/**
|
|
525
|
+
* DICOM Parametric Map instance.
|
|
495
526
|
*
|
|
496
527
|
* @class
|
|
528
|
+
* @extends metadata.SOPClass
|
|
497
529
|
* @memberof metadata
|
|
498
530
|
*/
|
|
499
531
|
class ParametricMap extends SOPClass {
|
|
500
532
|
/**
|
|
501
|
-
* @
|
|
502
|
-
* @
|
|
533
|
+
* @param {Object} options
|
|
534
|
+
* @param {Object} options.metadata - Metadata of a DICOM Parametric Map instance in DICOM JSON format
|
|
503
535
|
*/
|
|
504
536
|
constructor ({ metadata }) {
|
|
505
537
|
super({ metadata })
|
|
@@ -512,15 +544,17 @@ class ParametricMap extends SOPClass {
|
|
|
512
544
|
}
|
|
513
545
|
}
|
|
514
546
|
|
|
515
|
-
/**
|
|
547
|
+
/**
|
|
548
|
+
* DICOM Segmentation instance.
|
|
516
549
|
*
|
|
517
550
|
* @class
|
|
551
|
+
* @extends metadata.SOPClass
|
|
518
552
|
* @memberof metadata
|
|
519
553
|
*/
|
|
520
554
|
class Segmentation extends SOPClass {
|
|
521
555
|
/**
|
|
522
|
-
* @
|
|
523
|
-
* @
|
|
556
|
+
* @param {Object} options
|
|
557
|
+
* @param {Object} options.metadata - Metadata of a DICOM Segmentation instance in DICOM JSON format
|
|
524
558
|
*/
|
|
525
559
|
constructor ({ metadata }) {
|
|
526
560
|
super({ metadata })
|