@ohif/app 3.7.0-beta.3 → 3.7.0-beta.31

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 (36) hide show
  1. package/dist/{192.bundle.0c726af382d3543c4b38.js → 192.bundle.437b8b716d9d027f383e.js} +4 -4
  2. package/dist/{199.bundle.c0fece90238b6d10ad4f.js → 199.bundle.b08fbd94c0186647e049.js} +2 -7
  3. package/dist/{208.bundle.54f8de35977f52b22748.js → 208.bundle.9b2d3b5d75c2c0f43e70.js} +4 -4
  4. package/dist/{270.bundle.4564621556b0f963a004.js → 270.bundle.a4ff08f18e3da39a030b.js} +38 -21
  5. package/dist/{283.bundle.c524b775270eb9b9a29d.js → 283.bundle.6e153ec9b7609d3c4859.js} +56 -31
  6. package/dist/{331.bundle.bd0c13931a21d53086c9.js → 331.bundle.0293a1135afc1a55d93c.js} +51 -27
  7. package/dist/{351.bundle.2d4bc19d8b493879dbbe.js → 351.bundle.444e1c32785871760302.js} +13 -5
  8. package/dist/{404.bundle.4ba2218c79879896e1a1.js → 404.bundle.023841457eed83901687.js} +9 -16
  9. package/dist/{55.bundle.5f5e5ef9087b0beee35c.js → 55.bundle.3fdadd0823a136eb4585.js} +4 -4
  10. package/dist/{569.bundle.0ed8d8178ffd43fe1c34.js → 569.bundle.ee136cf6526a6380633c.js} +23 -12
  11. package/dist/{581.bundle.360d26f97b37da8faec3.js → 581.bundle.ab8d1f1e75de3c98dd10.js} +7 -6
  12. package/dist/{616.bundle.47aa54689d63182bdfee.js → 616.bundle.92ef9e9f942614d7a922.js} +6 -6
  13. package/dist/{642.bundle.faa2a274c048b4a03f7b.js → 642.bundle.ceeb34930c151f3c639a.js} +2 -2
  14. package/dist/{707.bundle.1afe6110707874b8cf51.js → 707.bundle.a94ee141dd57c0ba7688.js} +64 -74
  15. package/dist/{728.bundle.d13856835357400fef82.js → 728.bundle.75a919489af5ae4c237b.js} +2 -2
  16. package/dist/{744.bundle.65fc31577a6e256cee48.js → 744.bundle.d4c39357e4c35b9a5486.js} +61 -88
  17. package/dist/{790.bundle.1a495a74713a89fe8ed3.js → 790.bundle.2511b5d4e3b4fdba1fd3.js} +4 -4
  18. package/dist/{799.bundle.ca18bdf4abe4d9abea26.js → 799.bundle.620e1df13daf7b31cb3f.js} +55 -7
  19. package/dist/{82.bundle.676384db0c287bb33ccc.js → 82.bundle.2bafd42bc36f68564a5d.js} +46 -41
  20. package/dist/{917.bundle.9a90fd465c79251cccf2.js → 917.bundle.c2bf32418d1db4f5cab6.js} +2 -2
  21. package/dist/945.min.worker.js +1 -1
  22. package/dist/945.min.worker.js.map +1 -1
  23. package/dist/{953.bundle.9e3a7225f07336bfcb41.js → 953.bundle.4b8fee7d9484456a99b5.js} +4 -3
  24. package/dist/{973.bundle.2fbaf4e727ddfd0133bc.js → 973.bundle.1fa4fbe95385cbe0949c.js} +2 -2
  25. package/dist/{976.bundle.e458c629c9a5b88ad24d.js → 976.bundle.89213652c61b1c3005fc.js} +6 -6
  26. package/dist/{984.bundle.73d54e6c776dff3e5655.js → 984.bundle.dc002660242b73d2a2ef.js} +4 -4
  27. package/dist/app-config.js +1 -2
  28. package/dist/{app.bundle.52c0651f988911290f44.js → app.bundle.37926819e3f47b00eb9f.js} +823 -273
  29. package/dist/app.bundle.css +1 -1
  30. package/dist/cornerstoneDICOMImageLoader.min.js +1 -1
  31. package/dist/cornerstoneDICOMImageLoader.min.js.map +1 -1
  32. package/dist/google.js +1 -1
  33. package/dist/index.html +1 -1
  34. package/dist/sw.js +1 -1
  35. package/package.json +19 -19
  36. /package/dist/{50.bundle.3afbee0a5a14c8d1ae4e.js → 50.bundle.623c5b165c5d250d60dd.js} +0 -0
@@ -14,10 +14,10 @@ __webpack_require__.d(__webpack_exports__, {
14
14
  toolbarButtons: () => (/* reexport */ src_toolbarButtons)
15
15
  });
16
16
 
17
- // EXTERNAL MODULE: ../../core/src/index.ts + 101 modules
18
- var src = __webpack_require__(48501);
19
- // EXTERNAL MODULE: ../../ui/src/index.js + 449 modules
20
- var ui_src = __webpack_require__(43803);
17
+ // EXTERNAL MODULE: ../../core/src/index.ts + 102 modules
18
+ var src = __webpack_require__(62771);
19
+ // EXTERNAL MODULE: ../../ui/src/index.js + 452 modules
20
+ var ui_src = __webpack_require__(28619);
21
21
  ;// CONCATENATED MODULE: ../../../modes/longitudinal/src/toolbarButtons.js
