@dcmjs-org/dcmjs 1.0.0-beta.21 → 1.0.0-beta.22
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.cjs +1 -1
- package/build/dcmjs.es.js +1 -1
- package/build/dcmjs.js +37 -18
- package/build/dcmjs.js.map +1 -1
- package/build/dcmjs.min.js +1 -1
- package/build/dcmjs.min.js.map +1 -1
- package/build/{dcmjs.shared-CMo1hh3U.js → dcmjs.shared-DVqSe8G1.js} +38 -19
- package/build/dcmjs.shared-DVqSe8G1.js.map +1 -0
- package/build/{dcmjs.shared-C_SwQ4fu.cjs → dcmjs.shared-Dkebpbbj.cjs} +38 -19
- package/build/dcmjs.shared-Dkebpbbj.cjs.map +1 -0
- package/build/eventStream.cjs +1 -1
- package/build/eventStream.es.js +1 -1
- package/package.json +7 -7
- package/build/dcmjs.shared-CMo1hh3U.js.map +0 -1
- package/build/dcmjs.shared-C_SwQ4fu.cjs.map +0 -1
|
@@ -3568,6 +3568,22 @@ var ImageNormalizer = /*#__PURE__*/function (_Normalizer) {
|
|
|
3568
3568
|
DimensionDescriptionLabel: "ImagePositionPatient"
|
|
3569
3569
|
}];
|
|
3570
3570
|
}
|
|
3571
|
+
|
|
3572
|
+
/**
|
|
3573
|
+
* Fills in the functional groups of a multiframe dataset.
|
|
3574
|
+
*
|
|
3575
|
+
* A missing or empty SharedFunctionalGroupsSequence is built from the
|
|
3576
|
+
* top-level image plane attributes; a one-item array is used as its item.
|
|
3577
|
+
* The shared item gets the list accessors (addAccessors), so both
|
|
3578
|
+
* `SharedFunctionalGroupsSequence.X` and `SharedFunctionalGroupsSequence[0].X`
|
|
3579
|
+
* work.
|
|
3580
|
+
* The PerFrameFunctionalGroupsSequence is filled up to the declared
|
|
3581
|
+
* NumberOfFrames with items at the top-level position, existing items keep
|
|
3582
|
+
* their content, and each item without a FrameContentSequence gets one.
|
|
3583
|
+
* Added items share the position but get increasing InStackPositionNumber.
|
|
3584
|
+
* Items beyond NumberOfFrames are kept unchanged; a null item there is
|
|
3585
|
+
* skipped and does not throw.
|
|
3586
|
+
*/
|
|
3571
3587
|
}, {
|
|
3572
3588
|
key: "normalizeMultiframe",
|
|
3573
3589
|
value: function normalizeMultiframe() {
|
|
@@ -3591,6 +3607,10 @@ var ImageNormalizer = /*#__PURE__*/function (_Normalizer) {
|
|
|
3591
3607
|
if (!ds.PresentationLUTShape) {
|
|
3592
3608
|
ds.PresentationLUTShape = "IDENTITY";
|
|
3593
3609
|
}
|
|
3610
|
+
if (Array.isArray(ds.SharedFunctionalGroupsSequence)) {
|
|
3611
|
+
// The shared group has one item; an empty array counts as missing
|
|
3612
|
+
ds.SharedFunctionalGroupsSequence = ds.SharedFunctionalGroupsSequence[0];
|
|
3613
|
+
}
|
|
3594
3614
|
if (!ds.SharedFunctionalGroupsSequence) {
|
|
3595
3615
|
log.warn("Missing SharedFunctionalGroupsSequence; using the top-level image plane attributes");
|
|
3596
3616
|
ds.SharedFunctionalGroupsSequence = ImageNormalizer.sharedImagePlaneGroups(ds, {
|
|
@@ -3598,6 +3618,7 @@ var ImageNormalizer = /*#__PURE__*/function (_Normalizer) {
|
|
|
3598
3618
|
SpacingBetweenSlices: ds.SpacingBetweenSlices
|
|
3599
3619
|
});
|
|
3600
3620
|
}
|
|
3621
|
+
ds.SharedFunctionalGroupsSequence = addAccessors(ds.SharedFunctionalGroupsSequence);
|
|
3601
3622
|
|
|
3602
3623
|
// TODO: special case!
|
|
3603
3624
|
if (ds.BodyPartExamined === "PROSTATE") {
|
|
@@ -3617,23 +3638,20 @@ var ImageNormalizer = /*#__PURE__*/function (_Normalizer) {
|
|
|
3617
3638
|
RescaleSlope: rescaleSlope,
|
|
3618
3639
|
RescaleType: "US"
|
|
3619
3640
|
};
|
|
3620
|
-
var frameCount = this.datasets.length;
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
ds.PerFrameFunctionalGroupsSequence
|
|
3625
|
-
length: frameCount
|
|
3626
|
-
}, function () {
|
|
3627
|
-
return ImageNormalizer.planePositionGroup(ds);
|
|
3628
|
-
});
|
|
3629
|
-
} else if (!Array.isArray(ds.PerFrameFunctionalGroupsSequence)) {
|
|
3630
|
-
ds.PerFrameFunctionalGroupsSequence = [ds.PerFrameFunctionalGroupsSequence];
|
|
3641
|
+
var frameCount = Math.max(this.datasets.length, Number(ds.NumberOfFrames) || 0);
|
|
3642
|
+
var perFrame = ds.PerFrameFunctionalGroupsSequence || [];
|
|
3643
|
+
ds.PerFrameFunctionalGroupsSequence = Array.isArray(perFrame) ? perFrame : [perFrame];
|
|
3644
|
+
while (ds.PerFrameFunctionalGroupsSequence.length < frameCount) {
|
|
3645
|
+
ds.PerFrameFunctionalGroupsSequence.push(ImageNormalizer.planePositionGroup(ds));
|
|
3631
3646
|
}
|
|
3632
3647
|
for (var frameNumber = 1; frameNumber <= frameCount; frameNumber++) {
|
|
3633
3648
|
var _ds$PerFrameFunctiona, _ref;
|
|
3649
|
+
var item = (_ds$PerFrameFunctiona = ds.PerFrameFunctionalGroupsSequence)[_ref = frameNumber - 1] || (_ds$PerFrameFunctiona[_ref] = {});
|
|
3650
|
+
if (item.FrameContentSequence) {
|
|
3651
|
+
continue;
|
|
3652
|
+
}
|
|
3634
3653
|
var dataset = this.datasets[frameNumber - 1] || {};
|
|
3635
|
-
|
|
3636
|
-
ds.PerFrameFunctionalGroupsSequence[frameNumber - 1].FrameContentSequence = {
|
|
3654
|
+
item.FrameContentSequence = {
|
|
3637
3655
|
FrameAcquisitionDuration: 0,
|
|
3638
3656
|
StackID: 1,
|
|
3639
3657
|
InStackPositionNumber: frameNumber,
|
|
@@ -3641,9 +3659,8 @@ var ImageNormalizer = /*#__PURE__*/function (_Normalizer) {
|
|
|
3641
3659
|
};
|
|
3642
3660
|
var frameTime = dataset.AcquisitionDate + dataset.AcquisitionTime;
|
|
3643
3661
|
if (!isNaN(frameTime)) {
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
frameContentSequence.FrameReferenceDateTime = frameTime;
|
|
3662
|
+
item.FrameContentSequence.FrameAcquisitionDateTime = frameTime;
|
|
3663
|
+
item.FrameContentSequence.FrameReferenceDateTime = frameTime;
|
|
3647
3664
|
}
|
|
3648
3665
|
}
|
|
3649
3666
|
|
|
@@ -3671,7 +3688,7 @@ var ImageNormalizer = /*#__PURE__*/function (_Normalizer) {
|
|
|
3671
3688
|
count: 0
|
|
3672
3689
|
};
|
|
3673
3690
|
ds.PerFrameFunctionalGroupsSequence.forEach(function (functionalGroup) {
|
|
3674
|
-
if (functionalGroup.FrameVOILUT) {
|
|
3691
|
+
if (functionalGroup !== null && functionalGroup !== void 0 && functionalGroup.FrameVOILUT) {
|
|
3675
3692
|
var wc = functionalGroup.FrameVOILUTSequence.WindowCenter;
|
|
3676
3693
|
var ww = functionalGroup.FrameVOILUTSequence.WindowWidth;
|
|
3677
3694
|
if (functionalGroup.FrameVOILUTSequence && wc && ww) {
|
|
@@ -3745,9 +3762,11 @@ var ImageNormalizer = /*#__PURE__*/function (_Normalizer) {
|
|
|
3745
3762
|
}, {
|
|
3746
3763
|
key: "planePositionGroup",
|
|
3747
3764
|
value: function planePositionGroup(dataset) {
|
|
3765
|
+
var position = dataset.ImagePositionPatient;
|
|
3748
3766
|
return {
|
|
3749
3767
|
PlanePositionSequence: {
|
|
3750
|
-
|
|
3768
|
+
// A copy, so that no two frames share one array
|
|
3769
|
+
ImagePositionPatient: Array.isArray(position) ? position.slice() : position
|
|
3751
3770
|
}
|
|
3752
3771
|
};
|
|
3753
3772
|
}
|
|
@@ -16045,4 +16064,4 @@ ValueRepresentation.setTagClass(Tag);
|
|
|
16045
16064
|
// entries (src/eventStream.js, ...): the default entry is the 0.52 surface.
|
|
16046
16065
|
|
|
16047
16066
|
export { DICOMWEB as D, _inherits as _, _createClass as a, _objectSpread2 as b, _classCallCheck as c, _callSuper as d, _createForOfIteratorHelper as e, datasetToDict as f, _typeof as g, _asyncToGenerator as h, _regeneratorRuntime as i, adapters as j, anonymizer as k, async as l, constants as m, data as n, dcmjs as o, derivations as p, normalizers as q, sr as s, utilities as u };
|
|
16048
|
-
//# sourceMappingURL=dcmjs.shared-
|
|
16067
|
+
//# sourceMappingURL=dcmjs.shared-DVqSe8G1.js.map
|