dcmjs 0.50.0 → 0.50.2
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/build/dcmjs.es.js +25 -17
- package/build/dcmjs.es.js.map +1 -1
- package/build/dcmjs.js +25 -17
- package/build/dcmjs.js.map +1 -1
- package/build/dcmjs.min.js +1 -1
- package/build/dcmjs.min.js.map +1 -1
- package/package.json +1 -1
package/build/dcmjs.es.js
CHANGED
|
@@ -14258,7 +14258,7 @@ var AsyncDicomReader = /*#__PURE__*/function () {
|
|
|
14258
14258
|
key: "readSequence",
|
|
14259
14259
|
value: function () {
|
|
14260
14260
|
var _readSequence = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(listener, sqTagInfo, options) {
|
|
14261
|
-
var length, stream, syntax, endOffset, tagInfo, tag;
|
|
14261
|
+
var length, stream, syntax, endOffset, tagInfo, tag, itemLength, itemUntilOffset;
|
|
14262
14262
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
14263
14263
|
while (1) switch (_context6.prev = _context6.next) {
|
|
14264
14264
|
case 0:
|
|
@@ -14277,37 +14277,45 @@ var AsyncDicomReader = /*#__PURE__*/function () {
|
|
|
14277
14277
|
_context6.t0 = _context6.sent;
|
|
14278
14278
|
case 8:
|
|
14279
14279
|
if (!_context6.t0) {
|
|
14280
|
-
_context6.next =
|
|
14280
|
+
_context6.next = 28;
|
|
14281
14281
|
break;
|
|
14282
14282
|
}
|
|
14283
14283
|
readLog.debug("readSequence loop", stream.offset, endOffset);
|
|
14284
14284
|
tagInfo = this.readTagHeader(syntax, options);
|
|
14285
14285
|
tag = tagInfo.tag;
|
|
14286
14286
|
if (!(tag === TagHex.Item)) {
|
|
14287
|
-
_context6.next =
|
|
14287
|
+
_context6.next = 20;
|
|
14288
14288
|
break;
|
|
14289
14289
|
}
|
|
14290
14290
|
listener.startObject();
|
|
14291
|
-
|
|
14291
|
+
// For defined-length items, use the item's own end offset
|
|
14292
|
+
// so read() stops at the item boundary and returns control
|
|
14293
|
+
// to readSequence for the next item. Without this, all
|
|
14294
|
+
// items in a defined-length sequence get merged into the
|
|
14295
|
+
// first item because read() treats subsequent Item tags
|
|
14296
|
+
// as instructions and skips them.
|
|
14297
|
+
itemLength = tagInfo.length;
|
|
14298
|
+
itemUntilOffset = itemLength === UNDEFINED_LENGTH_FIX ? endOffset : Math.min(stream.offset + itemLength, endOffset);
|
|
14299
|
+
_context6.next = 18;
|
|
14292
14300
|
return this.read(listener, _objectSpread2(_objectSpread2({}, options), {}, {
|
|
14293
|
-
untilOffset:
|
|
14301
|
+
untilOffset: itemUntilOffset
|
|
14294
14302
|
}));
|
|
14295
|
-
case 16:
|
|
14296
|
-
_context6.next = 24;
|
|
14297
|
-
break;
|
|
14298
14303
|
case 18:
|
|
14304
|
+
_context6.next = 26;
|
|
14305
|
+
break;
|
|
14306
|
+
case 20:
|
|
14299
14307
|
if (!(tag === TagHex.SequenceDelimitationEnd)) {
|
|
14300
|
-
_context6.next =
|
|
14308
|
+
_context6.next = 24;
|
|
14301
14309
|
break;
|
|
14302
14310
|
}
|
|
14303
14311
|
return _context6.abrupt("return");
|
|
14304
|
-
case
|
|
14312
|
+
case 24:
|
|
14305
14313
|
console.warn("Unknown tag info", length, tagInfo);
|
|
14306
14314
|
throw new Error();
|
|
14307
|
-
case
|
|
14315
|
+
case 26:
|
|
14308
14316
|
_context6.next = 3;
|
|
14309
14317
|
break;
|
|
14310
|
-
case
|
|
14318
|
+
case 28:
|
|
14311
14319
|
case "end":
|
|
14312
14320
|
return _context6.stop();
|
|
14313
14321
|
}
|
|
@@ -26648,7 +26656,7 @@ var NormalRangeProperties = /*#__PURE__*/function (_Template4) {
|
|
|
26648
26656
|
function NormalRangeProperties(options) {
|
|
26649
26657
|
var _this6;
|
|
26650
26658
|
_classCallCheck(this, NormalRangeProperties);
|
|
26651
|
-
_this6 = _callSuper(this, NormalRangeProperties
|
|
26659
|
+
_this6 = _callSuper(this, NormalRangeProperties);
|
|
26652
26660
|
if (options.values === undefined) {
|
|
26653
26661
|
throw new Error("Option 'values' is required for NormalRangeProperties.");
|
|
26654
26662
|
}
|
|
@@ -27074,7 +27082,7 @@ var SubjectContextDevice = /*#__PURE__*/function (_Template10) {
|
|
|
27074
27082
|
function SubjectContextDevice(options) {
|
|
27075
27083
|
var _this17;
|
|
27076
27084
|
_classCallCheck(this, SubjectContextDevice);
|
|
27077
|
-
_this17 = _callSuper(this, SubjectContextDevice
|
|
27085
|
+
_this17 = _callSuper(this, SubjectContextDevice);
|
|
27078
27086
|
if (options.name === undefined) {
|
|
27079
27087
|
throw new Error("Option 'name' is required for SubjectContextDevice.");
|
|
27080
27088
|
}
|
|
@@ -27374,7 +27382,7 @@ var MeasurementsDerivedFromMultipleROIMeasurements = /*#__PURE__*/function (_Tem
|
|
|
27374
27382
|
function MeasurementsDerivedFromMultipleROIMeasurements(options) {
|
|
27375
27383
|
var _this21;
|
|
27376
27384
|
_classCallCheck(this, MeasurementsDerivedFromMultipleROIMeasurements);
|
|
27377
|
-
_this21 = _callSuper(this, MeasurementsDerivedFromMultipleROIMeasurements
|
|
27385
|
+
_this21 = _callSuper(this, MeasurementsDerivedFromMultipleROIMeasurements);
|
|
27378
27386
|
if (options.derivation === undefined) {
|
|
27379
27387
|
throw new Error("Option 'derivation' is required for " + "MeasurementsDerivedFromMultipleROIMeasurements.");
|
|
27380
27388
|
}
|
|
@@ -27574,7 +27582,7 @@ var TimePointContext = /*#__PURE__*/function (_Template16) {
|
|
|
27574
27582
|
function TimePointContext(options) {
|
|
27575
27583
|
var _this24;
|
|
27576
27584
|
_classCallCheck(this, TimePointContext);
|
|
27577
|
-
_this24 = _callSuper(this, TimePointContext
|
|
27585
|
+
_this24 = _callSuper(this, TimePointContext);
|
|
27578
27586
|
if (options.timePoint === undefined) {
|
|
27579
27587
|
throw new Error("Option 'timePoint' is required for TimePointContext.");
|
|
27580
27588
|
}
|
|
@@ -27730,7 +27738,7 @@ var TrackingIdentifier = /*#__PURE__*/function (_Template19) {
|
|
|
27730
27738
|
function TrackingIdentifier(options) {
|
|
27731
27739
|
var _this27;
|
|
27732
27740
|
_classCallCheck(this, TrackingIdentifier);
|
|
27733
|
-
_this27 = _callSuper(this, TrackingIdentifier
|
|
27741
|
+
_this27 = _callSuper(this, TrackingIdentifier);
|
|
27734
27742
|
if (options.uid === undefined) {
|
|
27735
27743
|
throw new Error("Option 'uid' is required for TrackingIdentifier.");
|
|
27736
27744
|
}
|