dcmjs 0.51.0 → 0.51.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 +42 -32
- package/build/dcmjs.es.js.map +1 -1
- package/build/dcmjs.js +42 -32
- 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
|
@@ -14191,84 +14191,94 @@
|
|
|
14191
14191
|
return stream.ensureAvailable();
|
|
14192
14192
|
case 1:
|
|
14193
14193
|
if (!(stream.offset < untilOffset && stream.isAvailable(1, false))) {
|
|
14194
|
-
_context5.next =
|
|
14194
|
+
_context5.next = 15;
|
|
14195
14195
|
break;
|
|
14196
14196
|
}
|
|
14197
14197
|
readLog.debug("read loop", stream.offset, untilOffset);
|
|
14198
14198
|
// Consume before reading the tag so that data before the
|
|
14199
14199
|
// current tag can be cleared.
|
|
14200
14200
|
stream.consume();
|
|
14201
|
-
tagInfo = this.readTagHeader(options);
|
|
14201
|
+
tagInfo = this.readTagHeader(options); // Stop when the requested tag boundary is reached. readTagHeader()
|
|
14202
|
+
// has already consumed the 4-byte tag but nothing beyond it, so
|
|
14203
|
+
// stream.offset now points at the first byte after the tag (i.e.
|
|
14204
|
+
// the VR field for explicit-LE). Callers that need the start
|
|
14205
|
+
// offset of the tag itself should subtract 4 from stream.offset.
|
|
14206
|
+
if (!tagInfo.isUntilTag) {
|
|
14207
|
+
_context5.next = 2;
|
|
14208
|
+
break;
|
|
14209
|
+
}
|
|
14210
|
+
return _context5.abrupt("continue", 15);
|
|
14211
|
+
case 2:
|
|
14202
14212
|
tag = tagInfo.tag, tagObj = tagInfo.tagObj, length = tagInfo.length;
|
|
14203
14213
|
if (!(tag === TagHex.ItemDelimitationEnd)) {
|
|
14204
|
-
_context5.next =
|
|
14214
|
+
_context5.next = 3;
|
|
14205
14215
|
break;
|
|
14206
14216
|
}
|
|
14207
14217
|
return _context5.abrupt("return", listener.pop());
|
|
14208
|
-
case
|
|
14218
|
+
case 3:
|
|
14209
14219
|
if (!tagObj.isInstruction()) {
|
|
14210
|
-
_context5.next =
|
|
14220
|
+
_context5.next = 4;
|
|
14211
14221
|
break;
|
|
14212
14222
|
}
|
|
14213
14223
|
return _context5.abrupt("continue", 1);
|
|
14214
|
-
case
|
|
14224
|
+
case 4:
|
|
14215
14225
|
if (!(tagObj.group() === 0 || tag === TagHex.DataSetTrailingPadding)) {
|
|
14216
|
-
_context5.next =
|
|
14226
|
+
_context5.next = 5;
|
|
14217
14227
|
break;
|
|
14218
14228
|
}
|
|
14219
14229
|
// Group length
|
|
14220
14230
|
stream.increment(tagObj.length);
|
|
14221
14231
|
return _context5.abrupt("continue", 1);
|
|
14222
|
-
case
|
|
14232
|
+
case 5:
|
|
14223
14233
|
addTagResult = listener.addTag(tag, tagInfo);
|
|
14224
14234
|
if (!this.isSequence(tagInfo)) {
|
|
14225
|
-
_context5.next =
|
|
14235
|
+
_context5.next = 7;
|
|
14226
14236
|
break;
|
|
14227
14237
|
}
|
|
14228
|
-
_context5.next =
|
|
14238
|
+
_context5.next = 6;
|
|
14229
14239
|
return this.readSequence(listener, tagInfo, options);
|
|
14230
|
-
case 5:
|
|
14231
|
-
_context5.next = 12;
|
|
14232
|
-
break;
|
|
14233
14240
|
case 6:
|
|
14241
|
+
_context5.next = 13;
|
|
14242
|
+
break;
|
|
14243
|
+
case 7:
|
|
14234
14244
|
if (!tagObj.isPixelDataTag()) {
|
|
14235
|
-
_context5.next =
|
|
14245
|
+
_context5.next = 9;
|
|
14236
14246
|
break;
|
|
14237
14247
|
}
|
|
14238
|
-
_context5.next =
|
|
14248
|
+
_context5.next = 8;
|
|
14239
14249
|
return this.readPixelData(tagInfo);
|
|
14240
|
-
case 7:
|
|
14241
|
-
_context5.next = 12;
|
|
14242
|
-
break;
|
|
14243
14250
|
case 8:
|
|
14251
|
+
_context5.next = 13;
|
|
14252
|
+
break;
|
|
14253
|
+
case 9:
|
|
14244
14254
|
if (!(length === UNDEFINED_LENGTH_FIX)) {
|
|
14245
|
-
_context5.next =
|
|
14255
|
+
_context5.next = 10;
|
|
14246
14256
|
break;
|
|
14247
14257
|
}
|
|
14248
14258
|
throw new Error("Can't handle tag ".concat(tagInfo.tag, " with -1 length and not sequence"));
|
|
14249
|
-
case
|
|
14259
|
+
case 10:
|
|
14250
14260
|
if (!((addTagResult === null || addTagResult === void 0 ? void 0 : addTagResult.expectsRaw) === true && length > 0)) {
|
|
14251
|
-
_context5.next =
|
|
14261
|
+
_context5.next = 12;
|
|
14252
14262
|
break;
|
|
14253
14263
|
}
|
|
14254
|
-
_context5.next =
|
|
14264
|
+
_context5.next = 11;
|
|
14255
14265
|
return this.readRawBinary(tagInfo);
|
|
14256
|
-
case 10:
|
|
14257
|
-
_context5.next = 12;
|
|
14258
|
-
break;
|
|
14259
14266
|
case 11:
|
|
14260
|
-
_context5.next =
|
|
14261
|
-
|
|
14267
|
+
_context5.next = 13;
|
|
14268
|
+
break;
|
|
14262
14269
|
case 12:
|
|
14263
|
-
listener.pop();
|
|
14264
14270
|
_context5.next = 13;
|
|
14265
|
-
return this.
|
|
14271
|
+
return this.readSingle(tagInfo, listener, options);
|
|
14266
14272
|
case 13:
|
|
14273
|
+
listener.pop();
|
|
14274
|
+
_context5.next = 14;
|
|
14275
|
+
return this.stream.ensureAvailable();
|
|
14276
|
+
case 14:
|
|
14267
14277
|
_context5.next = 1;
|
|
14268
14278
|
break;
|
|
14269
|
-
case 14:
|
|
14270
|
-
return _context5.abrupt("return", listener.pop());
|
|
14271
14279
|
case 15:
|
|
14280
|
+
return _context5.abrupt("return", listener.pop());
|
|
14281
|
+
case 16:
|
|
14272
14282
|
case "end":
|
|
14273
14283
|
return _context5.stop();
|
|
14274
14284
|
}
|
|
@@ -14771,7 +14781,7 @@
|
|
|
14771
14781
|
tagObj: tagObj,
|
|
14772
14782
|
vr: 0,
|
|
14773
14783
|
values: 0,
|
|
14774
|
-
|
|
14784
|
+
isUntilTag: true
|
|
14775
14785
|
};
|
|
14776
14786
|
}
|
|
14777
14787
|
}
|