@cornerstonejs/tools 2.0.0-beta.17 → 2.0.0-beta.19

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 (118) hide show
  1. package/dist/esm/eventListeners/segmentation/imageChangeEventListener.js +11 -14
  2. package/dist/esm/eventListeners/segmentation/labelmap/onLabelmapSegmentationDataModified.js +26 -27
  3. package/dist/esm/eventListeners/segmentation/segmentationDataModifiedEventListener.js +1 -4
  4. package/dist/esm/eventListeners/segmentation/segmentationModifiedEventListener.js +2 -11
  5. package/dist/esm/eventListeners/segmentation/segmentationRepresentationModifiedEventListener.js +10 -2
  6. package/dist/esm/eventListeners/segmentation/segmentationRepresentationRemovedEventListener.js +2 -2
  7. package/dist/esm/index.d.ts +2 -2
  8. package/dist/esm/index.js +2 -2
  9. package/dist/esm/stateManagement/index.d.ts +3 -3
  10. package/dist/esm/stateManagement/index.js +2 -2
  11. package/dist/esm/stateManagement/segmentation/SegmentationStateManager.d.ts +19 -18
  12. package/dist/esm/stateManagement/segmentation/SegmentationStateManager.js +87 -130
  13. package/dist/esm/stateManagement/segmentation/activeSegmentation.d.ts +4 -5
  14. package/dist/esm/stateManagement/segmentation/activeSegmentation.js +6 -23
  15. package/dist/esm/stateManagement/segmentation/addRepresentation.d.ts +3 -0
  16. package/dist/esm/stateManagement/segmentation/addRepresentation.js +51 -0
  17. package/dist/esm/stateManagement/segmentation/addRepresentations.d.ts +3 -0
  18. package/dist/esm/stateManagement/segmentation/addRepresentations.js +9 -0
  19. package/dist/esm/stateManagement/segmentation/config/index.d.ts +2 -2
  20. package/dist/esm/stateManagement/segmentation/config/index.js +2 -2
  21. package/dist/esm/stateManagement/segmentation/config/segmentationColor.d.ts +4 -4
  22. package/dist/esm/stateManagement/segmentation/config/segmentationColor.js +10 -10
  23. package/dist/esm/stateManagement/segmentation/config/segmentationConfig.d.ts +8 -8
  24. package/dist/esm/stateManagement/segmentation/config/segmentationConfig.js +19 -13
  25. package/dist/esm/stateManagement/segmentation/config/segmentationVisibility.d.ts +7 -6
  26. package/dist/esm/stateManagement/segmentation/config/segmentationVisibility.js +29 -54
  27. package/dist/esm/stateManagement/segmentation/convertStackToVolumeSegmentation.d.ts +1 -1
  28. package/dist/esm/stateManagement/segmentation/convertStackToVolumeSegmentation.js +5 -5
  29. package/dist/esm/stateManagement/segmentation/convertVolumeToStackSegmentation.d.ts +3 -3
  30. package/dist/esm/stateManagement/segmentation/convertVolumeToStackSegmentation.js +5 -5
  31. package/dist/esm/stateManagement/segmentation/helpers/getRepresentationRenderingConfig.d.ts +2 -0
  32. package/dist/esm/stateManagement/segmentation/helpers/{getRepresentationSpecificConfig.js → getRepresentationRenderingConfig.js} +1 -1
  33. package/dist/esm/stateManagement/segmentation/index.d.ts +3 -3
  34. package/dist/esm/stateManagement/segmentation/index.js +3 -3
  35. package/dist/esm/stateManagement/segmentation/polySeg/Contour/contourComputationStrategies.js +2 -4
  36. package/dist/esm/stateManagement/segmentation/polySeg/Surface/createAndCacheSurfacesFromRaw.js +5 -6
  37. package/dist/esm/stateManagement/segmentation/polySeg/Surface/updateSurfaceData.js +4 -4
  38. package/dist/esm/stateManagement/segmentation/polySeg/canComputeRequestedRepresentation.js +2 -6
  39. package/dist/esm/stateManagement/segmentation/removeRepresentationsFromViewport.d.ts +2 -0
  40. package/dist/esm/stateManagement/segmentation/removeRepresentationsFromViewport.js +23 -0
  41. package/dist/esm/stateManagement/segmentation/segmentIndex.js +6 -4
  42. package/dist/esm/stateManagement/segmentation/segmentationState.d.ts +23 -20
  43. package/dist/esm/stateManagement/segmentation/segmentationState.js +68 -95
  44. package/dist/esm/stateManagement/segmentation/triggerSegmentationEvents.d.ts +2 -2
  45. package/dist/esm/stateManagement/segmentation/triggerSegmentationEvents.js +4 -18
  46. package/dist/esm/store/ToolGroupManager/destroyToolGroup.js +0 -4
  47. package/dist/esm/tools/AdvancedMagnifyViewport.js +3 -3
  48. package/dist/esm/tools/ScaleOverlayTool.d.ts +1 -1
  49. package/dist/esm/tools/annotation/BidirectionalTool.js +6 -7
  50. package/dist/esm/tools/annotation/CircleROITool.js +14 -14
  51. package/dist/esm/tools/annotation/DragProbeTool.js +3 -3
  52. package/dist/esm/tools/annotation/EllipticalROITool.js +12 -12
  53. package/dist/esm/tools/annotation/LengthTool.js +2 -2
  54. package/dist/esm/tools/annotation/PlanarFreehandROITool.js +13 -15
  55. package/dist/esm/tools/annotation/ProbeTool.js +10 -10
  56. package/dist/esm/tools/annotation/RectangleROITool.js +12 -12
  57. package/dist/esm/tools/annotation/SplineROITool.js +5 -5
  58. package/dist/esm/tools/base/ContourSegmentationBaseTool.d.ts +0 -1
  59. package/dist/esm/tools/base/ContourSegmentationBaseTool.js +42 -33
  60. package/dist/esm/tools/displayTools/Contour/contourDisplay.d.ts +4 -4
  61. package/dist/esm/tools/displayTools/Contour/contourDisplay.js +17 -30
  62. package/dist/esm/tools/displayTools/Contour/contourHandler/handleContourSegmentation.d.ts +4 -4
  63. package/dist/esm/tools/displayTools/Contour/contourHandler/handleContourSegmentation.js +20 -11
  64. package/dist/esm/tools/displayTools/Contour/contourHandler/utils.d.ts +0 -2
  65. package/dist/esm/tools/displayTools/Contour/contourHandler/utils.js +0 -11
  66. package/dist/esm/tools/displayTools/Contour/removeContourFromElement.d.ts +1 -1
  67. package/dist/esm/tools/displayTools/Contour/removeContourFromElement.js +3 -3
  68. package/dist/esm/tools/displayTools/Labelmap/labelmapDisplay.d.ts +5 -5
  69. package/dist/esm/tools/displayTools/Labelmap/labelmapDisplay.js +51 -54
  70. package/dist/esm/tools/displayTools/SegmentationRenderingEngine.d.ts +19 -0
  71. package/dist/esm/tools/displayTools/SegmentationRenderingEngine.js +136 -0
  72. package/dist/esm/tools/displayTools/Surface/surfaceDisplay.d.ts +5 -5
  73. package/dist/esm/tools/displayTools/Surface/surfaceDisplay.js +14 -25
  74. package/dist/esm/tools/index.d.ts +1 -2
  75. package/dist/esm/tools/index.js +1 -2
  76. package/dist/esm/tools/segmentation/BrushTool.d.ts +15 -2
  77. package/dist/esm/tools/segmentation/BrushTool.js +13 -14
  78. package/dist/esm/tools/segmentation/CircleScissorsTool.js +3 -4
  79. package/dist/esm/tools/segmentation/PaintFillTool.js +1 -2
  80. package/dist/esm/tools/segmentation/RectangleScissorsTool.js +3 -4
  81. package/dist/esm/tools/segmentation/SegmentSelectTool.d.ts +3 -2
  82. package/dist/esm/tools/segmentation/SegmentSelectTool.js +5 -5
  83. package/dist/esm/tools/segmentation/SphereScissorsTool.js +4 -5
  84. package/dist/esm/tools/segmentation/strategies/compositions/preview.js +2 -2
  85. package/dist/esm/types/EventTypes.d.ts +0 -3
  86. package/dist/esm/types/SegmentationStateTypes.d.ts +24 -23
  87. package/dist/esm/types/ToolSpecificAnnotationTypes.d.ts +2 -2
  88. package/dist/esm/types/index.d.ts +2 -2
  89. package/dist/esm/utilities/getCalibratedUnits.d.ts +6 -0
  90. package/dist/esm/utilities/getCalibratedUnits.js +16 -8
  91. package/dist/esm/utilities/getPixelValueUnits.d.ts +6 -0
  92. package/dist/esm/utilities/{getModalityUnit.js → getPixelValueUnits.js} +2 -2
  93. package/dist/esm/utilities/segmentation/getSegmentIndexAtLabelmapBorder.d.ts +7 -0
  94. package/dist/esm/utilities/segmentation/{getSegmentAtLabelmapBorder.js → getSegmentIndexAtLabelmapBorder.js} +3 -3
  95. package/dist/esm/utilities/segmentation/getSegmentIndexAtWorldPoint.d.ts +11 -0
  96. package/dist/esm/utilities/segmentation/{getSegmentAtWorldPoint.js → getSegmentIndexAtWorldPoint.js} +7 -7
  97. package/dist/esm/utilities/segmentation/index.d.ts +3 -3
  98. package/dist/esm/utilities/segmentation/index.js +3 -3
  99. package/dist/esm/utilities/segmentation/triggerSegmentationRender.d.ts +2 -17
  100. package/dist/esm/utilities/segmentation/triggerSegmentationRender.js +4 -106
  101. package/dist/esm/utilities/segmentation/triggerSegmentationRenderForViewports.d.ts +3 -0
  102. package/dist/esm/utilities/segmentation/triggerSegmentationRenderForViewports.js +6 -0
  103. package/dist/esm/utilities/triggerAnnotationRenderForViewportIds.js +7 -2
  104. package/dist/umd/index.js +1 -1
  105. package/dist/umd/index.js.map +1 -1
  106. package/package.json +3 -4
  107. package/dist/esm/stateManagement/segmentation/addSegmentationRepresentation.d.ts +0 -3
  108. package/dist/esm/stateManagement/segmentation/addSegmentationRepresentation.js +0 -63
  109. package/dist/esm/stateManagement/segmentation/addSegmentationRepresentations.d.ts +0 -3
  110. package/dist/esm/stateManagement/segmentation/addSegmentationRepresentations.js +0 -14
  111. package/dist/esm/stateManagement/segmentation/helpers/getRepresentationSpecificConfig.d.ts +0 -2
  112. package/dist/esm/stateManagement/segmentation/removeSegmentationsFromToolGroup.d.ts +0 -2
  113. package/dist/esm/stateManagement/segmentation/removeSegmentationsFromToolGroup.js +0 -39
  114. package/dist/esm/tools/displayTools/SegmentationDisplayTool.d.ts +0 -13
  115. package/dist/esm/tools/displayTools/SegmentationDisplayTool.js +0 -101
  116. package/dist/esm/utilities/getModalityUnit.d.ts +0 -6
  117. package/dist/esm/utilities/segmentation/getSegmentAtLabelmapBorder.d.ts +0 -7
  118. package/dist/esm/utilities/segmentation/getSegmentAtWorldPoint.d.ts +0 -11
