@ohif/app 3.10.0-beta.21 → 3.10.0-beta.23

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.
Files changed (40) hide show
  1. package/dist/{1185.bundle.1638c829acc6ae29bff0.js → 1185.bundle.fc81090aa815e273421e.js} +38 -11
  2. package/dist/{1266.bundle.7252739824d2d57baf3c.js → 1266.bundle.a830a99a722433b98a7d.js} +1 -1
  3. package/dist/{2225.bundle.567d25b0e9cd4cff0a75.js → 2225.bundle.3c7eef7da23624fde6fd.js} +0 -58
  4. package/dist/{2825.bundle.6a6e9f570eeccdd42bfa.js → 2825.bundle.deffb96e50a40e54d7e5.js} +1 -1
  5. package/dist/{3198.bundle.97a4c90110b3902e3079.js → 3198.bundle.157e8b2f6f831d5470a7.js} +1 -1
  6. package/dist/{3200.bundle.fbe2d070c34b4a1a6eeb.js → 3200.bundle.084aefbf4b6c87fbe7e6.js} +1 -1
  7. package/dist/3326.bundle.695eedd79cfcc0d51729.js +268 -0
  8. package/dist/{8295.bundle.14cddaccdcd3a7093398.js → 3902.bundle.0c9f183e190a82b7099e.js} +20 -1
  9. package/dist/3902.css +2 -0
  10. package/dist/{4202.bundle.1311396ecdb6c0b09eb0.js → 4202.bundle.437f3eaa2a7c5133ec62.js} +2 -1
  11. package/dist/{3121.bundle.67ff7e799683191bb324.js → 4438.bundle.19d9d6e9363281427c0d.js} +24 -4
  12. package/dist/4759.bundle.46ed209cc82066cf9777.js +268 -0
  13. package/dist/{967.bundle.fee0d6c1e9e244ad5bb3.js → 4991.bundle.662e6a84f998088b7815.js} +273 -1
  14. package/dist/{5139.bundle.1ba855855cfe621f58e5.js → 5139.bundle.093007d4b92105645862.js} +1 -1
  15. package/dist/{5247.bundle.3e2c698dc40c13d9ec50.js → 5247.bundle.a4b81996960dbeedd767.js} +1 -1
  16. package/dist/{5630.bundle.ef588a1c27ef9f0e3213.js → 5630.bundle.597ec7ea3209f49d6a33.js} +8 -7
  17. package/dist/{3970.bundle.4a01bba0d65645ab083b.js → 5758.bundle.4642eb48c3642392d88c.js} +273 -1
  18. package/dist/{6498.bundle.2d0c5076f6ebf413e708.js → 6498.bundle.2ea49c879cb10a42790d.js} +0 -214
  19. package/dist/{717.bundle.e57716e62adff2729d3b.js → 7013.bundle.4793c2560cd23fa108c8.js} +265 -1
  20. package/dist/7013.css +4 -0
  21. package/dist/{7197.bundle.af1d51b84416b2dea84b.js → 7197.bundle.b1b40ce3e3bcbc328849.js} +2 -2
  22. package/dist/{727.bundle.ad43d341c2f278203f48.js → 727.bundle.59b87ab9cd3d7efe6585.js} +58 -0
  23. package/dist/{8558.bundle.2dcef2899645209a113e.js → 8558.bundle.a11a7554435ddf72be4a.js} +8 -3
  24. package/dist/{app.bundle.fa2d52a70bd446bedfcb.js → app.bundle.212c1699eb22f678e664.js} +40 -27
  25. package/dist/index.html +1 -1
  26. package/dist/{suv-peak-worker.bundle.d25d84a912532397b901.js → suv-peak-worker.bundle.176dfd05dbb231df0561.js} +1 -1
  27. package/dist/sw.js +1 -1
  28. package/package.json +18 -18
  29. /package/dist/{1374.bundle.6a03f9e38f8282776ad6.js → 1374.bundle.0c5a26ea20cca0530dfa.js} +0 -0
  30. /package/dist/{213.bundle.b4a97090008624516edb.js → 213.bundle.0b97baee2c01e3a67d51.js} +0 -0
  31. /package/dist/{2424.bundle.ed92cd82184bd7c04509.js → 2424.bundle.4c5d76db418b26bdad4e.js} +0 -0
  32. /package/dist/{1801.css → 3326.css} +0 -0
  33. /package/dist/{717.css → 4438.css} +0 -0
  34. /package/dist/{2591.css → 4759.css} +0 -0
  35. /package/dist/{4834.bundle.b3793063a856d953a3a6.js → 4834.bundle.934534b9743a018477b7.js} +0 -0
  36. /package/dist/{5687.bundle.60ae7ab6885b1efeac1b.js → 5687.bundle.9ad5088db698826f983b.js} +0 -0
  37. /package/dist/{7955.bundle.1b896ad85b50d72601f1.js → 7955.bundle.a1ba3c23b23eb265e7a3.js} +0 -0
  38. /package/dist/{8008.bundle.e35edc6f24c72559ed2a.js → 8008.bundle.50046cb3004a4aea2f3e.js} +0 -0
  39. /package/dist/{8259.bundle.9cbb47a1816a52398b88.js → 8259.bundle.dffd6041d81022e1e0ce.js} +0 -0
  40. /package/dist/{9551.bundle.321d15be04cd5a8789cc.js → 9551.bundle.9a21325e383bbb957d4d.js} +0 -0
