dcmjs 0.50.0 → 0.50.1
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 +20 -12
- package/build/dcmjs.es.js.map +1 -1
- package/build/dcmjs.js +20 -12
- 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.js
CHANGED
|
@@ -14264,7 +14264,7 @@
|
|
|
14264
14264
|
key: "readSequence",
|
|
14265
14265
|
value: function () {
|
|
14266
14266
|
var _readSequence = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(listener, sqTagInfo, options) {
|
|
14267
|
-
var length, stream, syntax, endOffset, tagInfo, tag;
|
|
14267
|
+
var length, stream, syntax, endOffset, tagInfo, tag, itemLength, itemUntilOffset;
|
|
14268
14268
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
14269
14269
|
while (1) switch (_context6.prev = _context6.next) {
|
|
14270
14270
|
case 0:
|
|
@@ -14283,37 +14283,45 @@
|
|
|
14283
14283
|
_context6.t0 = _context6.sent;
|
|
14284
14284
|
case 8:
|
|
14285
14285
|
if (!_context6.t0) {
|
|
14286
|
-
_context6.next =
|
|
14286
|
+
_context6.next = 28;
|
|
14287
14287
|
break;
|
|
14288
14288
|
}
|
|
14289
14289
|
readLog.debug("readSequence loop", stream.offset, endOffset);
|
|
14290
14290
|
tagInfo = this.readTagHeader(syntax, options);
|
|
14291
14291
|
tag = tagInfo.tag;
|
|
14292
14292
|
if (!(tag === TagHex.Item)) {
|
|
14293
|
-
_context6.next =
|
|
14293
|
+
_context6.next = 20;
|
|
14294
14294
|
break;
|
|
14295
14295
|
}
|
|
14296
14296
|
listener.startObject();
|
|
14297
|
-
|
|
14297
|
+
// For defined-length items, use the item's own end offset
|
|
14298
|
+
// so read() stops at the item boundary and returns control
|
|
14299
|
+
// to readSequence for the next item. Without this, all
|
|
14300
|
+
// items in a defined-length sequence get merged into the
|
|
14301
|
+
// first item because read() treats subsequent Item tags
|
|
14302
|
+
// as instructions and skips them.
|
|
14303
|
+
itemLength = tagInfo.length;
|
|
14304
|
+
itemUntilOffset = itemLength === UNDEFINED_LENGTH_FIX ? endOffset : Math.min(stream.offset + itemLength, endOffset);
|
|
14305
|
+
_context6.next = 18;
|
|
14298
14306
|
return this.read(listener, _objectSpread2(_objectSpread2({}, options), {}, {
|
|
14299
|
-
untilOffset:
|
|
14307
|
+
untilOffset: itemUntilOffset
|
|
14300
14308
|
}));
|
|
14301
|
-
case 16:
|
|
14302
|
-
_context6.next = 24;
|
|
14303
|
-
break;
|
|
14304
14309
|
case 18:
|
|
14310
|
+
_context6.next = 26;
|
|
14311
|
+
break;
|
|
14312
|
+
case 20:
|
|
14305
14313
|
if (!(tag === TagHex.SequenceDelimitationEnd)) {
|
|
14306
|
-
_context6.next =
|
|
14314
|
+
_context6.next = 24;
|
|
14307
14315
|
break;
|
|
14308
14316
|
}
|
|
14309
14317
|
return _context6.abrupt("return");
|
|
14310
|
-
case
|
|
14318
|
+
case 24:
|
|
14311
14319
|
console.warn("Unknown tag info", length, tagInfo);
|
|
14312
14320
|
throw new Error();
|
|
14313
|
-
case
|
|
14321
|
+
case 26:
|
|
14314
14322
|
_context6.next = 3;
|
|
14315
14323
|
break;
|
|
14316
|
-
case
|
|
14324
|
+
case 28:
|
|
14317
14325
|
case "end":
|
|
14318
14326
|
return _context6.stop();
|
|
14319
14327
|
}
|