dicom-microscopy-viewer 0.36.3 → 0.36.4
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/dist/dicom-microscopy-viewer.js +1 -1
- 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 +1 -1
- 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 +148 -131
package/src/segment.js
CHANGED
|
@@ -3,25 +3,29 @@ const _attrs = Symbol('attrs')
|
|
|
3
3
|
/**
|
|
4
4
|
* A segment.
|
|
5
5
|
*
|
|
6
|
+
* Describes an item of the Segment Sequence of a DICOM Segmentation instance.
|
|
7
|
+
*
|
|
6
8
|
* @class
|
|
7
9
|
* @memberof segment
|
|
8
10
|
*/
|
|
9
11
|
class Segment {
|
|
10
12
|
/**
|
|
11
|
-
* Create a new Segment object.
|
|
12
|
-
*
|
|
13
13
|
* @param {Object} options - Options for construction of Segment
|
|
14
14
|
* @param {string} options.uid - Unique tracking identifier
|
|
15
15
|
* @param {number} options.number - Segment Number (one-based index value)
|
|
16
16
|
* @param {string} options.label - Segment Label
|
|
17
17
|
* @param {string} options.algorithmName - Segment Algorithm Name
|
|
18
|
-
* @param {
|
|
19
|
-
* @param {
|
|
20
|
-
* @param {
|
|
21
|
-
* @param {string} options.studyInstanceUID - Study Instance UID of
|
|
22
|
-
*
|
|
23
|
-
* @param {string
|
|
24
|
-
*
|
|
18
|
+
* @param {Object} options.algorithmType - Segment Algorithm Type
|
|
19
|
+
* @param {Object} options.propertyCategory - Segmented Property Category Code
|
|
20
|
+
* @param {Object} options.propertyType - Segmented Property Type Code
|
|
21
|
+
* @param {string} options.studyInstanceUID - Study Instance UID of DICOM
|
|
22
|
+
* Segmentation instances
|
|
23
|
+
* @param {string} options.seriesInstanceUID - Series Instance UID of DICOM
|
|
24
|
+
* Segmentation instances
|
|
25
|
+
* @param {string[]} options.sopInstanceUIDs - SOP Instance UIDs of DICOM
|
|
26
|
+
* Segmentation instances
|
|
27
|
+
* @param {string|undefined} options.paletteColorLookupTableUID - Palette
|
|
28
|
+
* Color Lookup Table UID
|
|
25
29
|
*/
|
|
26
30
|
constructor ({
|
|
27
31
|
uid,
|
|
@@ -94,99 +98,99 @@ class Segment {
|
|
|
94
98
|
}
|
|
95
99
|
|
|
96
100
|
/**
|
|
97
|
-
*
|
|
101
|
+
* Unique Tracking Identifier
|
|
98
102
|
*
|
|
99
|
-
* @
|
|
103
|
+
* @type string
|
|
100
104
|
*/
|
|
101
105
|
get uid () {
|
|
102
106
|
return this[_attrs].uid
|
|
103
107
|
}
|
|
104
108
|
|
|
105
109
|
/**
|
|
106
|
-
*
|
|
110
|
+
* Segment Number.
|
|
107
111
|
*
|
|
108
|
-
* @
|
|
112
|
+
* @type number
|
|
109
113
|
*/
|
|
110
114
|
get number () {
|
|
111
115
|
return this[_attrs].number
|
|
112
116
|
}
|
|
113
117
|
|
|
114
118
|
/**
|
|
115
|
-
*
|
|
119
|
+
* Segment Label
|
|
116
120
|
*
|
|
117
|
-
* @
|
|
121
|
+
* @type string
|
|
118
122
|
*/
|
|
119
123
|
get label () {
|
|
120
124
|
return this[_attrs].label
|
|
121
125
|
}
|
|
122
126
|
|
|
123
127
|
/**
|
|
124
|
-
*
|
|
128
|
+
* Segment Algorithm Name
|
|
125
129
|
*
|
|
126
|
-
* @
|
|
130
|
+
* @type string
|
|
127
131
|
*/
|
|
128
132
|
get algorithmName () {
|
|
129
133
|
return this[_attrs].algorithmName
|
|
130
134
|
}
|
|
131
135
|
|
|
132
136
|
/**
|
|
133
|
-
*
|
|
137
|
+
* Segment Algorithm Type
|
|
134
138
|
*
|
|
135
|
-
* @
|
|
139
|
+
* @type object
|
|
136
140
|
*/
|
|
137
141
|
get algorithmType () {
|
|
138
142
|
return this[_attrs].algorithmType
|
|
139
143
|
}
|
|
140
144
|
|
|
141
145
|
/**
|
|
142
|
-
*
|
|
146
|
+
* Segmented Property Category Code
|
|
143
147
|
*
|
|
144
|
-
* @
|
|
148
|
+
* @type object
|
|
145
149
|
*/
|
|
146
150
|
get propertyCategory () {
|
|
147
151
|
return this[_attrs].propertyCategory
|
|
148
152
|
}
|
|
149
153
|
|
|
150
154
|
/**
|
|
151
|
-
*
|
|
155
|
+
* Segmented Property Type Code
|
|
152
156
|
*
|
|
153
|
-
* @
|
|
157
|
+
* @type object
|
|
154
158
|
*/
|
|
155
159
|
get propertyType () {
|
|
156
160
|
return this[_attrs].propertyType
|
|
157
161
|
}
|
|
158
162
|
|
|
159
163
|
/**
|
|
160
|
-
*
|
|
164
|
+
* Study Instance UID of DICOM Segmentation instances.
|
|
161
165
|
*
|
|
162
|
-
* @
|
|
166
|
+
* @type string
|
|
163
167
|
*/
|
|
164
168
|
get studyInstanceUID () {
|
|
165
169
|
return this[_attrs].studyInstanceUID
|
|
166
170
|
}
|
|
167
171
|
|
|
168
172
|
/**
|
|
169
|
-
*
|
|
173
|
+
* Series Instance UID of DICOM Segmentation instances.
|
|
170
174
|
*
|
|
171
|
-
* @
|
|
175
|
+
* @type string
|
|
172
176
|
*/
|
|
173
177
|
get seriesInstanceUID () {
|
|
174
178
|
return this[_attrs].seriesInstanceUID
|
|
175
179
|
}
|
|
176
180
|
|
|
177
181
|
/**
|
|
178
|
-
*
|
|
182
|
+
* SOP Instance UIDs of DICOM Segmentation instances.
|
|
179
183
|
*
|
|
180
|
-
* @
|
|
184
|
+
* @type string[]
|
|
181
185
|
*/
|
|
182
186
|
get sopInstanceUIDs () {
|
|
183
187
|
return this[_attrs].sopInstanceUIDs
|
|
184
188
|
}
|
|
185
189
|
|
|
186
190
|
/**
|
|
187
|
-
*
|
|
191
|
+
* Palette Color Lookup Table UID.
|
|
188
192
|
*
|
|
189
|
-
* @
|
|
193
|
+
* @type string
|
|
190
194
|
*/
|
|
191
195
|
get paletteColorLookupTableUID () {
|
|
192
196
|
return this[_attrs].paletteColorLookupTableUID
|
package/src/utils.js
CHANGED
|
@@ -185,8 +185,8 @@ function buildTransform ({ offset, orientation, spacing }) {
|
|
|
185
185
|
* matrix to map it into the slide coordinate system.
|
|
186
186
|
*
|
|
187
187
|
* @param {Object} options - Options
|
|
188
|
-
* @
|
|
189
|
-
* @
|
|
188
|
+
* @param {number[]} options.coordinate - (column, row) image coordinate
|
|
189
|
+
* @param {number[][]} options.affine - 3x3 affine transformation matrix
|
|
190
190
|
*
|
|
191
191
|
* @returns {number[]} (x, y) reference coordinate
|
|
192
192
|
*
|
|
@@ -292,8 +292,8 @@ function buildInverseTransform ({ offset, orientation, spacing }) {
|
|
|
292
292
|
* coordinate system to map it into the total pixel matrix.
|
|
293
293
|
*
|
|
294
294
|
* @param {Object} options - Options
|
|
295
|
-
* @
|
|
296
|
-
* @
|
|
295
|
+
* @param {number[]} options.coordinate - (x, y) reference coordinate
|
|
296
|
+
* @param {number[][]} options.affine - 3x3 affine transformation matrix
|
|
297
297
|
*
|
|
298
298
|
* @returns {number[]} (column, row) image coordinate
|
|
299
299
|
*
|