@@ -17,7 +17,7 @@ import { pointInEllipse, getCanvasEllipseCorners, } from '../../utilities/math/e
17
17
  import { resetElementCursor, hideElementCursor, } from '../../cursors/elementCursor';
18
18
  import triggerAnnotationRenderForViewportIds from '../../utilities/triggerAnnotationRenderForViewportIds';
19
19
  import { pointInShapeCallback } from '../../utilities/';
20
- import { getModalityUnit } from '../../utilities/getModalityUnit';
20
+ import { getPixelValueUnits } from '../../utilities/getPixelValueUnits';
21
21
  import { isViewportPreScaled } from '../../utilities/viewport/isViewportPreScaled';
22
22
  import { BasicStatsCalculator } from '../../utilities/math/basic';
23
23
  const { transformWorldToIndex } = csUtils;
@@ -428,14 +428,14 @@ class EllipticalROITool extends AnnotationTool {
428
428
  const canvasCorners = (getCanvasEllipseCorners(canvasCoordinates));
429
429
  const { centerPointRadius } = this.configuration;
430
430
  if (!data.cachedStats[targetId] ||
431
- data.cachedStats[targetId].areaUnit == null) {
431
+ data.cachedStats[targetId].areaUnits == null) {
432
432
  data.cachedStats[targetId] = {
433
433
  Modality: null,
434
434
  area: null,
435
435
  max: null,
436
436
  mean: null,
437
437
  stdDev: null,
438
- areaUnit: null,
438
+ areaUnits: null,
439
439
  };
440
440
  this._calculateCachedStats(annotation, viewport, renderingEngine);
441
441
  }
@@ -592,11 +592,11 @@ class EllipticalROITool extends AnnotationTool {
592
592
  const area = Math.abs(Math.PI * (worldWidth / 2) * (worldHeight / 2)) /
593
593
  scale /
594
594
  scale;
595
- const modalityUnitOptions = {
595
+ const pixelUnitsOptions = {
596
596
  isPreScaled: isViewportPreScaled(viewport, targetId),
597
597
  isSuvScaled: this.isSuvScaled(viewport, targetId, annotation.metadata.referencedImageId),
598
598
  };
599
- const modalityUnit = getModalityUnit(metadata.Modality, annotation.metadata.referencedImageId, modalityUnitOptions);
599
+ const pixelValueUnits = getPixelValueUnits(metadata.Modality, annotation.metadata.referencedImageId, pixelUnitsOptions);
600
600
  const pointsInShape = pointInShapeCallback(imageData, (pointLPS) => pointInEllipse(ellipseObj, pointLPS, { fast: true }), this.configuration.statsCalculator.statsCallback, boundsIJK);
601
601
  const stats = this.configuration.statsCalculator.getStatistics();
602
602
  cachedStats[targetId] = {
@@ -608,8 +608,8 @@ class EllipticalROITool extends AnnotationTool {
608
608
  statsArray: stats.array,
609
609
  pointsInShape,
610
610
  isEmptyArea,
611
- areaUnit: areaUnits,
612
- modalityUnit,
611
+ areaUnits,
612
+ pixelValueUnits,
613
613
  };
614
614
  }
615
615
  annotation.invalidated = false;
@@ -647,22 +647,22 @@ class EllipticalROITool extends AnnotationTool {
647
647
  }
648
648
  function defaultGetTextLines(data, targetId) {
649
649
  const cachedVolumeStats = data.cachedStats[targetId];
650
- const { area, mean, stdDev, max, isEmptyArea, areaUnit, modalityUnit } = cachedVolumeStats;
650
+ const { area, mean, stdDev, max, isEmptyArea, areaUnits, pixelValueUnits } = cachedVolumeStats;
651
651
  const textLines = [];
652
652
  if (area) {
653
653
  const areaLine = isEmptyArea
654
654
  ? `Area: Oblique not supported`
655
- : `Area: ${roundNumber(area)} ${areaUnit}`;
655
+ : `Area: ${roundNumber(area)} ${areaUnits}`;
656
656
  textLines.push(areaLine);
657
657
  }
658
658
  if (mean) {
659
- textLines.push(`Mean: ${roundNumber(mean)} ${modalityUnit}`);
659
+ textLines.push(`Mean: ${roundNumber(mean)} ${pixelValueUnits}`);
660
660
  }
661
661
  if (max) {
662
- textLines.push(`Max: ${roundNumber(max)} ${modalityUnit}`);
662
+ textLines.push(`Max: ${roundNumber(max)} ${pixelValueUnits}`);
663
663
  }
664
664
  if (stdDev) {
665
- textLines.push(`Std Dev: ${roundNumber(stdDev)} ${modalityUnit}`);
665
+ textLines.push(`Std Dev: ${roundNumber(stdDev)} ${pixelValueUnits}`);
666
666
  }
667
667
  return textLines;
668
668
  }
@@ -393,14 +393,14 @@ class LengthTool extends AnnotationTool {
393
393
  const index1 = transformWorldToIndex(imageData, worldPos1);
394
394
  const index2 = transformWorldToIndex(imageData, worldPos2);
395
395
  const handles = [index1, index2];
396
- const { scale, units } = getCalibratedLengthUnitsAndScale(image, handles);
396
+ const { scale, lengthUnits } = getCalibratedLengthUnitsAndScale(image, handles);
397
397
  const length = this._calculateLength(worldPos1, worldPos2) / scale;
398
398
  this._isInsideVolume(index1, index2, dimensions)
399
399
  ? (this.isHandleOutsideImage = false)
400
400
  : (this.isHandleOutsideImage = true);
401
401
  cachedStats[targetId] = {
402
402
  length,
403
- unit: units,
403
+ lengthUnits,
404
404
  };
405
405
  }
406
406
  annotation.invalidated = false;
@@ -19,7 +19,7 @@ import { getTextBoxCoordsCanvas } from '../../utilities/drawing';
19
19
  import { getLineSegmentIntersectionsCoordinates } from '../../utilities/math/polyline';
20
20
  import pointInShapeCallback from '../../utilities/pointInShapeCallback';
21
21
  import { isViewportPreScaled } from '../../utilities/viewport/isViewportPreScaled';
22
- import { getModalityUnit } from '../../utilities/getModalityUnit';
22
+ import { getPixelValueUnits } from '../../utilities/getPixelValueUnits';
23
23
  import { BasicStatsCalculator } from '../../utilities/math/basic';
24
24
  import calculatePerimeter from '../../utilities/contours/calculatePerimeter';
25
25
  import ContourSegmentationBaseTool from '../base/ContourSegmentationBaseTool';
@@ -70,8 +70,6 @@ class PlanarFreehandROITool extends ContourSegmentationBaseTool {
70
70
  this.addNewAnnotation = (evt) => {
71
71
  const eventDetail = evt.detail;
72
72
  const { element } = eventDetail;
73
- const enabledElement = getEnabledElement(element);
74
- const { renderingEngine } = enabledElement;
75
73
  const annotation = this.createAnnotation(evt);
76
74
  this.addAnnotation(annotation, element);
77
75
  const viewportIdsToRender = getViewportIdsWithToolToRender(element, this.getToolName());
@@ -251,11 +249,11 @@ class PlanarFreehandROITool extends ContourSegmentationBaseTool {
251
249
  }
252
250
  return result;
253
251
  }, this.configuration.statsCalculator.statsCallback, boundsIJK);
254
- const modalityUnitOptions = {
252
+ const pixelUnitsOptions = {
255
253
  isPreScaled: isViewportPreScaled(viewport, targetId),
256
254
  isSuvScaled: this.isSuvScaled(viewport, targetId, annotation.metadata.referencedImageId),
257
255
  };
258
- const modalityUnit = getModalityUnit(metadata.Modality, annotation.metadata.referencedImageId, modalityUnitOptions);
256
+ const pixelValueUnits = getPixelValueUnits(metadata.Modality, annotation.metadata.referencedImageId, pixelUnitsOptions);
259
257
  const stats = this.configuration.statsCalculator.getStatistics();
260
258
  cachedStats[targetId] = {
261
259
  Modality: metadata.Modality,
@@ -266,8 +264,8 @@ class PlanarFreehandROITool extends ContourSegmentationBaseTool {
266
264
  stdDev: stats.stdDev?.value,
267
265
  statsArray: stats.array,
268
266
  pointsInShape: pointsInShape,
269
- areaUnit: areaUnits,
270
- modalityUnit,
267
+ areaUnits,
268
+ pixelValueUnits,
271
269
  };
272
270
  }
273
271
  triggerAnnotationModified(annotation, enabledElement.viewport.element, ChangeTypes.StatsUpdated);
@@ -445,14 +443,14 @@ class PlanarFreehandROITool extends ContourSegmentationBaseTool {
445
443
  if (!this.commonData?.movingTextBox) {
446
444
  const { data } = annotation;
447
445
  if (!data.cachedStats[targetId] ||
448
- data.cachedStats[targetId].areaUnit == null) {
446
+ data.cachedStats[targetId].areaUnits == null) {
449
447
  data.cachedStats[targetId] = {
450
448
  Modality: null,
451
449
  area: null,
452
450
  max: null,
453
451
  mean: null,
454
452
  stdDev: null,
455
- areaUnit: null,
453
+ areaUnits: null,
456
454
  };
457
455
  this._calculateCachedStats(annotation, viewport, renderingEngine, enabledElement);
458
456
  }
@@ -464,25 +462,25 @@ class PlanarFreehandROITool extends ContourSegmentationBaseTool {
464
462
  }
465
463
  function defaultGetTextLines(data, targetId) {
466
464
  const cachedVolumeStats = data.cachedStats[targetId];
467
- const { area, mean, stdDev, perimeter, max, isEmptyArea, areaUnit, modalityUnit, } = cachedVolumeStats || {};
465
+ const { area, mean, stdDev, perimeter, max, isEmptyArea, areaUnits, pixelValueUnits, } = cachedVolumeStats || {};
468
466
  const textLines = [];
469
467
  if (area) {
470
468
  const areaLine = isEmptyArea
471
469
  ? `Area: Oblique not supported`
472
- : `Area: ${roundNumber(area)} ${areaUnit}`;
470
+ : `Area: ${roundNumber(area)} ${areaUnits}`;
473
471
  textLines.push(areaLine);
474
472
  }
475
473
  if (mean) {
476
- textLines.push(`Mean: ${roundNumber(mean)} ${modalityUnit}`);
474
+ textLines.push(`Mean: ${roundNumber(mean)} ${pixelValueUnits}`);
477
475
  }
478
476
  if (max) {
479
- textLines.push(`Max: ${roundNumber(max)} ${modalityUnit}`);
477
+ textLines.push(`Max: ${roundNumber(max)} ${pixelValueUnits}`);
480
478
  }
481
479
  if (stdDev) {
482
- textLines.push(`Std Dev: ${roundNumber(stdDev)} ${modalityUnit}`);
480
+ textLines.push(`Std Dev: ${roundNumber(stdDev)} ${pixelValueUnits}`);
483
481
  }
484
482
  if (perimeter) {
485
- textLines.push(`Perimeter: ${roundNumber(perimeter)} ${modalityUnit}`);
483
+ textLines.push(`Perimeter: ${roundNumber(perimeter)} ${pixelValueUnits}`);
486
484
  }
487
485
  return textLines;
488
486
  }
@@ -11,7 +11,7 @@ import { getViewportIdsWithToolToRender } from '../../utilities/viewportFilters'
11
11
  import { roundNumber } from '../../utilities';
12
12
  import { resetElementCursor, hideElementCursor, } from '../../cursors/elementCursor';
13
13
  import triggerAnnotationRenderForViewportIds from '../../utilities/triggerAnnotationRenderForViewportIds';
14
- import { getModalityUnit, } from '../../utilities/getModalityUnit';
14
+ import { getPixelValueUnits, } from '../../utilities/getPixelValueUnits';
15
15
  import { isViewportPreScaled } from '../../utilities/viewport/isViewportPreScaled';
16
16
  const { transformWorldToIndex } = csUtils;
17
17
  class ProbeTool extends AnnotationTool {
@@ -257,7 +257,7 @@ class ProbeTool extends AnnotationTool {
257
257
  const targetIds = Object.keys(cachedStats);
258
258
  for (let i = 0; i < targetIds.length; i++) {
259
259
  const targetId = targetIds[i];
260
- const modalityUnitOptions = {
260
+ const pixelUnitsOptions = {
261
261
  isPreScaled: isViewportPreScaled(viewport, targetId),
262
262
  isSuvScaled: this.isSuvScaled(viewport, targetId, annotation.metadata.referencedImageId),
263
263
  };
@@ -294,25 +294,25 @@ class ProbeTool extends AnnotationTool {
294
294
  const viewport = viewports[0];
295
295
  index[2] = viewport.getCurrentImageIdIndex();
296
296
  }
297
- let modalityUnit;
297
+ let pixelValueUnits;
298
298
  if (modality === 'US') {
299
299
  const calibratedResults = getCalibratedProbeUnitsAndValue(image, [
300
300
  index,
301
301
  ]);
302
302
  const hasEnhancedRegionValues = calibratedResults.values.every((value) => value !== null);
303
303
  value = hasEnhancedRegionValues ? calibratedResults.values : value;
304
- modalityUnit = hasEnhancedRegionValues
304
+ pixelValueUnits = hasEnhancedRegionValues
305
305
  ? calibratedResults.units
306
306
  : 'raw';
307
307
  }
308
308
  else {
309
- modalityUnit = getModalityUnit(modality, annotation.metadata.referencedImageId, modalityUnitOptions);
309
+ pixelValueUnits = getPixelValueUnits(modality, annotation.metadata.referencedImageId, pixelUnitsOptions);
310
310
  }
311
311
  cachedStats[targetId] = {
312
312
  index,
313
313
  value,
314
314
  Modality: modality,
315
- modalityUnit,
315
+ pixelValueUnits,
316
316
  };
317
317
  }
318
318
  else {
@@ -330,19 +330,19 @@ class ProbeTool extends AnnotationTool {
330
330
  }
331
331
  function defaultGetTextLines(data, targetId) {
332
332
  const cachedVolumeStats = data.cachedStats[targetId];
333
- const { index, value, modalityUnit } = cachedVolumeStats;
333
+ const { index, value, pixelValueUnits } = cachedVolumeStats;
334
334
  if (value === undefined) {
335
335
  return;
336
336
  }
337
337
  const textLines = [];
338
338
  textLines.push(`(${index[0]}, ${index[1]}, ${index[2]})`);
339
- if (value instanceof Array && modalityUnit instanceof Array) {
339
+ if (value instanceof Array && pixelValueUnits instanceof Array) {
340
340
  for (let i = 0; i < value.length; i++) {
341
- textLines.push(`${roundNumber(value[i])} ${modalityUnit[i]}`);
341
+ textLines.push(`${roundNumber(value[i])} ${pixelValueUnits[i]}`);
342
342
  }
343
343
  }
344
344
  else {
345
- textLines.push(`${roundNumber(value)} ${modalityUnit}`);
345
+ textLines.push(`${roundNumber(value)} ${pixelValueUnits}`);
346
346
  }
347
347
  return textLines;
348
348
  }
@@ -16,7 +16,7 @@ import { getTextBoxCoordsCanvas } from '../../utilities/drawing';
16
16
  import getWorldWidthAndHeightFromCorners from '../../utilities/planar/getWorldWidthAndHeightFromCorners';
17
17
  import { resetElementCursor, hideElementCursor, } from '../../cursors/elementCursor';
18
18
  import triggerAnnotationRenderForViewportIds from '../../utilities/triggerAnnotationRenderForViewportIds';
19
- import { getModalityUnit } from '../../utilities/getModalityUnit';
19
+ import { getPixelValueUnits } from '../../utilities/getPixelValueUnits';
20
20
  import { isViewportPreScaled } from '../../utilities/viewport/isViewportPreScaled';
21
21
  import { pointInShapeCallback } from '../../utilities/';
22
22
  import { BasicStatsCalculator } from '../../utilities/math/basic';
@@ -347,14 +347,14 @@ class RectangleROITool extends AnnotationTool {
347
347
  });
348
348
  const { viewPlaneNormal, viewUp } = viewport.getCamera();
349
349
  if (!data.cachedStats[targetId] ||
350
- data.cachedStats[targetId].areaUnit == null) {
350
+ data.cachedStats[targetId].areaUnits == null) {
351
351
  data.cachedStats[targetId] = {
352
352
  Modality: null,
353
353
  area: null,
354
354
  max: null,
355
355
  mean: null,
356
356
  stdDev: null,
357
- areaUnit: null,
357
+ areaUnits: null,
358
358
  };
359
359
  this._calculateCachedStats(annotation, viewPlaneNormal, viewUp, renderingEngine, enabledElement);
360
360
  }
@@ -490,11 +490,11 @@ class RectangleROITool extends AnnotationTool {
490
490
  const handles = [pos1Index, pos2Index];
491
491
  const { scale, areaUnits } = getCalibratedLengthUnitsAndScale(image, handles);
492
492
  const area = Math.abs(worldWidth * worldHeight) / (scale * scale);
493
- const modalityUnitOptions = {
493
+ const pixelUnitsOptions = {
494
494
  isPreScaled: isViewportPreScaled(viewport, targetId),
495
495
  isSuvScaled: this.isSuvScaled(viewport, targetId, annotation.metadata.referencedImageId),
496
496
  };
497
- const modalityUnit = getModalityUnit(metadata.Modality, annotation.metadata.referencedImageId, modalityUnitOptions);
497
+ const pixelValueUnits = getPixelValueUnits(metadata.Modality, annotation.metadata.referencedImageId, pixelUnitsOptions);
498
498
  const pointsInShape = pointInShapeCallback(imageData, () => true, this.configuration.statsCalculator.statsCallback, boundsIJK);
499
499
  const stats = this.configuration.statsCalculator.getStatistics();
500
500
  cachedStats[targetId] = {
@@ -505,8 +505,8 @@ class RectangleROITool extends AnnotationTool {
505
505
  max: stats.max?.value,
506
506
  statsArray: stats.array,
507
507
  pointsInShape: pointsInShape,
508
- areaUnit: areaUnits,
509
- modalityUnit,
508
+ areaUnits,
509
+ pixelValueUnits,
510
510
  };
511
511
  }
512
512
  else {
@@ -529,15 +529,15 @@ class RectangleROITool extends AnnotationTool {
529
529
  }
530
530
  function defaultGetTextLines(data, targetId) {
531
531
  const cachedVolumeStats = data.cachedStats[targetId];
532
- const { area, mean, max, stdDev, areaUnit, modalityUnit } = cachedVolumeStats;
532
+ const { area, mean, max, stdDev, areaUnits, pixelValueUnits } = cachedVolumeStats;
533
533
  if (mean === undefined) {
534
534
  return;
535
535
  }
536
536
  const textLines = [];
537
- textLines.push(`Area: ${roundNumber(area)} ${areaUnit}`);
538
- textLines.push(`Mean: ${roundNumber(mean)} ${modalityUnit}`);
539
- textLines.push(`Max: ${roundNumber(max)} ${modalityUnit}`);
540
- textLines.push(`Std Dev: ${roundNumber(stdDev)} ${modalityUnit}`);
537
+ textLines.push(`Area: ${roundNumber(area)} ${areaUnits}`);
538
+ textLines.push(`Mean: ${roundNumber(mean)} ${pixelValueUnits}`);
539
+ textLines.push(`Max: ${roundNumber(max)} ${pixelValueUnits}`);
540
+ textLines.push(`Std Dev: ${roundNumber(stdDev)} ${pixelValueUnits}`);
541
541
  return textLines;
542
542
  }
543
543
  RectangleROITool.toolName = 'RectangleROI';
@@ -468,7 +468,7 @@ class SplineROITool extends ContourSegmentationBaseTool {
468
468
  cachedStats[targetId] = {
469
469
  Modality: metadata.Modality,
470
470
  area,
471
- areaUnit: areaUnits,
471
+ areaUnits,
472
472
  };
473
473
  }
474
474
  this.triggerAnnotationModified(annotation, enabledElement, ChangeTypes.StatsUpdated);
@@ -557,11 +557,11 @@ class SplineROITool extends ContourSegmentationBaseTool {
557
557
  });
558
558
  super.renderAnnotationInstance(renderContext);
559
559
  if (!data.cachedStats[targetId] ||
560
- data.cachedStats[targetId].areaUnit == null) {
560
+ data.cachedStats[targetId].areaUnits == null) {
561
561
  data.cachedStats[targetId] = {
562
562
  Modality: null,
563
563
  area: null,
564
- areaUnit: null,
564
+ areaUnits: null,
565
565
  };
566
566
  this._calculateCachedStats(annotation, element);
567
567
  }
@@ -712,12 +712,12 @@ class SplineROITool extends ContourSegmentationBaseTool {
712
712
  }
713
713
  function defaultGetTextLines(data, targetId) {
714
714
  const cachedVolumeStats = data.cachedStats[targetId];
715
- const { area, isEmptyArea, areaUnit } = cachedVolumeStats;
715
+ const { area, isEmptyArea, areaUnits } = cachedVolumeStats;
716
716
  const textLines = [];
717
717
  if (area) {
718
718
  const areaLine = isEmptyArea
719
719
  ? `Area: Oblique not supported`
720
- : `Area: ${roundNumber(area)} ${areaUnit}`;
720
+ : `Area: ${roundNumber(area)} ${areaUnits}`;
721
721
  textLines.push(areaLine);
722
722
  }
723
723
  return textLines;
@@ -13,6 +13,5 @@ declare abstract class ContourSegmentationBaseTool extends ContourBaseTool {
13
13
  }): any;
14
14
  protected renderAnnotationInstance(renderContext: AnnotationRenderContext): boolean;
15
15
  private _getContourSegmentationStyle;
16
- private _getSegmentationRepresentation;
17
16
  }
18
17
  export { ContourSegmentationBaseTool as default, ContourSegmentationBaseTool };
@@ -1,12 +1,13 @@
1
- import { utilities } from '@cornerstonejs/core';
1
+ import { getEnabledElement, utilities } from '@cornerstonejs/core';
2
2
  import { config as segmentationConfig, state as segmentationState, segmentLocking, segmentIndex as segmentIndexController, activeSegmentation, } from '../../stateManagement/segmentation';
3
3
  import { SegmentationRepresentations } from '../../enums';
4
4
  import ContourBaseTool from './ContourBaseTool';
5
5
  import { triggerSegmentationDataModified } from '../../stateManagement/segmentation/triggerSegmentationEvents';
6
6
  import { InterpolationManager } from '../../utilities/contours/interpolation';
7
7
  import { addContourSegmentationAnnotation, removeContourSegmentationAnnotation, } from '../../utilities/contourSegmentation';
8
- import { getToolGroupIdsWithSegmentation } from '../../stateManagement/segmentation/segmentationState';
9
8
  import { triggerAnnotationRenderForToolGroupIds } from '../../utilities';
9
+ import { getActiveRepresentation, getRepresentationsBySegmentationId, getRepresentationsForViewport, getViewportIdsWithSegmentationId, } from '../../stateManagement/segmentation/segmentationState';
10
+ import { getToolGroupForViewport } from '../../store/ToolGroupManager';
10
11
  class ContourSegmentationBaseTool extends ContourBaseTool {
11
12
  constructor(toolProps, defaultToolProps) {
12
13
  super(toolProps, defaultToolProps);
@@ -18,20 +19,26 @@ class ContourSegmentationBaseTool extends ContourBaseTool {
18
19
  return true;
19
20
  }
20
21
  createAnnotation(evt) {
21
- const { toolGroupId } = this;
22
+ const eventDetail = evt.detail;
23
+ const { element } = eventDetail;
24
+ const enabledElement = getEnabledElement(element);
25
+ if (!enabledElement) {
26
+ return;
27
+ }
28
+ const { viewport } = enabledElement;
22
29
  const contourAnnotation = super.createAnnotation(evt);
23
30
  if (!this.isContourSegmentationTool()) {
24
31
  return contourAnnotation;
25
32
  }
26
- const activeSegmentationRepresentation = activeSegmentation.getActiveSegmentationRepresentation(toolGroupId);
27
- if (!activeSegmentationRepresentation) {
33
+ const activeSeg = activeSegmentation.getActiveRepresentation(viewport.id);
34
+ if (!activeSeg) {
28
35
  throw new Error('No active segmentation detected, create one before using scissors tool');
29
36
  }
30
- const { type: segmentationType } = activeSegmentationRepresentation;
37
+ const { type: segmentationType } = activeSeg;
31
38
  if (segmentationType !== SegmentationRepresentations.Contour) {
32
39
  throw new Error(`A contour segmentation must be active`);
33
40
  }
34
- const { segmentationId } = activeSegmentationRepresentation;
41
+ const { segmentationId } = activeSeg;
35
42
  const segmentIndex = segmentIndexController.getActiveSegmentIndex(segmentationId);
36
43
  return utilities.deepMerge(contourAnnotation, {
37
44
  data: {
@@ -71,33 +78,48 @@ class ContourSegmentationBaseTool extends ContourBaseTool {
71
78
  if (invalidated && this.isContourSegmentationTool()) {
72
79
  const { segmentationId } = (annotation).data.segmentation;
73
80
  triggerSegmentationDataModified(segmentationId);
74
- const toolGroupIds = getToolGroupIdsWithSegmentation(segmentationId);
81
+ const viewportIds = getViewportIdsWithSegmentationId(segmentationId);
82
+ const toolGroupIds = viewportIds.map((viewportId) => {
83
+ const toolGroup = getToolGroupForViewport(viewportId);
84
+ return toolGroup.id;
85
+ });
75
86
  triggerAnnotationRenderForToolGroupIds(toolGroupIds);
76
87
  }
77
88
  return renderResult;
78
89
  }
79
90
  _getContourSegmentationStyle(context) {
80
- const { toolGroupId } = this;
81
91
  const annotation = context.annotation;
82
92
  const { segmentationId, segmentIndex } = annotation.data.segmentation;
83
93
  const segmentation = segmentationState.getSegmentation(segmentationId);
84
- const segmentationRepresentation = this._getSegmentationRepresentation(segmentationId);
85
- if (!segmentationRepresentation) {
94
+ const segmentationRepresentations = getRepresentationsBySegmentationId(segmentationId);
95
+ if (!segmentationRepresentations?.length) {
86
96
  return {};
87
97
  }
98
+ const allUIDs = segmentationRepresentations.map((rep) => rep.segmentationRepresentationUID);
99
+ let segmentationRepresentation;
100
+ if (segmentationRepresentations.length > 1) {
101
+ const viewportReps = getRepresentationsForViewport(context.styleSpecifier.viewportId);
102
+ segmentationRepresentation = viewportReps.find((rep) => rep.segmentationId === segmentationId &&
103
+ allUIDs.includes(rep.segmentationRepresentationUID));
104
+ }
105
+ else {
106
+ segmentationRepresentation = segmentationRepresentations[0];
107
+ }
88
108
  const { segmentationRepresentationUID } = segmentationRepresentation;
89
- const { active } = segmentationRepresentation;
90
109
  const { autoGenerated } = annotation;
91
110
  const segmentsLocked = segmentLocking.getLockedSegments(segmentationId);
92
111
  const annotationLocked = segmentsLocked.includes(segmentIndex);
93
- const segmentColor = segmentationConfig.color.getColorForSegmentIndex(toolGroupId, segmentationRepresentationUID, segmentIndex);
94
- const segmentationVisible = segmentationConfig.visibility.getSegmentationVisibility(toolGroupId, segmentationRepresentationUID);
112
+ const segmentColor = segmentationConfig.color.getSegmentIndexColor(segmentationRepresentationUID, segmentIndex);
113
+ const viewportId = context.styleSpecifier.viewportId;
114
+ const segmentationVisible = segmentationConfig.visibility.getRepresentationVisibility(viewportId, segmentationRepresentationUID);
95
115
  const globalConfig = segmentationConfig.getGlobalConfig();
96
- const toolGroupConfig = segmentationConfig.getToolGroupSpecificConfig(toolGroupId);
97
- const segmentationRepresentationConfig = segmentationConfig.getSegmentationRepresentationSpecificConfig(toolGroupId, segmentationRepresentationUID);
98
- const segmentConfig = segmentationConfig.getSegmentSpecificConfig(toolGroupId, segmentationRepresentationUID, segmentIndex);
99
- const segmentVisible = segmentationConfig.visibility.getSegmentVisibility(toolGroupId, segmentationRepresentationUID, segmentIndex);
100
- const mergedConfig = Object.assign({}, globalConfig?.representations?.CONTOUR ?? {}, toolGroupConfig?.representations?.CONTOUR ?? {}, segmentationRepresentationConfig?.CONTOUR ?? {}, segmentConfig?.CONTOUR ?? {});
116
+ const getAllSegmentsConfig = segmentationConfig.getAllSegmentsConfig(segmentationRepresentationUID);
117
+ const segmentConfig = segmentationConfig.getSegmentIndexConfig(segmentationRepresentationUID, segmentIndex);
118
+ const segmentVisible = segmentationConfig.visibility.getSegmentIndexVisibility(viewportId, segmentationRepresentationUID, segmentIndex);
119
+ const activeSegRep = getActiveRepresentation(viewportId);
120
+ const isActive = activeSegRep.segmentationRepresentationUID ===
121
+ segmentationRepresentationUID;
122
+ const mergedConfig = Object.assign({}, globalConfig?.representations?.CONTOUR ?? {}, getAllSegmentsConfig?.CONTOUR ?? {}, segmentConfig?.CONTOUR ?? {});
101
123
  let lineWidth = 1;
102
124
  let lineDash = undefined;
103
125
  let lineOpacity = 1;
@@ -108,7 +130,7 @@ class ContourSegmentationBaseTool extends ContourBaseTool {
108
130
  lineOpacity = mergedConfig.outlineOpacity ?? lineOpacity;
109
131
  fillOpacity = mergedConfig.fillAlphaAutoGenerated ?? fillOpacity;
110
132
  }
111
- else if (active) {
133
+ else if (isActive) {
112
134
  lineWidth = mergedConfig.outlineWidthActive ?? lineWidth;
113
135
  lineDash = mergedConfig.outlineDashActive ?? lineDash;
114
136
  lineOpacity = mergedConfig.outlineOpacity ?? lineOpacity;
@@ -140,18 +162,5 @@ class ContourSegmentationBaseTool extends ContourBaseTool {
140
162
  locked: annotationLocked,
141
163
  };
142
164
  }
143
- _getSegmentationRepresentation(segmentationId) {
144
- const segmentationRepresentations = segmentationState.getSegmentationRepresentations(this.toolGroupId);
145
- const validSegmentationRepresentations = segmentationRepresentations.filter((representation) => representation.segmentationId === segmentationId);
146
- if (!validSegmentationRepresentations) {
147
- console.warn(`No segmentation representation found for toolGroupId: ${this.toolGroupId}`);
148
- return;
149
- }
150
- if (segmentationState.getSegmentationRepresentations(this.toolGroupId)
151
- .length > 1) {
152
- console.warn('Multiple segmentation representations detected for this tool group. The first one will be used.');
153
- }
154
- return validSegmentationRepresentations[0];
155
- }
156
165
  }
157
166
  export { ContourSegmentationBaseTool as default, ContourSegmentationBaseTool };
@@ -1,9 +1,9 @@
1
1
  import { StackViewport, Types } from '@cornerstonejs/core';
2
- import { SegmentationRepresentationConfig, ToolGroupSpecificRepresentation } from '../../../types/SegmentationStateTypes';
3
- declare function removeSegmentationRepresentation(toolGroupId: string, segmentationRepresentationUID: string, renderImmediate?: boolean): void;
4
- declare function render(viewport: StackViewport | Types.IVolumeViewport, representationConfig: ToolGroupSpecificRepresentation, toolGroupConfig: SegmentationRepresentationConfig): Promise<void>;
2
+ import { ContourRepresentation } from '../../../types/SegmentationStateTypes';
3
+ declare function removeRepresentation(viewportId: string, segmentationRepresentationUID: string, renderImmediate?: boolean): void;
4
+ declare function render(viewport: StackViewport | Types.IVolumeViewport, contourRepresentation: ContourRepresentation): Promise<void>;
5
5
  declare const _default: {
6
6
  render: typeof render;
7
- removeSegmentationRepresentation: typeof removeSegmentationRepresentation;
7
+ removeRepresentation: typeof removeRepresentation;
8
8
  };
9
9
  export default _default;
@@ -1,37 +1,36 @@
1
- import { getEnabledElementByIds, } from '@cornerstonejs/core';
1
+ import { getEnabledElementByViewportId, } from '@cornerstonejs/core';
2
2
  import Representations from '../../../enums/SegmentationRepresentations';
3
3
  import * as SegmentationState from '../../../stateManagement/segmentation/segmentationState';
4
- import { getToolGroup } from '../../../store/ToolGroupManager';
5
- import removeContourFromElement from './removeContourFromElement';
6
4
  import { deleteConfigCache } from './contourHandler/contourConfigCache';
7
5
  import { polySeg } from '../../../stateManagement/segmentation';
8
6
  import { handleContourSegmentation } from './contourHandler/handleContourSegmentation';
9
7
  let polySegConversionInProgress = false;
10
- function removeSegmentationRepresentation(toolGroupId, segmentationRepresentationUID, renderImmediate = false) {
11
- _removeContourFromToolGroupViewports(toolGroupId, segmentationRepresentationUID);
12
- SegmentationState.removeSegmentationRepresentation(toolGroupId, segmentationRepresentationUID);
8
+ function removeRepresentation(viewportId, segmentationRepresentationUID, renderImmediate = false) {
9
+ const enabledElement = getEnabledElementByViewportId(viewportId);
10
+ if (!enabledElement) {
11
+ return;
12
+ }
13
+ const { viewport } = enabledElement;
14
+ SegmentationState.removeRepresentation(segmentationRepresentationUID);
13
15
  deleteConfigCache(segmentationRepresentationUID);
14
- if (renderImmediate) {
15
- const viewportsInfo = getToolGroup(toolGroupId).getViewportsInfo();
16
- viewportsInfo.forEach(({ viewportId, renderingEngineId }) => {
17
- const enabledElement = getEnabledElementByIds(viewportId, renderingEngineId);
18
- enabledElement.viewport.render();
19
- });
16
+ if (!renderImmediate) {
17
+ return;
20
18
  }
19
+ viewport.render();
21
20
  }
22
- async function render(viewport, representationConfig, toolGroupConfig) {
23
- const { segmentationId } = representationConfig;
21
+ async function render(viewport, contourRepresentation) {
22
+ const { segmentationId } = contourRepresentation;
24
23
  const segmentation = SegmentationState.getSegmentation(segmentationId);
25
24
  if (!segmentation) {
26
25
  return;
27
26
  }
28
27
  let contourData = segmentation.representationData[Representations.Contour];
29
28
  if (!contourData &&
30
- polySeg.canComputeRequestedRepresentation(representationConfig.segmentationRepresentationUID) &&
29
+ polySeg.canComputeRequestedRepresentation(contourRepresentation.segmentationRepresentationUID) &&
31
30
  !polySegConversionInProgress) {
32
31
  polySegConversionInProgress = true;
33
32
  contourData = await polySeg.computeAndAddContourRepresentation(segmentationId, {
34
- segmentationRepresentationUID: representationConfig.segmentationRepresentationUID,
33
+ segmentationRepresentationUID: contourRepresentation.segmentationRepresentationUID,
35
34
  viewport,
36
35
  });
37
36
  }
@@ -39,22 +38,10 @@ async function render(viewport, representationConfig, toolGroupConfig) {
39
38
  return;
40
39
  }
41
40
  if (contourData?.geometryIds?.length) {
42
- handleContourSegmentation(viewport, contourData.geometryIds, contourData.annotationUIDsMap, representationConfig, toolGroupConfig);
43
- }
44
- }
45
- function _removeContourFromToolGroupViewports(toolGroupId, segmentationRepresentationUID) {
46
- const toolGroup = getToolGroup(toolGroupId);
47
- if (toolGroup === undefined) {
48
- throw new Error(`ToolGroup with ToolGroupId ${toolGroupId} does not exist`);
49
- }
50
- const { viewportsInfo } = toolGroup;
51
- for (const viewportInfo of viewportsInfo) {
52
- const { viewportId, renderingEngineId } = viewportInfo;
53
- const enabledElement = getEnabledElementByIds(viewportId, renderingEngineId);
54
- removeContourFromElement(segmentationRepresentationUID, toolGroupId);
41
+ handleContourSegmentation(viewport, contourData.geometryIds, contourData.annotationUIDsMap, contourRepresentation);
55
42
  }
56
43
  }
57
44
  export default {
58
45
  render,
59
- removeSegmentationRepresentation,
46
+ removeRepresentation,
60
47
  };
@@ -1,6 +1,6 @@
1
1
  import { Types, StackViewport } from '@cornerstonejs/core';
2
- import { SegmentationRepresentationConfig, ToolGroupSpecificContourRepresentation } from '../../../../types';
3
- declare function handleContourSegmentation(viewport: StackViewport | Types.IVolumeViewport, geometryIds: string[], annotationUIDsMap: Map<number, Set<string>>, contourRepresentation: ToolGroupSpecificContourRepresentation, contourRepresentationConfig: SegmentationRepresentationConfig): void;
4
- declare function updateContourSets(viewport: Types.IVolumeViewport | StackViewport, geometryIds: string[], contourRepresentation: ToolGroupSpecificContourRepresentation, contourRepresentationConfig: SegmentationRepresentationConfig): void;
5
- declare function addContourSetsToElement(viewport: StackViewport | Types.IVolumeViewport, geometryIds: string[], contourRepresentation: ToolGroupSpecificContourRepresentation, contourRepresentationConfig: SegmentationRepresentationConfig): void;
2
+ import { ContourRepresentation } from '../../../../types/SegmentationStateTypes';
3
+ declare function handleContourSegmentation(viewport: StackViewport | Types.IVolumeViewport, geometryIds: string[], annotationUIDsMap: Map<number, Set<string>>, contourRepresentation: ContourRepresentation): void;
4
+ declare function updateContourSets(viewport: Types.IVolumeViewport | StackViewport, geometryIds: string[], contourRepresentation: ContourRepresentation): void;
5
+ declare function addContourSetsToElement(viewport: StackViewport | Types.IVolumeViewport, geometryIds: string[], contourRepresentation: ContourRepresentation): void;
6
6
  export { handleContourSegmentation, updateContourSets, addContourSetsToElement, };