22
22
  // TODO: torn, can either bake this here; or have to create a whole new button type
23
23
  // Only ways that you can pass in a custom React component for render :l
@@ -22,8 +22,8 @@ const SOPClassHandlerId = `${id}.sopClassHandlerModule.${SOPClassHandlerName}`;
22
22
 
23
23
  // EXTERNAL MODULE: ../../../node_modules/react/index.js
24
24
  var react = __webpack_require__(32735);
25
- // EXTERNAL MODULE: ../../core/src/index.ts + 101 modules
26
- var src = __webpack_require__(48501);
25
+ // EXTERNAL MODULE: ../../core/src/index.ts + 102 modules
26
+ var src = __webpack_require__(62771);
27
27
  // EXTERNAL MODULE: ../../../node_modules/dcmjs/build/dcmjs.es.js
28
28
  var dcmjs_es = __webpack_require__(22737);
29
29
  ;// CONCATENATED MODULE: ../../../extensions/cornerstone-dicom-rt/src/loadRTStruct.js
@@ -159,11 +159,6 @@ async function loadRTStruct(extensionManager, rtStructDisplaySet, referencedDisp
159
159
  NumberOfContourPoints,
160
160
  ContourGeometricType
161
161
  } = ContourSequenceArray[c];
162
- const sopInstanceUID = ContourImageSequence.ReferencedSOPInstanceUID;
163
- const imageId = _getImageId(imageIdSopInstanceUidPairs, sopInstanceUID);
164
- if (!imageId) {
165
- continue;
166
- }
167
162
  let isSupported = false;
168
163
  const points = [];