@@ -9122,7 +9122,7 @@ const frameView = {
9122
9122
  required: true
9123
9123
  }, {
9124
9124
  attribute: 'isDisplaySetFromUrl',
9125
- weight: 10,
9125
+ weight: 20,
9126
9126
  constraint: {
9127
9127
  equals: true
9128
9128
  }
@@ -11753,12 +11753,22 @@ class SegmentationService extends src/* PubSubService */.Rc {
11753
11753
  // We should parse the segmentation as separate slices to support overlapping segments.
11754
11754
  // This parsing should occur in the CornerstoneJS library adapters.
11755
11755
  // For now, we use the volume returned from the library and chop it here.
11756
+ let firstSegmentedSliceImageId = null;
11756
11757
  for (let i = 0; i < derivedSegmentationImages.length; i++) {
11757
11758
  const voxelManager = derivedSegmentationImages[i].voxelManager;
11758
11759
  const scalarData = voxelManager.getScalarData();
11759
- scalarData.set(volumeScalarData.slice(i * scalarData.length, (i + 1) * scalarData.length));
11760
+ const sliceData = volumeScalarData.slice(i * scalarData.length, (i + 1) * scalarData.length);
11761
+ scalarData.set(sliceData);
11760
11762
  voxelManager.setScalarData(scalarData);
11763
+
11764
+ // Check if this slice has any non-zero voxels and we haven't found one yet
11765
+ if (!firstSegmentedSliceImageId && sliceData.some(value => value !== 0)) {
11766
+ firstSegmentedSliceImageId = derivedSegmentationImages[i].referencedImageId;
11767
+ }
11761
11768
  }
11769
+
11770
+ // assign the first non zero voxel image id to the segDisplaySet
11771
+ segDisplaySet.firstSegmentedSliceImageId = firstSegmentedSliceImageId;
11762
11772
  this._broadcastEvent(SegmentationService_EVENTS.SEGMENTATION_LOADING_COMPLETE, {
11763
11773
  segmentationId,
11764
11774
  segDisplaySet
@@ -11806,7 +11816,12 @@ class SegmentationService extends src/* PubSubService */.Rc {
11806
11816
  throw new Error('To create the contours from RT displaySet, the displaySet should be loaded first. You can perform rtDisplaySet.load() before calling this method.');
11807
11817
  }
11808
11818
  const rtDisplaySetUID = rtDisplaySet.displaySetInstanceUID;
11809
-
11819
+ const referencedDisplaySet = this.servicesManager.services.displaySetService.getDisplaySetByUID(rtDisplaySet.referencedDisplaySetInstanceUID);
11820
+ const referencedImageIdsWithGeometry = Array.from(structureSet.ReferencedSOPInstanceUIDsSet);
11821
+ const referencedImageIds = referencedDisplaySet.instances.map(image => image.imageId);
11822
+ // find the first image id that contains a referenced SOP instance UID
11823
+ const firstSegmentedSliceImageId = referencedImageIds.find(imageId => referencedImageIdsWithGeometry.some(referencedId => imageId.includes(referencedId)));
11824
+ rtDisplaySet.firstSegmentedSliceImageId = firstSegmentedSliceImageId;
11810
11825
  // Map ROI contours to RT Struct Data
11811
11826
  const allRTStructData = mapROIContoursToRTStructData(structureSet, rtDisplaySetUID);
11812
11827
 
@@ -13775,9 +13790,6 @@ class CornerstoneViewportService extends src/* PubSubService */.Rc {
13775
13790
  // is being used to navigate to the initial view position for measurement
13776
13791
  // navigation and other navigation forcing specific views.
13777
13792
  let initialImageIndexToUse = presentations?.positionPresentation?.initialImageIndex ?? initialImageIndex;
13778
- if (initialImageIndexToUse === undefined || initialImageIndexToUse === null) {
13779
- initialImageIndexToUse = this._getInitialImageIndexForViewport(viewportInfo, imageIds) || 0;
13780
- }
13781
13793
  const {
13782
13794
  rotation,
13783
13795
  flipHorizontal,
@@ -13815,13 +13827,23 @@ class CornerstoneViewportService extends src/* PubSubService */.Rc {
13815
13827
  dist_esm.utilities.stackContextPrefetch.enable(element);
13816
13828
  });
13817
13829
  let imageIdsToSet = imageIds;
13818
- const res = this._processExtraDisplaySetsForViewport(viewport);
13819
- imageIdsToSet = res?.imageIds ?? imageIdsToSet;
13830
+ const overlayProcessingResult = this._processExtraDisplaySetsForViewport(viewport);
13831
+ imageIdsToSet = overlayProcessingResult?.imageIds ?? imageIdsToSet;
13832
+ const referencedImageId = presentations?.positionPresentation?.viewReference?.referencedImageId;
13833
+ if (referencedImageId) {
13834
+ initialImageIndexToUse = imageIdsToSet.indexOf(referencedImageId);
13835
+ }
13836
+ if (initialImageIndexToUse === undefined || initialImageIndexToUse === null) {
13837
+ initialImageIndexToUse = this._getInitialImageIndexForViewport(viewportInfo, imageIds) || 0;
13838
+ }
13820
13839
  return viewport.setStack(imageIdsToSet, initialImageIndexToUse).then(() => {
13821
13840
  viewport.setProperties({
13822
13841
  ...properties
13823
13842
  });
13824
13843
  this.setPresentations(viewport.id, presentations, viewportInfo);
13844
+ if (overlayProcessingResult?.addOverlayFn) {
13845
+ overlayProcessingResult.addOverlayFn();
13846
+ }
13825
13847
  if (displayArea) {
13826
13848
  viewport.setDisplayArea(displayArea);
13827
13849
  }
@@ -14003,8 +14025,13 @@ class CornerstoneViewportService extends src/* PubSubService */.Rc {
14003
14025
  });
14004
14026
 
14005
14027
  // For SEG and RT viewports
14006
- this._processExtraDisplaySetsForViewport(viewport);
14028
+ const {
14029
+ addOverlayFn
14030
+ } = this._processExtraDisplaySetsForViewport(viewport) || {};
14007
14031
  await viewport.setVolumes(volumeInputArray);
14032
+ if (addOverlayFn) {
14033
+ addOverlayFn();
14034
+ }
14008
14035
  volumesProperties.forEach(({
14009
14036
  properties,
14010
14037
  volumeId
@@ -14043,9 +14070,9 @@ class CornerstoneViewportService extends src/* PubSubService */.Rc {
14043
14070
  }
14044
14071
  const referenceDisplaySet = displaySetService.getDisplaySetByUID(segOrRTSOverlayDisplaySet.referencedDisplaySetInstanceUID);
14045
14072
  const imageIds = referenceDisplaySet.images.map(image => image.imageId);
14046
- this.addOverlayRepresentationForDisplaySet(segOrRTSOverlayDisplaySet, viewport);
14047
14073
  return {
14048
- imageIds
14074
+ imageIds,
14075
+ addOverlayFn: () => this.addOverlayRepresentationForDisplaySet(segOrRTSOverlayDisplaySet, viewport)
14049
14076
  };
14050
14077
  }
14051
14078
  addOverlayRepresentationForDisplaySet(displaySet, viewport) {
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- (self["webpackChunk"] = self["webpackChunk"] || []).push([[1266,2591,4182,1801],{
2
+ (self["webpackChunk"] = self["webpackChunk"] || []).push([[1266,4182],{
3
3
 
4
4
  /***/ 35589:
5
5
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
@@ -13,64 +13,6 @@ function _getHash(annotationUID, drawingElementType, nodeUID) {
13
13
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_getHash);
14
14
 
15
15
 
16
- /***/ }),
17
-
18
- /***/ 18682:
19
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
20
-
21
- "use strict";
22
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23
- /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
24
- /* harmony export */ });
25
- var SegmentationRepresentations;
26
- (function (SegmentationRepresentations) {
27
- SegmentationRepresentations["Labelmap"] = "Labelmap";
28
- SegmentationRepresentations["Contour"] = "Contour";
29
- SegmentationRepresentations["Surface"] = "Surface";
30
- })(SegmentationRepresentations || (SegmentationRepresentations = {}));
31
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SegmentationRepresentations);
32
-
33
-
34
- /***/ }),
35
-
36
- /***/ 66452:
37
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
38
-
39
- "use strict";
40
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
41
- /* harmony export */ i: () => (/* binding */ MouseBindings),
42
- /* harmony export */ q: () => (/* binding */ KeyboardBindings)
43
- /* harmony export */ });
44
- var MouseBindings;
45
- (function (MouseBindings) {
46
- MouseBindings[MouseBindings["Primary"] = 1] = "Primary";
47
- MouseBindings[MouseBindings["Secondary"] = 2] = "Secondary";
48
- MouseBindings[MouseBindings["Primary_And_Secondary"] = 3] = "Primary_And_Secondary";
49
- MouseBindings[MouseBindings["Auxiliary"] = 4] = "Auxiliary";
50
- MouseBindings[MouseBindings["Primary_And_Auxiliary"] = 5] = "Primary_And_Auxiliary";
51
- MouseBindings[MouseBindings["Secondary_And_Auxiliary"] = 6] = "Secondary_And_Auxiliary";
52
- MouseBindings[MouseBindings["Primary_And_Secondary_And_Auxiliary"] = 7] = "Primary_And_Secondary_And_Auxiliary";
53
- MouseBindings[MouseBindings["Fourth_Button"] = 8] = "Fourth_Button";
54
- MouseBindings[MouseBindings["Fifth_Button"] = 16] = "Fifth_Button";
55
- MouseBindings[MouseBindings["Wheel"] = 524288] = "Wheel";
56
- MouseBindings[MouseBindings["Wheel_Primary"] = 524289] = "Wheel_Primary";
57
- })(MouseBindings || (MouseBindings = {}));
58
- var KeyboardBindings;
59
- (function (KeyboardBindings) {
60
- KeyboardBindings[KeyboardBindings["Shift"] = 16] = "Shift";
61
- KeyboardBindings[KeyboardBindings["Ctrl"] = 17] = "Ctrl";
62
- KeyboardBindings[KeyboardBindings["Alt"] = 18] = "Alt";
63
- KeyboardBindings[KeyboardBindings["Meta"] = 91] = "Meta";
64
- KeyboardBindings[KeyboardBindings["ShiftCtrl"] = 1617] = "ShiftCtrl";
65
- KeyboardBindings[KeyboardBindings["ShiftAlt"] = 1618] = "ShiftAlt";
66
- KeyboardBindings[KeyboardBindings["ShiftMeta"] = 1691] = "ShiftMeta";
67
- KeyboardBindings[KeyboardBindings["CtrlAlt"] = 1718] = "CtrlAlt";
68
- KeyboardBindings[KeyboardBindings["CtrlMeta"] = 1791] = "CtrlMeta";
69
- KeyboardBindings[KeyboardBindings["AltMeta"] = 1891] = "AltMeta";
70
- })(KeyboardBindings || (KeyboardBindings = {}));
71
-
72
-
73
-
74
16
  /***/ }),
75
17
 
76
18
  /***/ 74690:
@@ -176,7 +176,7 @@ const hpTestSwitch = {
176
176
  // It has no affect if nothing is specified in the URL.
177
177
  {
178
178
  attribute: 'isDisplaySetFromUrl',
179
- weight: 10,
179
+ weight: 20,
180
180
  constraint: {
181
181
  equals: true
182
182
  }
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- (self["webpackChunk"] = self["webpackChunk"] || []).push([[3198,2591,4182,1801],{
2
+ (self["webpackChunk"] = self["webpackChunk"] || []).push([[3198,4182],{
3
3
 
4
4
  /***/ 57289:
5
5
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- (self["webpackChunk"] = self["webpackChunk"] || []).push([[3200,2591,4182,1801],{
2
+ (self["webpackChunk"] = self["webpackChunk"] || []).push([[3200,4182],{
3
3
 
4
4
  /***/ 79044:
5
5
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
@@ -0,0 +1,268 @@
1
+ "use strict";
2
+ (self["webpackChunk"] = self["webpackChunk"] || []).push([[3326,4759,4182],{
3
+
4
+ /***/ 75183:
5
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6
+
7
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8
+ /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
9
+ /* harmony export */ });
10
+ var ChangeTypes;
11
+ (function (ChangeTypes) {
12
+ ChangeTypes["Interaction"] = "Interaction";
13
+ ChangeTypes["HandlesUpdated"] = "HandlesUpdated";
14
+ ChangeTypes["StatsUpdated"] = "StatsUpdated";
15
+ ChangeTypes["InitialSetup"] = "InitialSetup";
16
+ ChangeTypes["Completed"] = "Completed";
17
+ ChangeTypes["InterpolationUpdated"] = "InterpolationUpdated";
18
+ ChangeTypes["History"] = "History";
19
+ })(ChangeTypes || (ChangeTypes = {}));
20
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ChangeTypes);
21
+
22
+
23
+ /***/ }),
24
+
25
+ /***/ 94021:
26
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
27
+
28
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
29
+ /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
30
+ /* harmony export */ });
31
+ var Events;
32
+ (function (Events) {
33
+ Events["TOOL_ACTIVATED"] = "CORNERSTONE_TOOLS_TOOL_ACTIVATED";
34
+ Events["TOOLGROUP_VIEWPORT_ADDED"] = "CORNERSTONE_TOOLS_TOOLGROUP_VIEWPORT_ADDED";
35
+ Events["TOOLGROUP_VIEWPORT_REMOVED"] = "CORNERSTONE_TOOLS_TOOLGROUP_VIEWPORT_REMOVED";
36
+ Events["TOOL_MODE_CHANGED"] = "CORNERSTONE_TOOLS_TOOL_MODE_CHANGED";
37
+ Events["ANNOTATION_ADDED"] = "CORNERSTONE_TOOLS_ANNOTATION_ADDED";
38
+ Events["ANNOTATION_COMPLETED"] = "CORNERSTONE_TOOLS_ANNOTATION_COMPLETED";
39
+ Events["ANNOTATION_MODIFIED"] = "CORNERSTONE_TOOLS_ANNOTATION_MODIFIED";
40
+ Events["ANNOTATION_REMOVED"] = "CORNERSTONE_TOOLS_ANNOTATION_REMOVED";
41
+ Events["ANNOTATION_SELECTION_CHANGE"] = "CORNERSTONE_TOOLS_ANNOTATION_SELECTION_CHANGE";
42
+ Events["ANNOTATION_LOCK_CHANGE"] = "CORNERSTONE_TOOLS_ANNOTATION_LOCK_CHANGE";
43
+ Events["ANNOTATION_VISIBILITY_CHANGE"] = "CORNERSTONE_TOOLS_ANNOTATION_VISIBILITY_CHANGE";
44
+ Events["ANNOTATION_RENDERED"] = "CORNERSTONE_TOOLS_ANNOTATION_RENDERED";
45
+ Events["ANNOTATION_INTERPOLATION_PROCESS_COMPLETED"] = "CORNERSTONE_TOOLS_ANNOTATION_INTERPOLATION_PROCESS_COMPLETED";
46
+ Events["INTERPOLATED_ANNOTATIONS_REMOVED"] = "CORNERSTONE_TOOLS_INTERPOLATED_ANNOTATIONS_REMOVED";
47
+ Events["SEGMENTATION_MODIFIED"] = "CORNERSTONE_TOOLS_SEGMENTATION_MODIFIED";
48
+ Events["SEGMENTATION_RENDERED"] = "CORNERSTONE_TOOLS_SEGMENTATION_RENDERED";
49
+ Events["SEGMENTATION_REPRESENTATION_ADDED"] = "CORNERSTONE_TOOLS_SEGMENTATION_REPRESENTATION_ADDED";
50
+ Events["SEGMENTATION_ADDED"] = "CORNERSTONE_TOOLS_SEGMENTATION_ADDED";
51
+ Events["SEGMENTATION_REPRESENTATION_MODIFIED"] = "CORNERSTONE_TOOLS_SEGMENTATION_REPRESENTATION_MODIFIED";
52
+ Events["SEGMENTATION_REMOVED"] = "CORNERSTONE_TOOLS_SEGMENTATION_REMOVED";
53
+ Events["SEGMENTATION_REPRESENTATION_REMOVED"] = "CORNERSTONE_TOOLS_SEGMENTATION_REPRESENTATION_REMOVED";
54
+ Events["SEGMENTATION_DATA_MODIFIED"] = "CORNERSTONE_TOOLS_SEGMENTATION_DATA_MODIFIED";
55
+ Events["KEY_DOWN"] = "CORNERSTONE_TOOLS_KEY_DOWN";
56
+ Events["KEY_UP"] = "CORNERSTONE_TOOLS_KEY_UP";
57
+ Events["MOUSE_DOWN"] = "CORNERSTONE_TOOLS_MOUSE_DOWN";
58
+ Events["MOUSE_UP"] = "CORNERSTONE_TOOLS_MOUSE_UP";
59
+ Events["MOUSE_DOWN_ACTIVATE"] = "CORNERSTONE_TOOLS_MOUSE_DOWN_ACTIVATE";
60
+ Events["MOUSE_DRAG"] = "CORNERSTONE_TOOLS_MOUSE_DRAG";
61
+ Events["MOUSE_MOVE"] = "CORNERSTONE_TOOLS_MOUSE_MOVE";
62
+ Events["MOUSE_CLICK"] = "CORNERSTONE_TOOLS_MOUSE_CLICK";
63
+ Events["MOUSE_DOUBLE_CLICK"] = "CORNERSTONE_TOOLS_MOUSE_DOUBLE_CLICK";
64
+ Events["MOUSE_WHEEL"] = "CORNERSTONE_TOOLS_MOUSE_WHEEL";
65
+ Events["TOUCH_START"] = "CORNERSTONE_TOOLS_TOUCH_START";
66
+ Events["TOUCH_START_ACTIVATE"] = "CORNERSTONE_TOOLS_TOUCH_START_ACTIVATE";
67
+ Events["TOUCH_PRESS"] = "CORNERSTONE_TOOLS_TOUCH_PRESS";
68
+ Events["TOUCH_DRAG"] = "CORNERSTONE_TOOLS_TOUCH_DRAG";
69
+ Events["TOUCH_END"] = "CORNERSTONE_TOOLS_TOUCH_END";
70
+ Events["TOUCH_TAP"] = "CORNERSTONE_TOOLS_TAP";
71
+ Events["TOUCH_SWIPE"] = "CORNERSTONE_TOOLS_SWIPE";
72
+ })(Events || (Events = {}));
73
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Events);
74
+
75
+
76
+ /***/ }),
77
+
78
+ /***/ 18682:
79
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
80
+
81
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
82
+ /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
83
+ /* harmony export */ });
84
+ var SegmentationRepresentations;
85
+ (function (SegmentationRepresentations) {
86
+ SegmentationRepresentations["Labelmap"] = "Labelmap";
87
+ SegmentationRepresentations["Contour"] = "Contour";
88
+ SegmentationRepresentations["Surface"] = "Surface";
89
+ })(SegmentationRepresentations || (SegmentationRepresentations = {}));
90
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SegmentationRepresentations);
91
+
92
+
93
+ /***/ }),
94
+
95
+ /***/ 84093:
96
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
97
+
98
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
99
+ /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
100
+ /* harmony export */ });
101
+ var StrategyCallbacks;
102
+ (function (StrategyCallbacks) {
103
+ StrategyCallbacks["OnInteractionStart"] = "onInteractionStart";
104
+ StrategyCallbacks["OnInteractionEnd"] = "onInteractionEnd";
105
+ StrategyCallbacks["Preview"] = "preview";
106
+ StrategyCallbacks["RejectPreview"] = "rejectPreview";
107
+ StrategyCallbacks["AcceptPreview"] = "acceptPreview";
108
+ StrategyCallbacks["Fill"] = "fill";
109
+ StrategyCallbacks["StrategyFunction"] = "strategyFunction";
110
+ StrategyCallbacks["CreateIsInThreshold"] = "createIsInThreshold";
111
+ StrategyCallbacks["Initialize"] = "initialize";
112
+ StrategyCallbacks["INTERNAL_setValue"] = "setValue";
113
+ StrategyCallbacks["AddPreview"] = "addPreview";
114
+ StrategyCallbacks["ComputeInnerCircleRadius"] = "computeInnerCircleRadius";
115
+ StrategyCallbacks["GetStatistics"] = "getStatistics";
116
+ })(StrategyCallbacks || (StrategyCallbacks = {}));
117
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (StrategyCallbacks);
118
+
119
+
120
+ /***/ }),
121
+
122
+ /***/ 66452:
123
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
124
+
125
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
126
+ /* harmony export */ i: () => (/* binding */ MouseBindings),
127
+ /* harmony export */ q: () => (/* binding */ KeyboardBindings)
128
+ /* harmony export */ });
129
+ var MouseBindings;
130
+ (function (MouseBindings) {
131
+ MouseBindings[MouseBindings["Primary"] = 1] = "Primary";
132
+ MouseBindings[MouseBindings["Secondary"] = 2] = "Secondary";
133
+ MouseBindings[MouseBindings["Primary_And_Secondary"] = 3] = "Primary_And_Secondary";
134
+ MouseBindings[MouseBindings["Auxiliary"] = 4] = "Auxiliary";
135
+ MouseBindings[MouseBindings["Primary_And_Auxiliary"] = 5] = "Primary_And_Auxiliary";
136
+ MouseBindings[MouseBindings["Secondary_And_Auxiliary"] = 6] = "Secondary_And_Auxiliary";
137
+ MouseBindings[MouseBindings["Primary_And_Secondary_And_Auxiliary"] = 7] = "Primary_And_Secondary_And_Auxiliary";
138
+ MouseBindings[MouseBindings["Fourth_Button"] = 8] = "Fourth_Button";
139
+ MouseBindings[MouseBindings["Fifth_Button"] = 16] = "Fifth_Button";
140
+ MouseBindings[MouseBindings["Wheel"] = 524288] = "Wheel";
141
+ MouseBindings[MouseBindings["Wheel_Primary"] = 524289] = "Wheel_Primary";
142
+ })(MouseBindings || (MouseBindings = {}));
143
+ var KeyboardBindings;
144
+ (function (KeyboardBindings) {
145
+ KeyboardBindings[KeyboardBindings["Shift"] = 16] = "Shift";
146
+ KeyboardBindings[KeyboardBindings["Ctrl"] = 17] = "Ctrl";
147
+ KeyboardBindings[KeyboardBindings["Alt"] = 18] = "Alt";
148
+ KeyboardBindings[KeyboardBindings["Meta"] = 91] = "Meta";
149
+ KeyboardBindings[KeyboardBindings["ShiftCtrl"] = 1617] = "ShiftCtrl";
150
+ KeyboardBindings[KeyboardBindings["ShiftAlt"] = 1618] = "ShiftAlt";
151
+ KeyboardBindings[KeyboardBindings["ShiftMeta"] = 1691] = "ShiftMeta";
152
+ KeyboardBindings[KeyboardBindings["CtrlAlt"] = 1718] = "CtrlAlt";
153
+ KeyboardBindings[KeyboardBindings["CtrlMeta"] = 1791] = "CtrlMeta";
154
+ KeyboardBindings[KeyboardBindings["AltMeta"] = 1891] = "AltMeta";
155
+ })(KeyboardBindings || (KeyboardBindings = {}));
156
+
157
+
158
+
159
+ /***/ }),
160
+
161
+ /***/ 49892:
162
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
163
+
164
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
165
+ /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
166
+ /* harmony export */ });
167
+ var ToolModes;
168
+ (function (ToolModes) {
169
+ ToolModes["Active"] = "Active";
170
+ ToolModes["Passive"] = "Passive";
171
+ ToolModes["Enabled"] = "Enabled";
172
+ ToolModes["Disabled"] = "Disabled";
173
+ })(ToolModes || (ToolModes = {}));
174
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ToolModes);
175
+
176
+
177
+ /***/ }),
178
+
179
+ /***/ 10401:
180
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
181
+
182
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
183
+ /* harmony export */ H: () => (/* binding */ Swipe)
184
+ /* harmony export */ });
185
+ var Swipe;
186
+ (function (Swipe) {
187
+ Swipe["UP"] = "UP";
188
+ Swipe["DOWN"] = "DOWN";
189
+ Swipe["LEFT"] = "LEFT";
190
+ Swipe["RIGHT"] = "RIGHT";
191
+ })(Swipe || (Swipe = {}));
192
+
193
+
194
+
195
+ /***/ }),
196
+
197
+ /***/ 99737:
198
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
199
+
200
+ // ESM COMPAT FLAG
201
+ __webpack_require__.r(__webpack_exports__);
202
+
203
+ // EXPORTS
204
+ __webpack_require__.d(__webpack_exports__, {
205
+ AnnotationStyleStates: () => (/* reexport */ enums_AnnotationStyleStates),
206
+ ChangeTypes: () => (/* reexport */ ChangeTypes/* default */.A),
207
+ Events: () => (/* reexport */ Events/* default */.A),
208
+ KeyboardBindings: () => (/* reexport */ ToolBindings/* KeyboardBindings */.q),
209
+ MouseBindings: () => (/* reexport */ ToolBindings/* MouseBindings */.i),
210
+ SegmentationRepresentations: () => (/* reexport */ SegmentationRepresentations/* default */.A),
211
+ StrategyCallbacks: () => (/* reexport */ StrategyCallbacks/* default */.A),
212
+ Swipe: () => (/* reexport */ Touch/* Swipe */.H),
213
+ ToolModes: () => (/* reexport */ ToolModes/* default */.A),
214
+ WorkerTypes: () => (/* reexport */ WorkerTypes)
215
+ });
216
+
217
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/ToolBindings.js
218
+ var ToolBindings = __webpack_require__(66452);
219
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/ToolModes.js
220
+ var ToolModes = __webpack_require__(49892);
221
+ ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/AnnotationStyleStates.js
222
+ var AnnotationStyleStates;
223
+ (function (AnnotationStyleStates) {
224
+ AnnotationStyleStates["Default"] = "";
225
+ AnnotationStyleStates["Highlighted"] = "Highlighted";
226
+ AnnotationStyleStates["Selected"] = "Selected";
227
+ AnnotationStyleStates["Locked"] = "Locked";
228
+ AnnotationStyleStates["AutoGenerated"] = "AutoGenerated";
229
+ })(AnnotationStyleStates || (AnnotationStyleStates = {}));
230
+ /* harmony default export */ const enums_AnnotationStyleStates = (AnnotationStyleStates);
231
+
232
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/Events.js
233
+ var Events = __webpack_require__(94021);
234
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/SegmentationRepresentations.js
235
+ var SegmentationRepresentations = __webpack_require__(18682);
236
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/Touch.js
237
+ var Touch = __webpack_require__(10401);
238
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/StrategyCallbacks.js
239
+ var StrategyCallbacks = __webpack_require__(84093);
240
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/ChangeTypes.js
241
+ var ChangeTypes = __webpack_require__(75183);
242
+ ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/WorkerTypes.js
243
+ var WorkerTypes_ChangeTypes;
244
+ (function (ChangeTypes) {
245
+ ChangeTypes["POLYSEG_CONTOUR_TO_LABELMAP"] = "Converting Contour to Labelmap";
246
+ ChangeTypes["POLYSEG_SURFACE_TO_LABELMAP"] = "Converting Surfaces to Labelmap";
247
+ ChangeTypes["POLYSEG_CONTOUR_TO_SURFACE"] = "Converting Contour to Surface";
248
+ ChangeTypes["POLYSEG_LABELMAP_TO_SURFACE"] = "Converting Labelmap to Surface";
249
+ ChangeTypes["SURFACE_CLIPPING"] = "Clipping Surfaces";
250
+ })(WorkerTypes_ChangeTypes || (WorkerTypes_ChangeTypes = {}));
251
+ /* harmony default export */ const WorkerTypes = (WorkerTypes_ChangeTypes);
252
+
253
+ ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/index.js
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+
266
+ /***/ })
267
+
268
+ }]);
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- (self["webpackChunk"] = self["webpackChunk"] || []).push([[8295],{
2
+ (self["webpackChunk"] = self["webpackChunk"] || []).push([[3902],{
3
3
 
4
4
  /***/ 58295:
5
5
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
@@ -145,6 +145,8 @@ function _getStatusComponent({
145
145
  position: "bottom-left"
146
146
  }, /*#__PURE__*/react.createElement(StatusArea, null)), !ToolTipMessage && /*#__PURE__*/react.createElement(StatusArea, null));
147
147
  }
148
+ // EXTERNAL MODULE: ../../../extensions/cornerstone/src/index.tsx + 105 modules
149
+ var cornerstone_src = __webpack_require__(11185);
148
150
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/index.js + 2 modules
149
151
  var enums = __webpack_require__(99737);
150
152
  ;// CONCATENATED MODULE: ../../../extensions/cornerstone-dicom-seg/src/viewports/OHIFCornerstoneSEGViewport.tsx
@@ -156,6 +158,7 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
156
158
 
157
159
 
158
160
 
161
+
159
162
  const SEG_TOOLGROUP_BASE_NAME = 'SEGToolGroup';
160
163
  function OHIFCornerstoneSEGViewport(props) {
161
164
  const {
@@ -188,6 +191,9 @@ function OHIFCornerstoneSEGViewport(props) {
188
191
 
189
192
  // States
190
193
  const [selectedSegment, setSelectedSegment] = (0,react.useState)(1);
194
+ const {
195
+ setPositionPresentation
196
+ } = (0,cornerstone_src.usePositionPresentationStore)();
191
197
 
192
198
  // Hydration means that the SEG is opened and segments are loaded into the
193
199
  // segmentation panel, and SEG is also rendered on any viewport that is in the
@@ -323,6 +329,19 @@ function OHIFCornerstoneSEGViewport(props) {
323
329
  if (evt.segDisplaySet.displaySetInstanceUID === segDisplaySet.displaySetInstanceUID) {
324
330
  setSegIsLoading(false);
325
331
  }
332
+ if (segDisplaySet?.firstSegmentedSliceImageId && viewportOptions?.presentationIds) {
333
+ const {
334
+ firstSegmentedSliceImageId
335
+ } = segDisplaySet;
336
+ const {
337
+ presentationIds
338
+ } = viewportOptions;
339
+ setPositionPresentation(presentationIds.positionPresentationId, {
340
+ viewReference: {
341
+ referencedImageId: firstSegmentedSliceImageId
342
+ }
343
+ });
344
+ }
326
345
  });
327
346
  return () => {
328
347
  unsubscribe();
package/dist/3902.css ADDED
@@ -0,0 +1,2 @@
1
+ .viewport-overlay{max-width:40%}.viewport-overlay span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.viewport-overlay.left-viewport{text-align:left}.viewport-overlay.right-viewport-scrollbar{text-align:right}.viewport-overlay.right-viewport-scrollbar .flex.flex-row{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}
2
+ .dicom-upload-drop-area-border-dash{background-image:repeating-linear-gradient(90deg,#7bb2ce 0,#7bb2ce 50%,#0000 0,#0000),repeating-linear-gradient(90deg,#7bb2ce 0,#7bb2ce 50%,#0000 0,#0000),repeating-linear-gradient(180deg,#7bb2ce 0,#7bb2ce 50%,#0000 0,#0000),repeating-linear-gradient(180deg,#7bb2ce 0,#7bb2ce 50%,#0000 0,#0000);background-position:0 0,0 100%,0 0,100% 0;background-repeat:repeat-x,repeat-x,repeat-y,repeat-y;background-size:20px 3px,20px 3px,3px 20px,3px 20px}
@@ -112,7 +112,8 @@ function OHIFCornerstonePMAPViewport(props) {
112
112
  viewportOptions: {
113
113
  viewportType: 'volume',
114
114
  orientation: viewportOptions.orientation,
115
- viewportId: viewportOptions.viewportId
115
+ viewportId: viewportOptions.viewportId,
116
+ presentationIds: viewportOptions.presentationIds
116
117
  },
117
118
  displaySetOptions: [{}, pmapDisplaySetOptions]
118
119
  }));
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- (self["webpackChunk"] = self["webpackChunk"] || []).push([[3121],{
2
+ (self["webpackChunk"] = self["webpackChunk"] || []).push([[4438,4182],{
3
3
 
4
4
  /***/ 23121:
5
5
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
@@ -148,6 +148,8 @@ function createRTToolGroupAndAddTools(ToolGroupService, customizationService, to
148
148
  return ToolGroupService.createToolGroupAndAddTools(toolGroupId, tools);
149
149
  }
150
150
  /* harmony default export */ const initRTToolGroup = (createRTToolGroupAndAddTools);
151
+ // EXTERNAL MODULE: ../../../extensions/cornerstone/src/index.tsx + 105 modules
152
+ var cornerstone_src = __webpack_require__(11185);
151
153
  ;// CONCATENATED MODULE: ../../../extensions/cornerstone-dicom-rt/src/viewports/OHIFCornerstoneRTViewport.tsx
152
154
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
153
155
 
@@ -156,6 +158,7 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
156
158
 
157
159
 
158
160
 
161
+
159
162
  const RT_TOOLGROUP_BASE_NAME = 'RTToolGroup';
160
163
  function OHIFCornerstoneRTViewport(props) {
161
164
  const {
@@ -185,8 +188,10 @@ function OHIFCornerstoneRTViewport(props) {
185
188
  const [viewportGrid, viewportGridService] = (0,src/* useViewportGrid */.ih)();
186
189
 
187
190
  // States
188
- const [isToolGroupCreated, setToolGroupCreated] = (0,react.useState)(false);
189
191
  const [selectedSegment, setSelectedSegment] = (0,react.useState)(1);
192
+ const {
193
+ setPositionPresentation
194
+ } = (0,cornerstone_src.usePositionPresentationStore)();
190
195
 
191
196
  // Hydration means that the RT is opened and segments are loaded into the
192
197
  // segmentation panel, and RT is also rendered on any viewport that is in the
@@ -259,7 +264,8 @@ function OHIFCornerstoneRTViewport(props) {
259
264
  viewportType: 'stack',
260
265
  toolGroupId: toolGroupId,
261
266
  orientation: viewportOptions.orientation,
262
- viewportId: viewportOptions.viewportId
267
+ viewportId: viewportOptions.viewportId,
268
+ presentationIds: viewportOptions.presentationIds
263
269
  },
264
270
  onElementEnabled: evt => {
265
271
  props.onElementEnabled?.(evt);
@@ -311,6 +317,21 @@ function OHIFCornerstoneRTViewport(props) {
311
317
  if (evt.rtDisplaySet.displaySetInstanceUID === rtDisplaySet.displaySetInstanceUID) {
312
318
  setRtIsLoading(false);
313
319
  }
320
+ if (rtDisplaySet?.firstSegmentedSliceImageId && viewportOptions?.presentationIds) {
321
+ const {
322
+ firstSegmentedSliceImageId
323
+ } = rtDisplaySet;
324
+ const {
325
+ presentationIds
326
+ } = viewportOptions;
327
+ setPositionPresentation(presentationIds.positionPresentationId, {
328
+ viewportType: 'stack',
329
+ viewReference: {
330
+ referencedImageId: firstSegmentedSliceImageId
331
+ },
332
+ viewPresentation: {}
333
+ });
334
+ }
314
335
  if (evt.overlappingSegments) {
315
336
  uiNotificationService.show({
316
337
  title: 'Overlapping Segments',
@@ -365,7 +386,6 @@ function OHIFCornerstoneRTViewport(props) {
365
386
  return;
366
387
  }
367
388
  toolGroup = initRTToolGroup(toolGroupService, customizationService, toolGroupId);
368
- setToolGroupCreated(true);
369
389
  return () => {
370
390
  // remove the segmentation representations if seg displayset changed
371
391
  segmentationService.removeSegmentationRepresentations(viewportId);