hellfire 0.18.1 → 0.18.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/CHANGELOG.md +4 -0
- package/dist/index.js +88 -134
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [0.18.2](http://10.16.100.57/diffusion/115/paladin/compare/v0.18.1...v0.18.2) (2022-01-27)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
5
9
|
## [0.18.1](http://10.16.100.57/diffusion/115/paladin/compare/v0.18.0...v0.18.1) (2022-01-26)
|
|
6
10
|
|
|
7
11
|
|
package/dist/index.js
CHANGED
|
@@ -26412,60 +26412,11 @@ function imagePointToPatientPoint(imagePoint, imagePlane) {
|
|
|
26412
26412
|
enterModule && enterModule(module);
|
|
26413
26413
|
})();
|
|
26414
26414
|
|
|
26415
|
-
var __signature__$1E = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
26416
|
-
return a;
|
|
26417
|
-
};
|
|
26418
|
-
var dicomCache = {};
|
|
26419
|
-
|
|
26420
|
-
var loadAndCacheDicom = function loadAndCacheDicom(imageId) {
|
|
26421
|
-
return new Promise(function (resolve, reject) {
|
|
26422
|
-
if (dicomCache[imageId]) {
|
|
26423
|
-
resolve(dicomCache[imageId]);
|
|
26424
|
-
return;
|
|
26425
|
-
}
|
|
26426
|
-
|
|
26427
|
-
var imagePromise = loadAndCacheImagePlus(imageId);
|
|
26428
|
-
imagePromise.then(function (image) {
|
|
26429
|
-
var dicom = new DicomInfo(image.data, image.getPixelData());
|
|
26430
|
-
dicomCache[imageId] = dicom;
|
|
26431
|
-
resolve(dicom);
|
|
26432
|
-
}, function (e) {
|
|
26433
|
-
reject(e);
|
|
26434
|
-
});
|
|
26435
|
-
});
|
|
26436
|
-
};
|
|
26437
|
-
|
|
26438
|
-
var purgeDicomCache = function purgeDicomCache() {
|
|
26439
|
-
dicomCache = {};
|
|
26440
|
-
};
|
|
26441
|
-
|
|
26442
|
-
(function () {
|
|
26443
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
26444
|
-
|
|
26445
|
-
if (!reactHotLoader) {
|
|
26446
|
-
return;
|
|
26447
|
-
}
|
|
26448
|
-
|
|
26449
|
-
reactHotLoader.register(dicomCache, "dicomCache", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/dicom-parser-plus/dicom/utils/loadAndCacheDicom.js");
|
|
26450
|
-
reactHotLoader.register(loadAndCacheDicom, "loadAndCacheDicom", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/dicom-parser-plus/dicom/utils/loadAndCacheDicom.js");
|
|
26451
|
-
reactHotLoader.register(purgeDicomCache, "purgeDicomCache", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/dicom-parser-plus/dicom/utils/loadAndCacheDicom.js");
|
|
26452
|
-
})();
|
|
26453
|
-
|
|
26454
|
-
(function () {
|
|
26455
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
26456
|
-
leaveModule && leaveModule(module);
|
|
26457
|
-
})();
|
|
26458
|
-
|
|
26459
|
-
(function () {
|
|
26460
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
26461
|
-
enterModule && enterModule(module);
|
|
26462
|
-
})();
|
|
26463
|
-
|
|
26464
26415
|
function _createSuper$A(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$A(); return function _createSuperInternal() { var Super = getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }
|
|
26465
26416
|
|
|
26466
26417
|
function _isNativeReflectConstruct$A() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
26467
26418
|
|
|
26468
|
-
var __signature__$
|
|
26419
|
+
var __signature__$1E = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
26469
26420
|
return a;
|
|
26470
26421
|
};
|
|
26471
26422
|
var getNewContext$c = cornerstoneTools.importInternal('drawing/getNewContext');
|
|
@@ -26715,6 +26666,9 @@ var ReferencePositionTool = /*#__PURE__*/function (_BaseAnnotationPlusTo) {
|
|
|
26715
26666
|
/**
|
|
26716
26667
|
* target element的render方法
|
|
26717
26668
|
* 计算source的点和target最近的层 翻页+绘制垂直映射的点
|
|
26669
|
+
*
|
|
26670
|
+
* 方法:
|
|
26671
|
+
* 遍历算出所有距离 做排序
|
|
26718
26672
|
*/
|
|
26719
26673
|
|
|
26720
26674
|
}, {
|
|
@@ -26723,7 +26677,7 @@ var ReferencePositionTool = /*#__PURE__*/function (_BaseAnnotationPlusTo) {
|
|
|
26723
26677
|
var _renderTargetPosition = asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2(evt) {
|
|
26724
26678
|
var _this3 = this;
|
|
26725
26679
|
|
|
26726
|
-
var _evt$detail2, image, element, sourceElements, sourceElement, sourceToolData, cornerstone, sourceImage, currentTargetImage, sourceImagePlane, currentTargetPlane,
|
|
26680
|
+
var _evt$detail2, image, element, sourceElements, sourceElement, sourceToolData, cornerstone, sourceImage, currentTargetImage, sourceImagePlane, currentTargetPlane, sourcePoint, sourcePointV3, imageTotalCount, targetImageIndex, min, targetImagePlane, sourcePointToTargetPlanePoint, context, handles;
|
|
26727
26681
|
|
|
26728
26682
|
return regenerator.wrap(function _callee2$(_context2) {
|
|
26729
26683
|
while (1) {
|
|
@@ -26783,93 +26737,44 @@ var ReferencePositionTool = /*#__PURE__*/function (_BaseAnnotationPlusTo) {
|
|
|
26783
26737
|
return _context2.abrupt("return");
|
|
26784
26738
|
|
|
26785
26739
|
case 19:
|
|
26786
|
-
_context2.next = 21;
|
|
26787
|
-
return loadAndCacheDicom(currentTargetImage.imageId);
|
|
26788
|
-
|
|
26789
|
-
case 21:
|
|
26790
|
-
currentTargetImageDicom = _context2.sent;
|
|
26791
|
-
_context2.next = 24;
|
|
26792
|
-
return loadAndCacheDicom(sourceImage.imageId);
|
|
26793
|
-
|
|
26794
|
-
case 24:
|
|
26795
|
-
sourceImageDicom = _context2.sent;
|
|
26796
|
-
|
|
26797
|
-
if (!(!currentTargetImageDicom.ImageType || !currentTargetImageDicom.ImageType.value || !lodash$1.includes(lodash$1.toUpper(currentTargetImageDicom.ImageType.value), 'PRIMARY'))) {
|
|
26798
|
-
_context2.next = 27;
|
|
26799
|
-
break;
|
|
26800
|
-
}
|
|
26801
|
-
|
|
26802
|
-
return _context2.abrupt("return");
|
|
26803
|
-
|
|
26804
|
-
case 27:
|
|
26805
|
-
if (!(!sourceImageDicom.ImageType || !sourceImageDicom.ImageType.value || !lodash$1.includes(lodash$1.toUpper(sourceImageDicom.ImageType.value), 'PRIMARY'))) {
|
|
26806
|
-
_context2.next = 29;
|
|
26807
|
-
break;
|
|
26808
|
-
}
|
|
26809
|
-
|
|
26810
|
-
return _context2.abrupt("return");
|
|
26811
|
-
|
|
26812
|
-
case 29:
|
|
26813
26740
|
sourcePoint = sourceToolData.data[0].handles.end;
|
|
26814
26741
|
sourcePointV3 = imagePointToPatientPoint(sourcePoint, sourceImagePlane);
|
|
26815
|
-
/**
|
|
26816
|
-
* 1.在起始的外侧,就直接取第一个image
|
|
26817
|
-
* 2.在结束的外侧,直接取最后一个image
|
|
26818
|
-
* 3.在中间,把source的点击的p点投到第一张上获得p1,投到最后一张上获得p2,因为层是平行的,
|
|
26819
|
-
* 这样三个点就在一条空间的直线上了,然后计算p1到p2的距离distance,distance/层数,
|
|
26820
|
-
* 就是层厚+层间距(默认当它是等分的),然后p点到p1的距离也能知道,除以(层厚+层间距)找到index
|
|
26821
|
-
*/
|
|
26822
|
-
|
|
26823
26742
|
imageTotalCount = this.imageIds.length;
|
|
26824
26743
|
targetImageIndex = 0;
|
|
26825
26744
|
|
|
26826
|
-
if (
|
|
26827
|
-
|
|
26828
|
-
|
|
26829
|
-
|
|
26745
|
+
if (imageTotalCount > 1) {
|
|
26746
|
+
// 遍历计算所有distance
|
|
26747
|
+
min = null;
|
|
26748
|
+
lodash$1.forEach(this.imageIds, function (imageId, index) {
|
|
26749
|
+
var imagePlane = cornerstone.metaData.get('imagePlaneModule', imageId);
|
|
26830
26750
|
|
|
26831
|
-
|
|
26832
|
-
|
|
26833
|
-
|
|
26834
|
-
lastTargetImagePlane = cornerstone.metaData.get('imagePlaneModule', lastImageId);
|
|
26751
|
+
if (!imagePlane || !imagePlane.rowCosines || !imagePlane.columnCosines || !imagePlane.imagePositionPatient) {
|
|
26752
|
+
return;
|
|
26753
|
+
}
|
|
26835
26754
|
|
|
26836
|
-
|
|
26837
|
-
|
|
26838
|
-
break;
|
|
26839
|
-
}
|
|
26755
|
+
var sourcePointInTargetPlane = projectPatientPointToImagePlane$1(sourcePointV3, imagePlane);
|
|
26756
|
+
var sourcePointInTargetPlaneV3 = imagePointToPatientPoint(sourcePointInTargetPlane, imagePlane);
|
|
26840
26757
|
|
|
26841
|
-
|
|
26758
|
+
var distance = _this3.calcDistance(sourcePointV3, sourcePointInTargetPlaneV3);
|
|
26842
26759
|
|
|
26843
|
-
|
|
26844
|
-
|
|
26845
|
-
|
|
26846
|
-
|
|
26847
|
-
|
|
26848
|
-
|
|
26849
|
-
pointToFirstImageDistance = this.calcDistance(sourcePointInFirstPlaneV3, sourcePointV3);
|
|
26850
|
-
_targetImageIndex = lodash$1.round(pointToFirstImageDistance / (totalDistance / (imageTotalCount - 1)));
|
|
26851
|
-
|
|
26852
|
-
if (!(_targetImageIndex < 0 || _targetImageIndex > imageTotalCount - 1)) {
|
|
26853
|
-
_context2.next = 49;
|
|
26854
|
-
break;
|
|
26760
|
+
if (!min || distance < min) {
|
|
26761
|
+
min = distance;
|
|
26762
|
+
targetImageIndex = index;
|
|
26763
|
+
}
|
|
26764
|
+
});
|
|
26765
|
+
scrollToIndex(element, targetImageIndex);
|
|
26855
26766
|
}
|
|
26856
26767
|
|
|
26857
|
-
return _context2.abrupt("return");
|
|
26858
|
-
|
|
26859
|
-
case 49:
|
|
26860
|
-
scrollToIndex(element, _targetImageIndex);
|
|
26861
|
-
|
|
26862
|
-
case 50:
|
|
26863
26768
|
targetImagePlane = cornerstone.metaData.get('imagePlaneModule', this.imageIds[targetImageIndex]);
|
|
26864
26769
|
|
|
26865
|
-
if (!(!targetImagePlane || !targetImagePlane.rowCosines || !targetImagePlane.columnCosines || !targetImagePlane.imagePositionPatient
|
|
26866
|
-
_context2.next =
|
|
26770
|
+
if (!(!targetImagePlane || !targetImagePlane.rowCosines || !targetImagePlane.columnCosines || !targetImagePlane.imagePositionPatient)) {
|
|
26771
|
+
_context2.next = 27;
|
|
26867
26772
|
break;
|
|
26868
26773
|
}
|
|
26869
26774
|
|
|
26870
26775
|
return _context2.abrupt("return");
|
|
26871
26776
|
|
|
26872
|
-
case
|
|
26777
|
+
case 27:
|
|
26873
26778
|
sourcePointToTargetPlanePoint = projectPatientPointToImagePlane$1(sourcePointV3, targetImagePlane);
|
|
26874
26779
|
context = getNewContext$c(evt.detail.canvasContext.canvas);
|
|
26875
26780
|
handles = {
|
|
@@ -26890,7 +26795,7 @@ var ReferencePositionTool = /*#__PURE__*/function (_BaseAnnotationPlusTo) {
|
|
|
26890
26795
|
});
|
|
26891
26796
|
});
|
|
26892
26797
|
|
|
26893
|
-
case
|
|
26798
|
+
case 31:
|
|
26894
26799
|
case "end":
|
|
26895
26800
|
return _context2.stop();
|
|
26896
26801
|
}
|
|
@@ -26957,7 +26862,7 @@ var ReferencePositionTool = /*#__PURE__*/function (_BaseAnnotationPlusTo) {
|
|
|
26957
26862
|
enterModule && enterModule(module);
|
|
26958
26863
|
})();
|
|
26959
26864
|
|
|
26960
|
-
var __signature__$
|
|
26865
|
+
var __signature__$1F = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
26961
26866
|
return a;
|
|
26962
26867
|
};
|
|
26963
26868
|
var getToolState$c = cornerstoneTools.getToolState;
|
|
@@ -26994,7 +26899,7 @@ var _default$w = function _default(element) {
|
|
|
26994
26899
|
enterModule && enterModule(module);
|
|
26995
26900
|
})();
|
|
26996
26901
|
|
|
26997
|
-
var __signature__$
|
|
26902
|
+
var __signature__$1G = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
26998
26903
|
return a;
|
|
26999
26904
|
};
|
|
27000
26905
|
var scrollToIndex$1 = cornerstoneTools.importInternal('util/scrollToIndex');
|
|
@@ -27072,7 +26977,7 @@ var _default$x = {
|
|
|
27072
26977
|
enterModule && enterModule(module);
|
|
27073
26978
|
})();
|
|
27074
26979
|
|
|
27075
|
-
var __signature__$
|
|
26980
|
+
var __signature__$1H = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
27076
26981
|
return a;
|
|
27077
26982
|
};
|
|
27078
26983
|
var external$k = cornerstoneTools.external;
|
|
@@ -27359,7 +27264,7 @@ var _default$y = function _default(synchronizer, sourceElement, targetElement, e
|
|
|
27359
27264
|
enterModule && enterModule(module);
|
|
27360
27265
|
})();
|
|
27361
27266
|
|
|
27362
|
-
var __signature__$
|
|
27267
|
+
var __signature__$1I = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
27363
27268
|
return a;
|
|
27364
27269
|
};
|
|
27365
27270
|
var external$l = cornerstoneTools.external;
|
|
@@ -27513,7 +27418,7 @@ var _default$z = function _default(synchronizer, sourceElement, targetElement, e
|
|
|
27513
27418
|
enterModule && enterModule(module);
|
|
27514
27419
|
})();
|
|
27515
27420
|
|
|
27516
|
-
var __signature__$
|
|
27421
|
+
var __signature__$1J = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
27517
27422
|
return a;
|
|
27518
27423
|
};
|
|
27519
27424
|
var getToolState$e = cornerstoneTools.getToolState;
|
|
@@ -27588,7 +27493,7 @@ var _default$A = function _default(synchronizer, sourceElement, targetElement, e
|
|
|
27588
27493
|
enterModule && enterModule(module);
|
|
27589
27494
|
})();
|
|
27590
27495
|
|
|
27591
|
-
var __signature__$
|
|
27496
|
+
var __signature__$1K = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
27592
27497
|
return a;
|
|
27593
27498
|
};
|
|
27594
27499
|
var external$m = cornerstoneTools.external;
|
|
@@ -27672,7 +27577,7 @@ var _default$B = function _default(synchronizer, sourceElement, targetElement, e
|
|
|
27672
27577
|
enterModule && enterModule(module);
|
|
27673
27578
|
})();
|
|
27674
27579
|
|
|
27675
|
-
var __signature__$
|
|
27580
|
+
var __signature__$1L = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
27676
27581
|
return a;
|
|
27677
27582
|
};
|
|
27678
27583
|
|
|
@@ -27713,7 +27618,7 @@ var _MPR_DIRECTION_COLOR;
|
|
|
27713
27618
|
enterModule && enterModule(module);
|
|
27714
27619
|
})();
|
|
27715
27620
|
|
|
27716
|
-
var __signature__$
|
|
27621
|
+
var __signature__$1M = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
27717
27622
|
return a;
|
|
27718
27623
|
};
|
|
27719
27624
|
var MPR_DIRECTION_COLOR = (_MPR_DIRECTION_COLOR = {}, defineProperty(_MPR_DIRECTION_COLOR, ImagePlanDirection.Sagittal, 'red'), defineProperty(_MPR_DIRECTION_COLOR, ImagePlanDirection.Transverse, 'greenyellow'), defineProperty(_MPR_DIRECTION_COLOR, ImagePlanDirection.Coronal, 'blue'), _MPR_DIRECTION_COLOR);
|
|
@@ -27738,7 +27643,7 @@ var MPR_DIRECTION_COLOR = (_MPR_DIRECTION_COLOR = {}, defineProperty(_MPR_DIRECT
|
|
|
27738
27643
|
enterModule && enterModule(module);
|
|
27739
27644
|
})();
|
|
27740
27645
|
|
|
27741
|
-
var __signature__$
|
|
27646
|
+
var __signature__$1N = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
27742
27647
|
return a;
|
|
27743
27648
|
};
|
|
27744
27649
|
var external$n = cornerstoneTools.external; // 两条直线求焦点
|
|
@@ -27808,7 +27713,7 @@ var _userAgent$cpu, _userAgent$device, _userAgent$os, _userAgent$os2, _userAgent
|
|
|
27808
27713
|
enterModule && enterModule(module);
|
|
27809
27714
|
})();
|
|
27810
27715
|
|
|
27811
|
-
var __signature__$
|
|
27716
|
+
var __signature__$1O = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
27812
27717
|
return a;
|
|
27813
27718
|
};
|
|
27814
27719
|
|
|
@@ -27958,7 +27863,7 @@ function _createSuper$B(Derived) { var hasNativeReflectConstruct = _isNativeRefl
|
|
|
27958
27863
|
|
|
27959
27864
|
function _isNativeReflectConstruct$B() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
27960
27865
|
|
|
27961
|
-
var __signature__$
|
|
27866
|
+
var __signature__$1P = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
27962
27867
|
return a;
|
|
27963
27868
|
};
|
|
27964
27869
|
var external$o = cornerstoneTools.external;
|
|
@@ -28492,7 +28397,7 @@ function _createSuper$C(Derived) { var hasNativeReflectConstruct = _isNativeRefl
|
|
|
28492
28397
|
|
|
28493
28398
|
function _isNativeReflectConstruct$C() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
28494
28399
|
|
|
28495
|
-
var __signature__$
|
|
28400
|
+
var __signature__$1Q = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
28496
28401
|
return a;
|
|
28497
28402
|
};
|
|
28498
28403
|
var external$p = cornerstoneTools.external;
|
|
@@ -28641,7 +28546,7 @@ var OverlayTool = /*#__PURE__*/function (_BaseTool) {
|
|
|
28641
28546
|
enterModule && enterModule(module);
|
|
28642
28547
|
})();
|
|
28643
28548
|
|
|
28644
|
-
var __signature__$
|
|
28549
|
+
var __signature__$1R = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
28645
28550
|
return a;
|
|
28646
28551
|
};
|
|
28647
28552
|
var cornerstoneState = {
|
|
@@ -28755,6 +28660,55 @@ function reset$2(key) {
|
|
|
28755
28660
|
enterModule && enterModule(module);
|
|
28756
28661
|
})();
|
|
28757
28662
|
|
|
28663
|
+
var __signature__$1S = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
28664
|
+
return a;
|
|
28665
|
+
};
|
|
28666
|
+
var dicomCache = {};
|
|
28667
|
+
|
|
28668
|
+
var loadAndCacheDicom = function loadAndCacheDicom(imageId) {
|
|
28669
|
+
return new Promise(function (resolve, reject) {
|
|
28670
|
+
if (dicomCache[imageId]) {
|
|
28671
|
+
resolve(dicomCache[imageId]);
|
|
28672
|
+
return;
|
|
28673
|
+
}
|
|
28674
|
+
|
|
28675
|
+
var imagePromise = loadAndCacheImagePlus(imageId);
|
|
28676
|
+
imagePromise.then(function (image) {
|
|
28677
|
+
var dicom = new DicomInfo(image.data, image.getPixelData());
|
|
28678
|
+
dicomCache[imageId] = dicom;
|
|
28679
|
+
resolve(dicom);
|
|
28680
|
+
}, function (e) {
|
|
28681
|
+
reject(e);
|
|
28682
|
+
});
|
|
28683
|
+
});
|
|
28684
|
+
};
|
|
28685
|
+
|
|
28686
|
+
var purgeDicomCache = function purgeDicomCache() {
|
|
28687
|
+
dicomCache = {};
|
|
28688
|
+
};
|
|
28689
|
+
|
|
28690
|
+
(function () {
|
|
28691
|
+
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
28692
|
+
|
|
28693
|
+
if (!reactHotLoader) {
|
|
28694
|
+
return;
|
|
28695
|
+
}
|
|
28696
|
+
|
|
28697
|
+
reactHotLoader.register(dicomCache, "dicomCache", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/dicom-parser-plus/dicom/utils/loadAndCacheDicom.js");
|
|
28698
|
+
reactHotLoader.register(loadAndCacheDicom, "loadAndCacheDicom", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/dicom-parser-plus/dicom/utils/loadAndCacheDicom.js");
|
|
28699
|
+
reactHotLoader.register(purgeDicomCache, "purgeDicomCache", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/dicom-parser-plus/dicom/utils/loadAndCacheDicom.js");
|
|
28700
|
+
})();
|
|
28701
|
+
|
|
28702
|
+
(function () {
|
|
28703
|
+
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
28704
|
+
leaveModule && leaveModule(module);
|
|
28705
|
+
})();
|
|
28706
|
+
|
|
28707
|
+
(function () {
|
|
28708
|
+
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
28709
|
+
enterModule && enterModule(module);
|
|
28710
|
+
})();
|
|
28711
|
+
|
|
28758
28712
|
function ownKeys$c(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
28759
28713
|
|
|
28760
28714
|
function _objectSpread$c(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$c(Object(source), true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$c(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|