169
164
  for (let p = 0; p < NumberOfContourPoints * 3; p += 3) {
@@ -12,10 +12,10 @@ __webpack_require__.d(__webpack_exports__, {
12
12
  "default": () => (/* binding */ basic_test_mode_src)
13
13
  });
14
14
 
15
- // EXTERNAL MODULE: ../../core/src/index.ts + 101 modules
16
- var src = __webpack_require__(48501);
17
- // EXTERNAL MODULE: ../../ui/src/index.js + 449 modules
18
- var ui_src = __webpack_require__(43803);
15
+ // EXTERNAL MODULE: ../../core/src/index.ts + 102 modules
16
+ var src = __webpack_require__(62771);
17
+ // EXTERNAL MODULE: ../../ui/src/index.js + 452 modules
18
+ var ui_src = __webpack_require__(28619);
19
19
  ;// CONCATENATED MODULE: ../../../modes/basic-test-mode/src/toolbarButtons.js
20
20
  // TODO: torn, can either bake this here; or have to create a whole new button type
21
21
  // Only ways that you can pass in a custom React component for render :l
@@ -5561,7 +5561,7 @@ class AnnotationTool extends base_AnnotationDisplayTool {
5561
5561
  if (viewport instanceof esm.BaseVolumeViewport) {
5562
5562
  const volumeId = targetId.split('volumeId:')[1];
5563
5563
  const volume = esm.cache.getVolume(volumeId);
5564
- return volume.scaling?.PET !== undefined;
5564
+ return volume.scaling?.PT !== undefined;
5565
5565
  }
5566
5566
  else if (viewport instanceof esm.StackViewport) {
5567
5567
  const scalingModule = imageId && esm.metaData.get('scalingModule', imageId);
@@ -8483,6 +8483,7 @@ function _applyShift(viewport, delta) {
8483
8483
 
8484
8484
 
8485
8485
 
8486
+
8486
8487
  class MIPJumpToClickTool extends base_BaseTool {
8487
8488
  constructor(toolProps = {}, defaultToolProps = {
8488
8489
  supportedInteractionTypes: ['Mouse', 'Touch'],
@@ -8512,9 +8513,16 @@ class MIPJumpToClickTool extends base_BaseTool {
8512
8513
  if (!brightestPoint || !brightestPoint.length) {
8513
8514
  return;
8514
8515
  }
8515
- const { targetViewportIds } = this.configuration;
8516
- targetViewportIds.forEach((viewportId) => {
8517
- const viewport = renderingEngine.getViewport(viewportId);
8516
+ const { targetViewportIds, toolGroupId } = this.configuration;
8517
+ const viewports = renderingEngine.getViewports().filter((vp) => {
8518
+ if (targetViewportIds?.indexOf(vp.id) >= 0)
8519
+ return true;
8520
+ const foundToolGroup = ToolGroupManager_getToolGroupForViewport(vp.id, renderingEngine.id);
8521
+ if (toolGroupId && toolGroupId === foundToolGroup?.id)
8522
+ return true;
8523
+ return false;
8524
+ });
8525
+ viewports.forEach((viewport) => {
8518
8526
  if (viewport instanceof esm.VolumeViewport) {
8519
8527
  jumpToWorld(viewport, brightestPoint);
8520
8528
  }
@@ -11977,10 +11985,10 @@ class ProbeTool extends base_AnnotationTool {
11977
11985
  const values = {};
11978
11986
  values['value'] = value;
11979
11987
  if (modality === 'PT' &&
11980
- imageVolume.scaling?.PET &&
11981
- (imageVolume.scaling.PET.suvbwToSuvbsa ||
11982
- imageVolume.scaling.PET.suvbwToSuvlbm)) {
11983
- const { suvbwToSuvlbm, suvbwToSuvbsa } = imageVolume.scaling.PET;
11988
+ imageVolume.scaling?.PT &&
11989
+ (imageVolume.scaling.PT.suvbwToSuvbsa ||
11990
+ imageVolume.scaling.PT.suvbwToSuvlbm)) {
11991
+ const { suvbwToSuvlbm, suvbwToSuvbsa } = imageVolume.scaling.PT;
11984
11992
  values['SUVBw'] = value;
11985
11993
  if (suvbwToSuvlbm) {
11986
11994
  const SUVLbm = value * suvbwToSuvlbm;
@@ -14775,7 +14783,10 @@ function completeDrawClosedContour(element) {
14775
14783
  const worldPoints = updatedPoints.map((canvasPoint) => viewport.canvasToWorld(canvasPoint));
14776
14784
  annotation.data.polyline = worldPoints;
14777
14785
  annotation.data.isOpenContour = false;
14778
- this.triggerAnnotationCompleted(annotation);
14786
+ const { textBox } = annotation.data.handles;
14787
+ if (!textBox.hasMoved) {
14788
+ this.triggerAnnotationCompleted(annotation);
14789
+ }
14779
14790
  this.isDrawing = false;
14780
14791
  this.drawData = undefined;
14781
14792
  this.commonData = undefined;
@@ -14808,6 +14819,7 @@ function completeDrawOpenContour(element) {
14808
14819
  const worldPoints = updatedPoints.map((canvasPoint) => viewport.canvasToWorld(canvasPoint));
14809
14820
  annotation.data.polyline = worldPoints;
14810
14821
  annotation.data.isOpenContour = true;
14822
+ const { textBox } = annotation.data.handles;
14811
14823
  annotation.data.handles.points = [
14812
14824
  worldPoints[0],
14813
14825
  worldPoints[worldPoints.length - 1],
@@ -14816,7 +14828,9 @@ function completeDrawOpenContour(element) {
14816
14828
  annotation.data.openUShapeContourVectorToPeak =
14817
14829
  findOpenUShapedContourVectorToPeak(canvasPoints, viewport);
14818
14830
  }
14819
- this.triggerAnnotationCompleted(annotation);
14831
+ if (!textBox.hasMoved) {
14832
+ this.triggerAnnotationCompleted(annotation);
14833
+ }
14820
14834
  this.isDrawing = false;
14821
14835
  this.drawData = undefined;
14822
14836
  this.commonData = undefined;
@@ -15257,6 +15271,7 @@ function completeClosedContourEdit(element) {
15257
15271
  const worldPoints = updatedPoints.map((canvasPoint) => viewport.canvasToWorld(canvasPoint));
15258
15272
  annotation.data.polyline = worldPoints;
15259
15273
  annotation.data.isOpenContour = false;
15274
+ annotation.invalidated = true;
15260
15275
  this.triggerAnnotationModified(annotation, enabledElement);
15261
15276
  }
15262
15277
  this.isEditingClosed = false;
@@ -15565,6 +15580,7 @@ function completeOpenContourEdit(element) {
15565
15580
  annotation.data.openUShapeContourVectorToPeak =
15566
15581
  findOpenUShapedContourVectorToPeak(fusedCanvasPoints, viewport);
15567
15582
  }
15583
+ annotation.invalidated = true;
15568
15584
  this.triggerAnnotationModified(annotation, enabledElement);
15569
15585
  }
15570
15586
  this.isEditingOpen = false;
@@ -16171,6 +16187,7 @@ class PlanarFreehandROITool extends base_AnnotationTool {
16171
16187
  areaUnit: hasPixelSpacing ? 'mm' : 'px',
16172
16188
  };
16173
16189
  }
16190
+ this.triggerAnnotationModified(annotation, enabledElement);
16174
16191
  annotation.invalidated = false;
16175
16192
  return cachedStats;
16176
16193
  };
@@ -16299,7 +16316,6 @@ PlanarFreehandROITool.toolName = 'PlanarFreehandROI';
16299
16316
 
16300
16317
 
16301
16318
 
16302
-
16303
16319
  class ArrowAnnotateTool extends base_AnnotationTool {
16304
16320
  constructor(toolProps = {}, defaultToolProps = {
16305
16321
  supportedInteractionTypes: ['Mouse', 'Touch'],
@@ -16646,7 +16662,7 @@ class ArrowAnnotateTool extends base_AnnotationTool {
16646
16662
  continue;
16647
16663
  }
16648
16664
  if (!data.handles.textBox.hasMoved) {
16649
- const canvasTextBoxCoords = getTextBoxCoordsCanvas(canvasCoordinates);
16665
+ const canvasTextBoxCoords = canvasCoordinates[1];
16650
16666
  data.handles.textBox.worldPosition =
16651
16667
  viewport.canvasToWorld(canvasTextBoxCoords);
16652
16668
  }
@@ -16731,7 +16747,6 @@ ArrowAnnotateTool.toolName = 'ArrowAnnotate';
16731
16747
 
16732
16748
 
16733
16749
 
16734
-
16735
16750
  class AngleTool extends base_AnnotationTool {
16736
16751
  constructor(toolProps = {}, defaultToolProps = {
16737
16752
  supportedInteractionTypes: ['Mouse', 'Touch'],
@@ -17064,7 +17079,7 @@ class AngleTool extends base_AnnotationTool {
17064
17079
  }
17065
17080
  const textLines = this._getTextLines(data, targetId);
17066
17081
  if (!data.handles.textBox.hasMoved) {
17067
- const canvasTextBoxCoords = getTextBoxCoordsCanvas(canvasCoordinates);
17082
+ const canvasTextBoxCoords = canvasCoordinates[1];
17068
17083
  data.handles.textBox.worldPosition =
17069
17084
  viewport.canvasToWorld(canvasTextBoxCoords);
17070
17085
  }
@@ -22848,21 +22863,23 @@ function createCameraPositionSynchronizer(synchronizerName) {
22848
22863
 
22849
22864
  function voiSyncCallback(synchronizerInstance, sourceViewport, targetViewport, voiModifiedEvent) {
22850
22865
  const eventDetail = voiModifiedEvent.detail;
22851
- const { volumeId, range } = eventDetail;
22866
+ const { volumeId, range, invertStateChanged, invert } = eventDetail;
22852
22867
  const renderingEngine = (0,esm.getRenderingEngine)(targetViewport.renderingEngineId);
22853
22868
  if (!renderingEngine) {
22854
22869
  throw new Error(`Rendering Engine does not exist: ${targetViewport.renderingEngineId}`);
22855
22870
  }
22856
22871
  const tViewport = renderingEngine.getViewport(targetViewport.viewportId);
22872
+ const tProperties = {
22873
+ voiRange: range,
22874
+ };
22875
+ if (invertStateChanged) {
22876
+ tProperties.invert = invert;
22877
+ }
22857
22878
  if (tViewport instanceof esm.VolumeViewport) {
22858
- tViewport.setProperties({
22859
- voiRange: range,
22860
- }, volumeId);
22879
+ tViewport.setProperties(tProperties, volumeId);
22861
22880
  }
22862
22881
  else if (tViewport instanceof esm.StackViewport) {
22863
- tViewport.setProperties({
22864
- voiRange: range,
22865
- });
22882
+ tViewport.setProperties(tProperties);
22866
22883
  }
22867
22884
  else {
22868
22885
  throw new Error('Viewport type not supported.');
@@ -233,19 +233,25 @@ const fusionAXIAL = {
233
233
  displaySets: [{
234
234
  id: 'ctDisplaySet'
235
235
  }, {
236
+ id: 'ptDisplaySet',
236
237
  options: {
237
238
  colormap: {
238
239
  name: 'hsv',
239
- opacityMapping: [{
240
+ opacity: [{
241
+ value: 0,
242
+ opacity: 0
243
+ }, {
240
244
  value: 0.1,
241
245
  opacity: 0.9
246
+ }, {
247
+ value: 1,
248
+ opacity: 0.95
242
249
  }]
243
250
  },
244
251
  voi: {
245
252
  custom: 'getPTVOIRange'
246
253
  }
247
- },
248
- id: 'ptDisplaySet'
254
+ }
249
255
  }]
250
256
  };
251
257
  const fusionSAGITTAL = {
@@ -283,19 +289,25 @@ const fusionSAGITTAL = {
283
289
  displaySets: [{
284
290
  id: 'ctDisplaySet'
285
291
  }, {
292
+ id: 'ptDisplaySet',
286
293
  options: {
287
294
  colormap: {
288
295
  name: 'hsv',
289
- opacityMapping: [{
296
+ opacity: [{
297
+ value: 0,
298
+ opacity: 0
299
+ }, {
290
300
  value: 0.1,
291
301
  opacity: 0.9
302
+ }, {
303
+ value: 1,
304
+ opacity: 0.95
292
305
  }]
293
306
  },
294
307
  voi: {
295
308
  custom: 'getPTVOIRange'
296
309
  }
297
- },
298
- id: 'ptDisplaySet'
310
+ }
299
311
  }]
300
312
  };
301
313
  const fusionCORONAL = {
@@ -333,19 +345,25 @@ const fusionCORONAL = {
333
345
  displaySets: [{
334
346
  id: 'ctDisplaySet'
335
347
  }, {
348
+ id: 'ptDisplaySet',
336
349
  options: {
337
350
  colormap: {
338
351
  name: 'hsv',
339
- opacityMapping: [{
352
+ opacity: [{
353
+ value: 0,
354
+ opacity: 0
355
+ }, {
340
356
  value: 0.1,
341
357
  opacity: 0.9
358
+ }, {
359
+ value: 1,
360
+ opacity: 0.95
342
361
  }]
343
362
  },
344
363
  voi: {
345
364
  custom: 'getPTVOIRange'
346
365
  }
347
- },
348
- id: 'ptDisplaySet'
366
+ }
349
367
  }]
350
368
  };
351
369
  const mipSAGITTAL = {
@@ -658,10 +676,10 @@ var react = __webpack_require__(32735);
658
676
  // EXTERNAL MODULE: ../../../node_modules/prop-types/index.js
659
677
  var prop_types = __webpack_require__(60216);
660
678
  var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
661
- // EXTERNAL MODULE: ../../ui/src/index.js + 449 modules
662
- var src = __webpack_require__(43803);
663
- // EXTERNAL MODULE: ../../core/src/index.ts + 101 modules
664
- var core_src = __webpack_require__(48501);
679
+ // EXTERNAL MODULE: ../../ui/src/index.js + 452 modules
680
+ var src = __webpack_require__(28619);
681
+ // EXTERNAL MODULE: ../../core/src/index.ts + 102 modules
682
+ var core_src = __webpack_require__(62771);
665
683
  // EXTERNAL MODULE: ../../../node_modules/react-i18next/dist/es/index.js + 15 modules
666
684
  var es = __webpack_require__(21572);
667
685
  ;// CONCATENATED MODULE: ../../../extensions/tmtv/src/Panels/PanelPetSUV.tsx
@@ -875,7 +893,6 @@ function PanelPetSUV(_ref) {
875
893
  value: metadata.SeriesTime || '',
876
894
  onChange: () => {}
877
895
  }), /*#__PURE__*/react.createElement(src/* Button */.zx, {
878
- color: "primary",
879
896
  onClick: updateMetadata
880
897
  }, "Reload Data"))));
881
898
  }
@@ -960,28 +977,24 @@ function segmentationItemEditHandler(_ref) {
960
977
  });
961
978
  }
962
979
  };
963
- return /*#__PURE__*/react.createElement("div", {
964
- className: "p-4 bg-primary-dark"
965
- }, /*#__PURE__*/react.createElement(src/* Input */.II, {
980
+ return /*#__PURE__*/react.createElement(src/* Input */.II, {
966
981
  autoFocus: true,
967
- className: "mt-2 bg-black border-primary-main",
982
+ className: "bg-black border-primary-main",
968
983
  type: "text",
969
984
  containerClassName: "mr-2",
970
985
  value: value.label,
971
986
  onChange: onChangeHandler,
972
987
  onKeyPress: onKeyPressHandler
973
- }));
988
+ });
974
989
  },
975
- actions: [
976
- // temp: swap button types until colors are updated
977
- {
990
+ actions: [{
978
991
  id: 'cancel',
979
992
  text: 'Cancel',
980
- type: 'primary'
993
+ type: src/* ButtonEnums.type */.LZ.U.secondary
981
994
  }, {
982
995
  id: 'save',
983
996
  text: 'Save',
984
- type: 'secondary'
997
+ type: src/* ButtonEnums.type */.LZ.U.primary
985
998
  }],
986
999
  onSubmit: onSubmitHandler
987
1000
  }
@@ -1007,7 +1020,7 @@ function ExportReports(_ref) {
1007
1020
  }, /*#__PURE__*/react.createElement(src/* ButtonGroup */.hE, {
1008
1021
  color: "black",
1009
1022
  size: "inherit"
1010
- }, /*#__PURE__*/react.createElement(src/* Button */.zx, {
1023
+ }, /*#__PURE__*/react.createElement(src/* LegacyButton */.mN, {
1011
1024
  className: "px-2 py-2 text-base",
1012
1025
  disabled: tmtvValue === null,
1013
1026
  onClick: () => {
@@ -1020,7 +1033,7 @@ function ExportReports(_ref) {
1020
1033
  }, t('Export CSV'))), /*#__PURE__*/react.createElement(src/* ButtonGroup */.hE, {
1021
1034
  color: "black",
1022
1035
  size: "inherit"
1023
- }, /*#__PURE__*/react.createElement(src/* Button */.zx, {
1036
+ }, /*#__PURE__*/react.createElement(src/* LegacyButton */.mN, {
1024
1037
  className: "px-2 py-2 text-base",
1025
1038
  onClick: () => {
1026
1039
  commandsManager.runCommand('createTMTVRTReport');
@@ -1079,13 +1092,13 @@ function ROIThresholdConfiguration(_ref) {
1079
1092
  }
1080
1093
  })), /*#__PURE__*/react.createElement("div", {
1081
1094
  className: "w-1/2"
1082
- }, /*#__PURE__*/react.createElement(src/* ButtonGroup */.hE, null, /*#__PURE__*/react.createElement(src/* Button */.zx, {
1095
+ }, /*#__PURE__*/react.createElement(src/* ButtonGroup */.hE, null, /*#__PURE__*/react.createElement(src/* LegacyButton */.mN, {
1083
1096
  size: "initial",
1084
1097
  className: "px-2 py-2 text-base text-white",
1085
1098
  color: "primaryLight",
1086
1099
  variant: "outlined",
1087
1100
  onClick: () => runCommand('setStartSliceForROIThresholdTool')
1088
- }, t('Start')), /*#__PURE__*/react.createElement(src/* Button */.zx, {
1101
+ }, t('Start')), /*#__PURE__*/react.createElement(src/* LegacyButton */.mN, {
1089
1102
  size: "initial",
1090
1103
  color: "primaryLight",
1091
1104
  variant: "outlined",
@@ -1367,7 +1380,6 @@ function PanelRoiThresholdSegmentation(_ref) {
1367
1380
  }, /*#__PURE__*/react.createElement("div", {
1368
1381
  className: "flex mx-4 my-4 mb-4 space-x-4"
1369
1382
  }, /*#__PURE__*/react.createElement(src/* Button */.zx, {
1370
- color: "primary",
1371
1383
  onClick: () => {
1372
1384
  setLabelmapLoading(true);
1373
1385
  setTimeout(() => {
@@ -1378,7 +1390,6 @@ function PanelRoiThresholdSegmentation(_ref) {
1378
1390
  });
1379
1391
  }
1380
1392
  }, labelmapLoading ? 'loading ...' : 'New Label'), /*#__PURE__*/react.createElement(src/* Button */.zx, {
1381
- color: "primary",
1382
1393
  onClick: handleROIThresholding
1383
1394
  }, "Run")), /*#__PURE__*/react.createElement("div", {
1384
1395
  className: "flex items-center justify-around h-8 mb-2 border-t outline-none cursor-pointer select-none bg-secondary-dark first:border-0 border-secondary-light",
@@ -2783,7 +2794,21 @@ const commandsModule = _ref => {
2783
2794
  commandsManager.runCommand('setViewportColormap', {
2784
2795
  viewportIndex,
2785
2796
  displaySetInstanceUID: ptDisplaySet.displaySetInstanceUID,
2786
- colormap
2797
+ colormap: {
2798
+ name: colormap,
2799
+ // TODO: This opacity mapping matches that in hpViewports, but
2800
+ // ideally making this editable in a side panel would be useful
2801
+ opacity: [{
2802
+ value: 0,
2803
+ opacity: 0
2804
+ }, {
2805
+ value: 0.1,
2806
+ opacity: 0.9
2807
+ }, {
2808
+ value: 1,
2809
+ opacity: 0.95
2810
+ }]
2811
+ }
2787
2812
  });
2788
2813
  viewports.push(cornerstoneViewportService.getCornerstoneViewport(viewportId));
2789
2814
  });
@@ -2592,7 +2592,8 @@ let useSharedArrayBuffer = true;
2592
2592
  let sharedArrayBufferMode = enums_SharedArrayBufferModes.TRUE;
2593
2593
 
2594
2594
  const defaultConfig = {
2595
- detectGPU: {},
2595
+ gpuTier: undefined,
2596
+ detectGPUConfig: {},
2596
2597
  rendering: {
2597
2598
  useCPURendering: false,
2598
2599
  preferSizeOverAccuracy: false,
@@ -2601,7 +2602,8 @@ const defaultConfig = {
2601
2602
  },
2602
2603
  };
2603
2604
  let config = {
2604
- detectGPU: {},
2605
+ gpuTier: undefined,
2606
+ detectGPUConfig: {},
2605
2607
  rendering: {
2606
2608
  useCPURendering: false,
2607
2609
  preferSizeOverAccuracy: false,
@@ -2644,10 +2646,10 @@ async function init(configuration = {}) {
2644
2646
  config.rendering.useCPURendering = true;
2645
2647
  }
2646
2648
  else {
2647
- const gpuTier = await f();
2648
- config.detectGPU = gpuTier;
2649
- console.log('CornerstoneRender: Using detect-gpu to get the GPU benchmark:', gpuTier);
2650
- if (gpuTier.tier < 1) {
2649
+ config.gpuTier =
2650
+ config.gpuTier || (await f(config.detectGPUConfig));
2651
+ console.log('CornerstoneRender: Using detect-gpu to get the GPU benchmark:', config.gpuTier);
2652
+ if (config.gpuTier.tier < 1) {
2651
2653
  console.log('CornerstoneRender: GPU is not powerful enough, using CPU rendering');
2652
2654
  config.rendering.useCPURendering = true;
2653
2655
  }
@@ -26967,7 +26969,7 @@ class ImageVolume {
26967
26969
  constructor(props) {
26968
26970
  this._imageIdsIndexMap = new Map();
26969
26971
  this._imageURIsIndexMap = new Map();
26970
- this.isPrescaled = false;
26972
+ this.isPreScaled = false;
26971
26973
  this.volumeId = props.volumeId;
26972
26974
  this.metadata = props.metadata;
26973
26975
  this.dimensions = props.dimensions;
@@ -46342,8 +46344,7 @@ class BaseVolumeViewport extends RenderingEngine_Viewport {
46342
46344
  const cfun = volumeActor.getProperty().getRGBTransferFunction(0);
46343
46345
  const [lower, upper] = this.VOILUTFunction === 'SIGMOID'
46344
46346
  ? getVoiFromSigmoidRGBTransferFunction(cfun)
46345
- :
46346
- cfun.getRange();
46347
+ : cfun.getRange();
46347
46348
  return { volumeId, voiRange: { lower, upper } };
46348
46349
  })
46349
46350
  .filter(Boolean);
@@ -46499,8 +46500,8 @@ class BaseVolumeViewport extends RenderingEngine_Viewport {
46499
46500
  const mapper = volumeActor.getMapper();
46500
46501
  mapper.setSampleDistance(1.0);
46501
46502
  const cfun = ColorTransferFunction/* default.newInstance */.ZP.newInstance();
46502
- let colormapObj = colormap_getColormap(colormap);
46503
- const { name, opacityMapping } = colormap;
46503
+ let colormapObj = colormap_getColormap(colormap.name);
46504
+ const { name } = colormap;
46504
46505
  if (!colormapObj) {
46505
46506
  colormapObj = ColorMaps_vtkColorMaps.getPresetByName(name);
46506
46507
  }
@@ -46514,16 +46515,28 @@ class BaseVolumeViewport extends RenderingEngine_Viewport {
46514
46515
  cfun.applyColorMap(colormapObj);
46515
46516
  cfun.setMappingRange(range[0], range[1]);
46516
46517
  volumeActor.getProperty().setRGBTransferFunction(0, cfun);
46517
- const ofun = PiecewiseFunction/* default.newInstance */.ZP.newInstance();
46518
- ofun.addPoint(range[0], 0.0);
46519
- ofun.addPoint(range[1], 1.0);
46520
- volumeActor.getProperty().setScalarOpacity(0, ofun);
46521
- if (!opacityMapping) {
46518
+ }
46519
+ setOpacity(colormap, volumeId) {
46520
+ const applicableVolumeActorInfo = this._getApplicableVolumeActor(volumeId);
46521
+ if (!applicableVolumeActorInfo) {
46522
46522
  return;
46523
46523
  }
46524
- opacityMapping.forEach(({ opacity, value }) => {
46525
- ofun.addPoint(value, opacity);
46526
- });
46524
+ const { volumeActor } = applicableVolumeActorInfo;
46525
+ const ofun = PiecewiseFunction/* default.newInstance */.ZP.newInstance();
46526
+ if (typeof colormap.opacity === 'number') {
46527
+ const range = volumeActor
46528
+ .getProperty()
46529
+ .getRGBTransferFunction(0)
46530
+ .getRange();
46531
+ ofun.addPoint(range[0], colormap.opacity);
46532
+ ofun.addPoint(range[1], colormap.opacity);
46533
+ }
46534
+ else {
46535
+ colormap.opacity.forEach(({ opacity, value }) => {
46536
+ ofun.addPoint(value, opacity);
46537
+ });
46538
+ }
46539
+ volumeActor.getProperty().setScalarOpacity(0, ofun);
46527
46540
  }
46528
46541
  setInvert(invert, volumeId, suppressEvents) {
46529
46542
  const applicableVolumeActorInfo = this._getApplicableVolumeActor(volumeId);
@@ -46542,6 +46555,7 @@ class BaseVolumeViewport extends RenderingEngine_Viewport {
46542
46555
  volumeId: volumeIdToUse,
46543
46556
  VOILUTFunction: this.VOILUTFunction,
46544
46557
  invert: this.inverted,
46558
+ invertStateChanged: true,
46545
46559
  };
46546
46560
  triggerEvent(this.element, enums_Events.VOI_MODIFIED, eventDetail);
46547
46561
  }
@@ -46598,9 +46612,12 @@ class BaseVolumeViewport extends RenderingEngine_Viewport {
46598
46612
  }
46599
46613
  }
46600
46614
  setProperties({ voiRange, VOILUTFunction, invert, colormap, preset, } = {}, volumeId, suppressEvents = false) {
46601
- if (colormap !== undefined) {
46615
+ if (colormap?.name) {
46602
46616
  this.setColormap(colormap, volumeId, suppressEvents);
46603
46617
  }
46618
+ if (colormap?.opacity != null) {
46619
+ this.setOpacity(colormap, volumeId);
46620
+ }
46604
46621
  if (voiRange !== undefined) {
46605
46622
  this.setVOI(voiRange, volumeId, suppressEvents);
46606
46623
  }
@@ -49021,18 +49038,18 @@ class StackViewport extends RenderingEngine_Viewport {
49021
49038
  triggerEvent(this.element, enums_Events.VOI_MODIFIED, eventDetail);
49022
49039
  }
49023
49040
  _addScalingToViewport(imageIdScalingFactor) {
49024
- if (this.scaling.PET) {
49041
+ if (this.scaling.PT) {
49025
49042
  return;
49026
49043
  }
49027
49044
  const { suvbw, suvlbm, suvbsa } = imageIdScalingFactor;
49028
- const petScaling = {};
49045
+ const ptScaling = {};
49029
49046
  if (suvlbm) {
49030
- petScaling.suvbwToSuvlbm = suvlbm / suvbw;
49047
+ ptScaling.suvbwToSuvlbm = suvlbm / suvbw;
49031
49048
  }
49032
49049
  if (suvbsa) {
49033
- petScaling.suvbwToSuvbsa = suvbsa / suvbw;
49050
+ ptScaling.suvbwToSuvbsa = suvbsa / suvbw;
49034
49051
  }
49035
- this.scaling.PET = petScaling;
49052
+ this.scaling.PT = ptScaling;
49036
49053
  }
49037
49054
  _getNumCompsFromPhotometricInterpretation(photometricInterpretation) {
49038
49055
  let numberOfComponents = 1;
@@ -49295,6 +49312,10 @@ class StackViewport extends RenderingEngine_Viewport {
49295
49312
  if (this.currentImageIdIndex !== imageIdIndex) {
49296
49313
  return;
49297
49314
  }
49315
+ if (this.csImage?.imageFrame?.photometricInterpretation !==
49316
+ image.imageFrame?.photometricInterpretation) {
49317
+ this.stackInvalidated = true;
49318
+ }
49298
49319
  this._setCSImage(image);
49299
49320
  const eventDetail = {
49300
49321
  image,
@@ -49406,8 +49427,11 @@ class StackViewport extends RenderingEngine_Viewport {
49406
49427
  this.resetCameraNoEvent();
49407
49428
  this.triggerCameraEvent(this.getCamera(), previousCameraProps);
49408
49429
  activeCamera.setFreezeFocalPoint(true);
49409
- this.setVOI(this._getInitialVOIRange(image));
49410
- this.setInvertColor(imagePixelModule.photometricInterpretation === 'MONOCHROME1');
49430
+ const monochrome1 = imagePixelModule.photometricInterpretation === 'MONOCHROME1';
49431
+ this.setVOI(this._getInitialVOIRange(image), {
49432
+ forceRecreateLUTFunction: !!monochrome1,
49433
+ });
49434
+ this.setInvertColor(!!monochrome1);
49411
49435
  this.cameraFocalPointOnRender = this.getCamera().focalPoint;
49412
49436
  this.stackInvalidated = false;
49413
49437
  if (this._publishCalibratedEvent) {
@@ -23,10 +23,10 @@ var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
23
23
  var esm = __webpack_require__(57270);
24
24
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 335 modules
25
25
  var dist_esm = __webpack_require__(77331);
26
- // EXTERNAL MODULE: ../../core/src/index.ts + 101 modules
27
- var src = __webpack_require__(48501);
28
- // EXTERNAL MODULE: ../../ui/src/index.js + 449 modules
29
- var ui_src = __webpack_require__(43803);
26
+ // EXTERNAL MODULE: ../../core/src/index.ts + 102 modules
27
+ var src = __webpack_require__(62771);
28
+ // EXTERNAL MODULE: ../../ui/src/index.js + 452 modules
29
+ var ui_src = __webpack_require__(28619);
30
30
  // EXTERNAL MODULE: ../../../extensions/cornerstone/src/state.ts
31
31
  var state = __webpack_require__(21922);
32
32
  ;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/Viewport/OHIFCornerstoneViewport.css
@@ -549,7 +549,7 @@ function _getViewportInstance(viewportData, imageIndex) {
549
549
  if (viewportData.viewportType === dist_esm.Enums.ViewportType.STACK) {
550
550
  imageId = viewportData.data.imageIds[imageIndex];
551
551
  } else if (viewportData.viewportType === dist_esm.Enums.ViewportType.ORTHOGRAPHIC) {
552
- const volumes = viewportData.volumes;
552
+ const volumes = viewportData.data;
553
553
  if (volumes && volumes.length == 1) {
554
554
  const volume = volumes[0];
555
555
  imageId = volume.imageIds[imageIndex];
@@ -1040,6 +1040,7 @@ const OHIFCornerstoneViewport = /*#__PURE__*/react.memo(props => {
1040
1040
  servicesManager,
1041
1041
  onElementEnabled,
1042
1042
  onElementDisabled,
1043
+ isJumpToMeasurementDisabled,
1043
1044
  // Note: you SHOULD NOT use the initialImageIdOrIndex for manipulation
1044
1045
  // of the imageData in the OHIFCornerstoneViewport. This prop is used
1045
1046
  // to set the initial state of the viewport's first image to render
@@ -1284,6 +1285,9 @@ const OHIFCornerstoneViewport = /*#__PURE__*/react.memo(props => {
1284
1285
  * the cache for jumping to see if there is any jump queued, then we jump to the correct slice.
1285
1286
  */
1286
1287
  (0,react.useEffect)(() => {
1288
+ if (isJumpToMeasurementDisabled) {
1289
+ return;
1290
+ }
1287
1291
  const unsubscribeFromJumpToMeasurementEvents = _subscribeToJumpToMeasurementEvents(measurementService, displaySetService, elementRef, viewportIndex, displaySets, viewportGridService, cornerstoneViewportService);
1288
1292
  _checkForCachedJumpToMeasurementEvents(measurementService, displaySetService, elementRef, viewportIndex, displaySets, viewportGridService, cornerstoneViewportService);
1289
1293
  return () => {
@@ -1451,6 +1455,9 @@ function _jumpToMeasurement(measurement, targetElementRef, viewportIndex, measur
1451
1455
 
1452
1456
  // Component displayName
1453
1457
  OHIFCornerstoneViewport.displayName = 'OHIFCornerstoneViewport';
1458
+ OHIFCornerstoneViewport.defaultProps = {
1459
+ isJumpToMeasurementDisabled: false
1460
+ };
1454
1461
  OHIFCornerstoneViewport.propTypes = {
1455
1462
  viewportIndex: (prop_types_default()).number.isRequired,
1456
1463
  displaySets: (prop_types_default()).array.isRequired,
@@ -1459,6 +1466,7 @@ OHIFCornerstoneViewport.propTypes = {
1459
1466
  displaySetOptions: prop_types_default().arrayOf((prop_types_default()).any),
1460
1467
  servicesManager: (prop_types_default()).object.isRequired,
1461
1468
  onElementEnabled: (prop_types_default()).func,
1469
+ isJumpToMeasurementDisabled: (prop_types_default()).bool,
1462
1470
  // Note: you SHOULD NOT use the initialImageIdOrIndex for manipulation
1463
1471
  // of the imageData in the OHIFCornerstoneViewport. This prop is used
1464
1472
  // to set the initial state of the viewport's first image to render