@ohif/app 3.14.0-beta.55 → 3.14.0-beta.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{9187.bundle.47a04a89.js → 1283.bundle.56abacf4.js} +162 -137
- package/dist/{4262.bundle.0c550b7f.js → 1558.bundle.03d5783b.js} +36 -11
- package/dist/{1566.bundle.8d90bb15.js → 1566.bundle.e9f5d851.js} +5 -1
- package/dist/{1645.bundle.65cff869.js → 1645.bundle.618a2886.js} +700 -389
- package/dist/{1724.bundle.b4757283.js → 1724.bundle.59b20c59.js} +1184 -1139
- package/dist/{1788.bundle.5b78672d.js → 1788.bundle.3f1349d2.js} +101 -43
- package/dist/1975.bundle.53cf5d7c.js +8216 -0
- package/dist/{5922.bundle.46b3e037.js → 2894.bundle.db3f8686.js} +240 -151
- package/dist/{6567.bundle.cc57e572.js → 3044.bundle.039294b9.js} +105 -76
- package/dist/{3386.bundle.7665dd43.js → 3386.bundle.25140fec.js} +92 -23
- package/dist/{4004.bundle.da822fd2.js → 4018.bundle.48c288e5.js} +128 -253
- package/dist/{2894.bundle.d612efb2.js → 513.bundle.9c0548cf.js} +1 -1
- package/dist/{5143.bundle.62bcf4ee.js → 5143.bundle.67167d39.js} +219 -147
- package/dist/{5895.bundle.b4892e1b.js → 5320.bundle.0c7b2cb7.js} +1473 -617
- package/dist/{5383.bundle.d393d2f5.js → 5383.bundle.79243338.js} +26 -4
- package/dist/{4324.bundle.8645d6b4.js → 5888.bundle.cd717f42.js} +1364 -8004
- package/dist/{8128.bundle.2afe5a05.js → 5914.bundle.00f408d2.js} +419 -49
- package/dist/{1284.bundle.a489bd1d.js → 5989.bundle.f8096a4e.js} +1175 -616
- package/dist/{6255.bundle.ee378f1c.js → 6255.bundle.521051c1.js} +42 -18
- package/dist/{829.bundle.e60fee3a.js → 641.bundle.4627a8e1.js} +472 -483
- package/dist/{1568.bundle.474a5a93.js → 9187.bundle.237037e4.js} +1 -1
- package/dist/{6711.bundle.baba2ccd.js → 9232.bundle.3b0caf8e.js} +10 -10
- package/dist/{1895.bundle.923d0bd4.js → 9620.bundle.67375c83.js} +82 -24
- package/dist/{app.bundle.3a861c86.js → app.bundle.b9e31304.js} +44 -44
- package/dist/{compute.bundle.caab94e6.js → compute.bundle.a8f26c49.js} +10 -10
- package/dist/index.html +1 -1
- package/dist/{interpolation.bundle.eed65b60.js → interpolation.bundle.aef2f614.js} +5 -5
- package/dist/{polySeg.bundle.34a58c4f.js → polySeg.bundle.ba052ac3.js} +11 -11
- package/dist/static/wasm/{27ff970b98.module.wasm → 0e14aeab30.module.wasm} +0 -0
- package/dist/static/wasm/58a146bc8c.module.wasm +0 -0
- package/dist/static/wasm/99a2672e64.module.wasm +0 -0
- package/dist/static/wasm/{11f8dc2413.module.wasm → d8b213f3ea.module.wasm} +0 -0
- package/dist/sw.js +1 -1
- package/package.json +6 -6
- package/dist/0.bundle.485115b4.js +0 -4498
- package/dist/static/wasm/58769f1d7d.module.wasm +0 -0
- /package/dist/{1895.bundle.css → 9620.bundle.css} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
(globalThis["rspackChunk_ohif_app"] ||= []).push([[
|
|
2
|
+
(globalThis["rspackChunk_ohif_app"] ||= []).push([[5320], {
|
|
3
3
|
90333(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
4
4
|
/* import */ var _common_js__rspack_import_0 = __webpack_require__(23172);
|
|
5
5
|
|
|
@@ -2492,107 +2492,108 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2492
2492
|
/* import */ var _getClosestImageId_js__rspack_import_17 = __webpack_require__(27307);
|
|
2493
2493
|
/* import */ var _getSpacingInNormalDirection_js__rspack_import_18 = __webpack_require__(1680);
|
|
2494
2494
|
/* import */ var _getEffectiveSpacingAlongDirection_js__rspack_import_19 = __webpack_require__(27790);
|
|
2495
|
-
/* import */ var
|
|
2496
|
-
/* import */ var
|
|
2497
|
-
/* import */ var
|
|
2498
|
-
/* import */ var
|
|
2499
|
-
/* import */ var
|
|
2500
|
-
/* import */ var
|
|
2501
|
-
/* import */ var
|
|
2502
|
-
/* import */ var
|
|
2503
|
-
/* import */ var
|
|
2504
|
-
/* import */ var
|
|
2505
|
-
/* import */ var
|
|
2506
|
-
/* import */ var
|
|
2507
|
-
/* import */ var
|
|
2508
|
-
/* import */ var
|
|
2509
|
-
/* import */ var
|
|
2510
|
-
/* import */ var
|
|
2511
|
-
/* import */ var
|
|
2512
|
-
/* import */ var
|
|
2513
|
-
/* import */ var
|
|
2514
|
-
/* import */ var
|
|
2515
|
-
/* import */ var
|
|
2516
|
-
/* import */ var
|
|
2517
|
-
/* import */ var
|
|
2518
|
-
/* import */ var
|
|
2519
|
-
/* import */ var
|
|
2520
|
-
/* import */ var
|
|
2521
|
-
/* import */ var
|
|
2522
|
-
/* import */ var
|
|
2523
|
-
/* import */ var
|
|
2524
|
-
/* import */ var
|
|
2525
|
-
/* import */ var
|
|
2526
|
-
/* import */ var
|
|
2527
|
-
/* import */ var
|
|
2528
|
-
/* import */ var
|
|
2529
|
-
/* import */ var
|
|
2530
|
-
/* import */ var
|
|
2531
|
-
/* import */ var
|
|
2532
|
-
/* import */ var
|
|
2533
|
-
/* import */ var
|
|
2534
|
-
/* import */ var
|
|
2535
|
-
/* import */ var
|
|
2536
|
-
/* import */ var
|
|
2537
|
-
/* import */ var
|
|
2538
|
-
/* import */ var
|
|
2539
|
-
/* import */ var
|
|
2540
|
-
/* import */ var
|
|
2541
|
-
/* import */ var
|
|
2542
|
-
/* import */ var
|
|
2543
|
-
/* import */ var
|
|
2544
|
-
/* import */ var
|
|
2545
|
-
/* import */ var
|
|
2546
|
-
/* import */ var
|
|
2547
|
-
/* import */ var
|
|
2548
|
-
/* import */ var
|
|
2549
|
-
/* import */ var
|
|
2550
|
-
/* import */ var
|
|
2551
|
-
/* import */ var
|
|
2552
|
-
/* import */ var
|
|
2553
|
-
/* import */ var
|
|
2554
|
-
/* import */ var
|
|
2555
|
-
/* import */ var
|
|
2556
|
-
/* import */ var
|
|
2557
|
-
/* import */ var
|
|
2558
|
-
/* import */ var
|
|
2559
|
-
/* import */ var
|
|
2560
|
-
/* import */ var
|
|
2561
|
-
/* import */ var
|
|
2562
|
-
/* import */ var
|
|
2563
|
-
/* import */ var
|
|
2564
|
-
/* import */ var
|
|
2565
|
-
/* import */ var
|
|
2566
|
-
/* import */ var
|
|
2567
|
-
/* import */ var
|
|
2568
|
-
/* import */ var
|
|
2569
|
-
/* import */ var
|
|
2570
|
-
/* import */ var
|
|
2571
|
-
/* import */ var
|
|
2572
|
-
/* import */ var
|
|
2573
|
-
/* import */ var
|
|
2574
|
-
/* import */ var
|
|
2575
|
-
/* import */ var
|
|
2576
|
-
/* import */ var
|
|
2577
|
-
/* import */ var
|
|
2578
|
-
/* import */ var
|
|
2579
|
-
/* import */ var
|
|
2580
|
-
/* import */ var
|
|
2581
|
-
/* import */ var
|
|
2582
|
-
/* import */ var
|
|
2583
|
-
/* import */ var
|
|
2584
|
-
/* import */ var
|
|
2585
|
-
/* import */ var
|
|
2586
|
-
/* import */ var
|
|
2587
|
-
/* import */ var
|
|
2588
|
-
/* import */ var
|
|
2589
|
-
/* import */ var
|
|
2590
|
-
/* import */ var
|
|
2591
|
-
/* import */ var
|
|
2592
|
-
/* import */ var
|
|
2593
|
-
/* import */ var
|
|
2594
|
-
/* import */ var
|
|
2595
|
-
/* import */ var
|
|
2495
|
+
/* import */ var _getViewSlabDepth_js__rspack_import_20 = __webpack_require__(13054);
|
|
2496
|
+
/* import */ var _getTargetVolumeAndSpacingInNormalDir_js__rspack_import_21 = __webpack_require__(32556);
|
|
2497
|
+
/* import */ var _getVolumeActorCorners_js__rspack_import_22 = __webpack_require__(35905);
|
|
2498
|
+
/* import */ var _indexWithinDimensions_js__rspack_import_23 = __webpack_require__(1348);
|
|
2499
|
+
/* import */ var _indexAlmostWithinDimensions_js__rspack_import_24 = __webpack_require__(62382);
|
|
2500
|
+
/* import */ var _getVolumeViewportsContainingSameVolumes_js__rspack_import_25 = __webpack_require__(92188);
|
|
2501
|
+
/* import */ var _getViewportsWithVolumeId_js__rspack_import_26 = __webpack_require__(78580);
|
|
2502
|
+
/* import */ var _transformWorldToIndex_js__rspack_import_27 = __webpack_require__(13837);
|
|
2503
|
+
/* import */ var _transformIndexToWorld_js__rspack_import_28 = __webpack_require__(51189);
|
|
2504
|
+
/* import */ var _loadImageToCanvas_js__rspack_import_29 = __webpack_require__(79190);
|
|
2505
|
+
/* import */ var _historyMemo_index_js__rspack_import_30 = __webpack_require__(69583);
|
|
2506
|
+
/* import */ var _renderToCanvasCPU_js__rspack_import_31 = __webpack_require__(60023);
|
|
2507
|
+
/* import */ var _renderToCanvasGPU_js__rspack_import_32 = __webpack_require__(84755);
|
|
2508
|
+
/* import */ var _worldToImageCoords_js__rspack_import_33 = __webpack_require__(86036);
|
|
2509
|
+
/* import */ var _imageToWorldCoords_js__rspack_import_34 = __webpack_require__(35518);
|
|
2510
|
+
/* import */ var _getVolumeSliceRangeInfo_js__rspack_import_35 = __webpack_require__(18655);
|
|
2511
|
+
/* import */ var _getVolumeViewportScrollInfo_js__rspack_import_36 = __webpack_require__(33439);
|
|
2512
|
+
/* import */ var _getSliceRange_js__rspack_import_37 = __webpack_require__(53817);
|
|
2513
|
+
/* import */ var _snapFocalPointToSlice_js__rspack_import_38 = __webpack_require__(69780);
|
|
2514
|
+
/* import */ var _getImageSliceDataForVolumeViewport_js__rspack_import_39 = __webpack_require__(21684);
|
|
2515
|
+
/* import */ var _actorCheck_js__rspack_import_40 = __webpack_require__(34455);
|
|
2516
|
+
/* import */ var _getViewportsWithImageURI_js__rspack_import_41 = __webpack_require__(76742);
|
|
2517
|
+
/* import */ var _getClosestStackImageIndexForPoint_js__rspack_import_42 = __webpack_require__(10259);
|
|
2518
|
+
/* import */ var _getCurrentVolumeViewportSlice_js__rspack_import_43 = __webpack_require__(67419);
|
|
2519
|
+
/* import */ var _calculateViewportsSpatialRegistration_js__rspack_import_44 = __webpack_require__(14598);
|
|
2520
|
+
/* import */ var _spatialRegistrationMetadataProvider_js__rspack_import_45 = __webpack_require__(40367);
|
|
2521
|
+
/* import */ var _getViewportImageCornersInWorld_js__rspack_import_46 = __webpack_require__(32640);
|
|
2522
|
+
/* import */ var _hasNaNValues_js__rspack_import_47 = __webpack_require__(1411);
|
|
2523
|
+
/* import */ var _applyPreset_js__rspack_import_48 = __webpack_require__(34049);
|
|
2524
|
+
/* import */ var _PointsManager_js__rspack_import_49 = __webpack_require__(79252);
|
|
2525
|
+
/* import */ var _deepMerge_js__rspack_import_50 = __webpack_require__(23964);
|
|
2526
|
+
/* import */ var _getScalingParameters_js__rspack_import_51 = __webpack_require__(2541);
|
|
2527
|
+
/* import */ var _isPTPrescaledWithSUV_js__rspack_import_52 = __webpack_require__(41227);
|
|
2528
|
+
/* import */ var _getImageLegacy_js__rspack_import_53 = __webpack_require__(73290);
|
|
2529
|
+
/* import */ var _sortImageIdsAndGetSpacing_js__rspack_import_54 = __webpack_require__(7913);
|
|
2530
|
+
/* import */ var _makeVolumeMetadata_js__rspack_import_55 = __webpack_require__(10985);
|
|
2531
|
+
/* import */ var _genericMetadataProvider_js__rspack_import_56 = __webpack_require__(73615);
|
|
2532
|
+
/* import */ var _isValidVolume_js__rspack_import_57 = __webpack_require__(22750);
|
|
2533
|
+
/* import */ var _updateVTKImageDataWithCornerstoneImage_js__rspack_import_58 = __webpack_require__(95390);
|
|
2534
|
+
/* import */ var _ProgressiveIterator_js__rspack_import_59 = __webpack_require__(56783);
|
|
2535
|
+
/* import */ var _decimate_js__rspack_import_60 = __webpack_require__(49230);
|
|
2536
|
+
/* import */ var _imageRetrieveMetadataProvider_js__rspack_import_61 = __webpack_require__(95071);
|
|
2537
|
+
/* import */ var _genericViewportDisplaySetMetadataProvider_js__rspack_import_62 = __webpack_require__(51127);
|
|
2538
|
+
/* import */ var _isVideoTransferSyntax_js__rspack_import_63 = __webpack_require__(15793);
|
|
2539
|
+
/* import */ var _getBufferConfiguration_js__rspack_import_64 = __webpack_require__(25752);
|
|
2540
|
+
/* import */ var _generateVolumePropsFromImageIds_js__rspack_import_65 = __webpack_require__(53286);
|
|
2541
|
+
/* import */ var _convertStackToVolumeViewport_js__rspack_import_66 = __webpack_require__(94152);
|
|
2542
|
+
/* import */ var _convertVolumeToStackViewport_js__rspack_import_67 = __webpack_require__(66802);
|
|
2543
|
+
/* import */ var _VoxelManager_js__rspack_import_68 = __webpack_require__(60719);
|
|
2544
|
+
/* import */ var _RLEVoxelMap_js__rspack_import_69 = __webpack_require__(71325);
|
|
2545
|
+
/* import */ var _roundNumber_js__rspack_import_70 = __webpack_require__(18355);
|
|
2546
|
+
/* import */ var _convertToGrayscale_js__rspack_import_71 = __webpack_require__(53373);
|
|
2547
|
+
/* import */ var _convertColorArrayToRgbString_js__rspack_import_72 = __webpack_require__(83860);
|
|
2548
|
+
/* import */ var _getViewportImageIds_js__rspack_import_73 = __webpack_require__(41109);
|
|
2549
|
+
/* import */ var _getRandomSampleFromArray_js__rspack_import_74 = __webpack_require__(62742);
|
|
2550
|
+
/* import */ var _getVolumeId_js__rspack_import_75 = __webpack_require__(65237);
|
|
2551
|
+
/* import */ var _hasFloatScalingParameters_js__rspack_import_76 = __webpack_require__(8985);
|
|
2552
|
+
/* import */ var _pointInShapeCallback_js__rspack_import_77 = __webpack_require__(87169);
|
|
2553
|
+
/* import */ var _ECGUtilities_js__rspack_import_78 = __webpack_require__(24511);
|
|
2554
|
+
/* import */ var _VideoUtilities_js__rspack_import_79 = __webpack_require__(18421);
|
|
2555
|
+
/* import */ var _WSIUtilities_js__rspack_import_80 = __webpack_require__(15975);
|
|
2556
|
+
/* import */ var _planar_js__rspack_import_81 = __webpack_require__(30828);
|
|
2557
|
+
/* import */ var _windowLevel_js__rspack_import_82 = __webpack_require__(30344);
|
|
2558
|
+
/* import */ var _colormap_js__rspack_import_83 = __webpack_require__(21155);
|
|
2559
|
+
/* import */ var _transferFunctionUtils_js__rspack_import_84 = __webpack_require__(48030);
|
|
2560
|
+
/* import */ var _color_js__rspack_import_85 = __webpack_require__(71813);
|
|
2561
|
+
/* import */ var _deepEqual_js__rspack_import_86 = __webpack_require__(46492);
|
|
2562
|
+
/* import */ var _FrameRange_js__rspack_import_87 = __webpack_require__(90446);
|
|
2563
|
+
/* import */ var _fnv1aHash_js__rspack_import_88 = __webpack_require__(29758);
|
|
2564
|
+
/* import */ var _getImageDataMetadata_js__rspack_import_89 = __webpack_require__(57804);
|
|
2565
|
+
/* import */ var _buildMetadata_js__rspack_import_90 = __webpack_require__(15499);
|
|
2566
|
+
/* import */ var _getViewportModality_js__rspack_import_91 = __webpack_require__(37191);
|
|
2567
|
+
/* import */ var _getScalingDescriptor_js__rspack_import_92 = __webpack_require__(67372);
|
|
2568
|
+
/* import */ var _resolveGenericViewportVolumeId_js__rspack_import_93 = __webpack_require__(25464);
|
|
2569
|
+
/* import */ var _cache_cache_js__rspack_import_94 = __webpack_require__(73998);
|
|
2570
|
+
/* import */ var _getDynamicVolumeInfo_js__rspack_import_95 = __webpack_require__(97587);
|
|
2571
|
+
/* import */ var _autoLoad_js__rspack_import_96 = __webpack_require__(38795);
|
|
2572
|
+
/* import */ var _scaleArray_js__rspack_import_97 = __webpack_require__(57039);
|
|
2573
|
+
/* import */ var _splitImageIdsBy4DTags_js__rspack_import_98 = __webpack_require__(50863);
|
|
2574
|
+
/* import */ var _deepClone_js__rspack_import_99 = __webpack_require__(46765);
|
|
2575
|
+
/* import */ var _jumpToSlice_js__rspack_import_100 = __webpack_require__(31223);
|
|
2576
|
+
/* import */ var _scroll_js__rspack_import_101 = __webpack_require__(29877);
|
|
2577
|
+
/* import */ var _clip_js__rspack_import_102 = __webpack_require__(22462);
|
|
2578
|
+
/* import */ var _createSubVolume_js__rspack_import_103 = __webpack_require__(63554);
|
|
2579
|
+
/* import */ var _getAcquisitionPlaneOrientation_js__rspack_import_104 = __webpack_require__(98567);
|
|
2580
|
+
/* import */ var _getVolumeDirectionVectors_js__rspack_import_105 = __webpack_require__(72707);
|
|
2581
|
+
/* import */ var _getVolumeViewReferenceId_js__rspack_import_106 = __webpack_require__(95045);
|
|
2582
|
+
/* import */ var _calculateSpacingBetweenImageIds_js__rspack_import_107 = __webpack_require__(78480);
|
|
2583
|
+
/* import */ var _logger_js__rspack_import_108 = __webpack_require__(34040);
|
|
2584
|
+
/* import */ var _calculateNeighborhoodStats_js__rspack_import_109 = __webpack_require__(69123);
|
|
2585
|
+
/* import */ var _viewportVoiIntensityMapping_js__rspack_import_110 = __webpack_require__(31459);
|
|
2586
|
+
/* import */ var _getPixelSpacingInformation_js__rspack_import_111 = __webpack_require__(61293);
|
|
2587
|
+
/* import */ var _getPlaneCubeIntersectionDimensions_js__rspack_import_112 = __webpack_require__(32367);
|
|
2588
|
+
/* import */ var _rotateToViewCoordinates_js__rspack_import_113 = __webpack_require__(4272);
|
|
2589
|
+
/* import */ var _voxelSlab_index_js__rspack_import_114 = __webpack_require__(46989);
|
|
2590
|
+
/* import */ var _asArray_js__rspack_import_115 = __webpack_require__(22779);
|
|
2591
|
+
/* import */ var _viewportCapabilities_js__rspack_import_116 = __webpack_require__(73224);
|
|
2592
|
+
/* import */ var _getNormalizedAspectRatio_js__rspack_import_117 = __webpack_require__(47232);
|
|
2593
|
+
/* import */ var _wasmBasePath_js__rspack_import_118 = __webpack_require__(59318);
|
|
2594
|
+
/* import */ var _resolveApplicationUrl_js__rspack_import_119 = __webpack_require__(49825);
|
|
2595
|
+
/* import */ var _updatePlaneRestriction_js__rspack_import_120 = __webpack_require__(49429);
|
|
2596
|
+
/* import */ var _isEqual_js__rspack_import_121 = __webpack_require__(3886);
|
|
2596
2597
|
|
|
2597
2598
|
|
|
2598
2599
|
|
|
@@ -2713,156 +2714,158 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2713
2714
|
|
|
2714
2715
|
|
|
2715
2716
|
|
|
2716
|
-
|
|
2717
|
-
const
|
|
2717
|
+
|
|
2718
|
+
const getViewportModality = (viewport, volumeId) => (0,_getViewportModality_js__rspack_import_91/* ._getViewportModality */.p)(viewport, volumeId, _cache_cache_js__rspack_import_94/* ["default"].getVolume */.Ay.getVolume);
|
|
2719
|
+
const getScalingDescriptor = (viewport, targetId) => (0,_getScalingDescriptor_js__rspack_import_92/* ._getScalingDescriptor */.c)(viewport, targetId, _cache_cache_js__rspack_import_94/* ["default"].getVolume */.Ay.getVolume);
|
|
2718
2720
|
|
|
2719
2721
|
|
|
2720
2722
|
|
|
2721
2723
|
__webpack_require__.d(__webpack_exports__, {
|
|
2722
|
-
ECGUtilities: () => (/* reexport module object */
|
|
2723
|
-
FrameRange: () => (/* reexport safe */
|
|
2724
|
-
HistoryMemo: () => (/* reexport module object */
|
|
2725
|
-
PointsManager: () => (/* reexport safe */
|
|
2726
|
-
ProgressiveIterator: () => (/* reexport safe */
|
|
2727
|
-
RLEVoxelMap: () => (/* reexport safe */
|
|
2728
|
-
VideoUtilities: () => (/* reexport module object */
|
|
2729
|
-
VoxelManager: () => (/* reexport safe */
|
|
2730
|
-
WSIUtilities: () => (/* reexport module object */
|
|
2731
|
-
actorIsA: () => (/* reexport safe */
|
|
2732
|
-
applyPreset: () => (/* reexport safe */
|
|
2733
|
-
asArray: () => (/* reexport safe */
|
|
2734
|
-
autoLoad: () => (/* reexport safe */
|
|
2735
|
-
buildMetadata: () => (/* reexport safe */
|
|
2736
|
-
calculateNeighborhoodStats: () => (/* reexport safe */
|
|
2737
|
-
calculateRadiographicPixelSpacing: () => (/* reexport safe */
|
|
2738
|
-
calculateSpacingBetweenImageIds: () => (/* reexport safe */
|
|
2739
|
-
calculateViewportsSpatialRegistration: () => (/* reexport safe */
|
|
2724
|
+
ECGUtilities: () => (/* reexport module object */ _ECGUtilities_js__rspack_import_78),
|
|
2725
|
+
FrameRange: () => (/* reexport safe */ _FrameRange_js__rspack_import_87.A),
|
|
2726
|
+
HistoryMemo: () => (/* reexport module object */ _historyMemo_index_js__rspack_import_30),
|
|
2727
|
+
PointsManager: () => (/* reexport safe */ _PointsManager_js__rspack_import_49.A),
|
|
2728
|
+
ProgressiveIterator: () => (/* reexport safe */ _ProgressiveIterator_js__rspack_import_59.A),
|
|
2729
|
+
RLEVoxelMap: () => (/* reexport safe */ _RLEVoxelMap_js__rspack_import_69.A),
|
|
2730
|
+
VideoUtilities: () => (/* reexport module object */ _VideoUtilities_js__rspack_import_79),
|
|
2731
|
+
VoxelManager: () => (/* reexport safe */ _VoxelManager_js__rspack_import_68.A),
|
|
2732
|
+
WSIUtilities: () => (/* reexport module object */ _WSIUtilities_js__rspack_import_80),
|
|
2733
|
+
actorIsA: () => (/* reexport safe */ _actorCheck_js__rspack_import_40.N),
|
|
2734
|
+
applyPreset: () => (/* reexport safe */ _applyPreset_js__rspack_import_48.A),
|
|
2735
|
+
asArray: () => (/* reexport safe */ _asArray_js__rspack_import_115._),
|
|
2736
|
+
autoLoad: () => (/* reexport safe */ _autoLoad_js__rspack_import_96.A),
|
|
2737
|
+
buildMetadata: () => (/* reexport safe */ _buildMetadata_js__rspack_import_90.KP),
|
|
2738
|
+
calculateNeighborhoodStats: () => (/* reexport safe */ _calculateNeighborhoodStats_js__rspack_import_109.c),
|
|
2739
|
+
calculateRadiographicPixelSpacing: () => (/* reexport safe */ _getPixelSpacingInformation_js__rspack_import_111.VD),
|
|
2740
|
+
calculateSpacingBetweenImageIds: () => (/* reexport safe */ _calculateSpacingBetweenImageIds_js__rspack_import_107.A),
|
|
2741
|
+
calculateViewportsSpatialRegistration: () => (/* reexport safe */ _calculateViewportsSpatialRegistration_js__rspack_import_44.A),
|
|
2740
2742
|
calibratedPixelSpacingMetadataProvider: () => (/* reexport safe */ _calibratedPixelSpacingMetadataProvider_js__rspack_import_14.A),
|
|
2741
2743
|
clamp: () => (/* reexport safe */ _clamp_js__rspack_import_15.A),
|
|
2742
|
-
clip: () => (/* reexport safe */
|
|
2744
|
+
clip: () => (/* reexport safe */ _clip_js__rspack_import_102.Ay),
|
|
2743
2745
|
clonePoint3: () => (/* reexport safe */ _clonePoint3_js__rspack_import_9.A),
|
|
2744
|
-
color: () => (/* reexport module object */
|
|
2745
|
-
colormap: () => (/* reexport module object */
|
|
2746
|
-
convertColorArrayToRgbString: () => (/* reexport safe */
|
|
2747
|
-
convertStackToVolumeViewport: () => (/* reexport safe */
|
|
2748
|
-
convertToGrayscale: () => (/* reexport safe */
|
|
2749
|
-
convertVolumeToStackViewport: () => (/* reexport safe */
|
|
2746
|
+
color: () => (/* reexport module object */ _color_js__rspack_import_85),
|
|
2747
|
+
colormap: () => (/* reexport module object */ _colormap_js__rspack_import_83),
|
|
2748
|
+
convertColorArrayToRgbString: () => (/* reexport safe */ _convertColorArrayToRgbString_js__rspack_import_72.J),
|
|
2749
|
+
convertStackToVolumeViewport: () => (/* reexport safe */ _convertStackToVolumeViewport_js__rspack_import_66.h),
|
|
2750
|
+
convertToGrayscale: () => (/* reexport safe */ _convertToGrayscale_js__rspack_import_71.A),
|
|
2751
|
+
convertVolumeToStackViewport: () => (/* reexport safe */ _convertVolumeToStackViewport_js__rspack_import_67.n),
|
|
2750
2752
|
createLinearRGBTransferFunction: () => (/* reexport safe */ _createLinearRGBTransferFunction_js__rspack_import_4.A),
|
|
2751
2753
|
createSigmoidRGBTransferFunction: () => (/* reexport safe */ _createSigmoidRGBTransferFunction_js__rspack_import_2.A),
|
|
2752
|
-
createSubVolume: () => (/* reexport safe */
|
|
2753
|
-
decimate: () => (/* reexport safe */
|
|
2754
|
-
deepClone: () => (/* reexport safe */
|
|
2755
|
-
deepEqual: () => (/* reexport safe */
|
|
2756
|
-
deepMerge: () => (/* reexport safe */
|
|
2754
|
+
createSubVolume: () => (/* reexport safe */ _createSubVolume_js__rspack_import_103.A),
|
|
2755
|
+
decimate: () => (/* reexport safe */ _decimate_js__rspack_import_60.A),
|
|
2756
|
+
deepClone: () => (/* reexport safe */ _deepClone_js__rspack_import_99.G),
|
|
2757
|
+
deepEqual: () => (/* reexport safe */ _deepEqual_js__rspack_import_86.b),
|
|
2758
|
+
deepMerge: () => (/* reexport safe */ _deepMerge_js__rspack_import_50.A),
|
|
2757
2759
|
eventListener: () => (/* reexport module object */ _eventListener_index_js__rspack_import_0),
|
|
2758
|
-
fnv1aHash: () => (/* reexport safe */
|
|
2759
|
-
generateFrameImageId: () => (/* reexport safe */
|
|
2760
|
-
generateVolumePropsFromImageIds: () => (/* reexport safe */
|
|
2761
|
-
genericMetadataProvider: () => (/* reexport safe */
|
|
2762
|
-
genericViewportDisplaySetMetadataProvider: () => (/* reexport safe */
|
|
2763
|
-
getAcquisitionPlaneOrientation: () => (/* reexport safe */
|
|
2764
|
-
getBufferConfiguration: () => (/* reexport safe */
|
|
2760
|
+
fnv1aHash: () => (/* reexport safe */ _fnv1aHash_js__rspack_import_88.A),
|
|
2761
|
+
generateFrameImageId: () => (/* reexport safe */ _splitImageIdsBy4DTags_js__rspack_import_98.Hf),
|
|
2762
|
+
generateVolumePropsFromImageIds: () => (/* reexport safe */ _generateVolumePropsFromImageIds_js__rspack_import_65.D),
|
|
2763
|
+
genericMetadataProvider: () => (/* reexport safe */ _genericMetadataProvider_js__rspack_import_56.A),
|
|
2764
|
+
genericViewportDisplaySetMetadataProvider: () => (/* reexport safe */ _genericViewportDisplaySetMetadataProvider_js__rspack_import_62.A),
|
|
2765
|
+
getAcquisitionPlaneOrientation: () => (/* reexport safe */ _getAcquisitionPlaneOrientation_js__rspack_import_104.A),
|
|
2766
|
+
getBufferConfiguration: () => (/* reexport safe */ _getBufferConfiguration_js__rspack_import_64.h),
|
|
2765
2767
|
getClosestImageId: () => (/* reexport safe */ _getClosestImageId_js__rspack_import_17.A),
|
|
2766
|
-
getClosestStackImageIndexForPoint: () => (/* reexport safe */
|
|
2767
|
-
getCubeSizeInView: () => (/* reexport safe */
|
|
2768
|
-
getCurrentVolumeViewportSlice: () => (/* reexport safe */
|
|
2769
|
-
getDynamicVolumeInfo: () => (/* reexport safe */
|
|
2770
|
-
getERMF: () => (/* reexport safe */
|
|
2768
|
+
getClosestStackImageIndexForPoint: () => (/* reexport safe */ _getClosestStackImageIndexForPoint_js__rspack_import_42.A),
|
|
2769
|
+
getCubeSizeInView: () => (/* reexport safe */ _getPlaneCubeIntersectionDimensions_js__rspack_import_112.H),
|
|
2770
|
+
getCurrentVolumeViewportSlice: () => (/* reexport safe */ _getCurrentVolumeViewportSlice_js__rspack_import_43.A),
|
|
2771
|
+
getDynamicVolumeInfo: () => (/* reexport safe */ _getDynamicVolumeInfo_js__rspack_import_95.A),
|
|
2772
|
+
getERMF: () => (/* reexport safe */ _getPixelSpacingInformation_js__rspack_import_111.lJ),
|
|
2771
2773
|
getEffectiveSpacingAlongDirection: () => (/* reexport safe */ _getEffectiveSpacingAlongDirection_js__rspack_import_19.A),
|
|
2772
|
-
getImageDataMetadata: () => (/* reexport safe */
|
|
2773
|
-
getImageLegacy: () => (/* reexport safe */
|
|
2774
|
-
getImageSliceDataForVolumeViewport: () => (/* reexport safe */
|
|
2774
|
+
getImageDataMetadata: () => (/* reexport safe */ _getImageDataMetadata_js__rspack_import_89.T),
|
|
2775
|
+
getImageLegacy: () => (/* reexport safe */ _getImageLegacy_js__rspack_import_53.A),
|
|
2776
|
+
getImageSliceDataForVolumeViewport: () => (/* reexport safe */ _getImageSliceDataForVolumeViewport_js__rspack_import_39.A),
|
|
2775
2777
|
getMinMax: () => (/* reexport safe */ _getMinMax_js__rspack_import_8.A),
|
|
2776
|
-
getNormalizedAspectRatio: () => (/* reexport safe */
|
|
2777
|
-
getPixelSpacingInformation: () => (/* reexport safe */
|
|
2778
|
-
getPublicUrl: () => (/* reexport safe */
|
|
2779
|
-
getRandomSampleFromArray: () => (/* reexport safe */
|
|
2778
|
+
getNormalizedAspectRatio: () => (/* reexport safe */ _getNormalizedAspectRatio_js__rspack_import_117.x),
|
|
2779
|
+
getPixelSpacingInformation: () => (/* reexport safe */ _getPixelSpacingInformation_js__rspack_import_111.Cc),
|
|
2780
|
+
getPublicUrl: () => (/* reexport safe */ _resolveApplicationUrl_js__rspack_import_119.b4),
|
|
2781
|
+
getRandomSampleFromArray: () => (/* reexport safe */ _getRandomSampleFromArray_js__rspack_import_74.p),
|
|
2780
2782
|
getRuntimeId: () => (/* reexport safe */ _getRuntimeId_js__rspack_import_11.A),
|
|
2781
|
-
getScalingParameters: () => (/* reexport safe */
|
|
2782
|
-
getSliceRange: () => (/* reexport safe */
|
|
2783
|
+
getScalingParameters: () => (/* reexport safe */ _getScalingParameters_js__rspack_import_51.A),
|
|
2784
|
+
getSliceRange: () => (/* reexport safe */ _getSliceRange_js__rspack_import_37.A),
|
|
2783
2785
|
getSpacingInNormalDirection: () => (/* reexport safe */ _getSpacingInNormalDirection_js__rspack_import_18.A),
|
|
2784
|
-
getTargetVolumeAndSpacingInNormalDir: () => (/* reexport safe */
|
|
2786
|
+
getTargetVolumeAndSpacingInNormalDir: () => (/* reexport safe */ _getTargetVolumeAndSpacingInNormalDir_js__rspack_import_21.A),
|
|
2785
2787
|
getVOIRangeFromWindowLevel: () => (/* reexport safe */ _getVOIRangeFromWindowLevel_js__rspack_import_12.A),
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2788
|
+
getViewSlabDepth: () => (/* reexport safe */ _getViewSlabDepth_js__rspack_import_20.A),
|
|
2789
|
+
getViewportContentMode: () => (/* reexport safe */ _viewportCapabilities_js__rspack_import_116.nH),
|
|
2790
|
+
getViewportImageCornersInWorld: () => (/* reexport safe */ _getViewportImageCornersInWorld_js__rspack_import_46.A),
|
|
2791
|
+
getViewportImageIds: () => (/* reexport safe */ _getViewportImageIds_js__rspack_import_73.A),
|
|
2792
|
+
getViewportsWithImageURI: () => (/* reexport safe */ _getViewportsWithImageURI_js__rspack_import_41.A),
|
|
2793
|
+
getViewportsWithVolumeId: () => (/* reexport safe */ _getViewportsWithVolumeId_js__rspack_import_26.A),
|
|
2791
2794
|
getVoiFromSigmoidRGBTransferFunction: () => (/* reexport safe */ _getVoiFromSigmoidRGBTransferFunction_js__rspack_import_3.A),
|
|
2792
|
-
getVolumeActorCorners: () => (/* reexport safe */
|
|
2793
|
-
getVolumeDirectionVectors: () => (/* reexport safe */
|
|
2794
|
-
getVolumeId: () => (/* reexport safe */
|
|
2795
|
-
getVolumeSliceRangeInfo: () => (/* reexport safe */
|
|
2796
|
-
getVolumeViewReferenceId: () => (/* reexport safe */
|
|
2797
|
-
getVolumeViewportScrollInfo: () => (/* reexport safe */
|
|
2798
|
-
getVolumeViewportsContainingSameVolumes: () => (/* reexport safe */
|
|
2799
|
-
getWasmBasePath: () => (/* reexport safe */
|
|
2800
|
-
handleMultiframe4D: () => (/* reexport safe */
|
|
2801
|
-
hasFloatScalingParameters: () => (/* reexport safe */
|
|
2802
|
-
hasNaNValues: () => (/* reexport safe */
|
|
2795
|
+
getVolumeActorCorners: () => (/* reexport safe */ _getVolumeActorCorners_js__rspack_import_22.A),
|
|
2796
|
+
getVolumeDirectionVectors: () => (/* reexport safe */ _getVolumeDirectionVectors_js__rspack_import_105.A),
|
|
2797
|
+
getVolumeId: () => (/* reexport safe */ _getVolumeId_js__rspack_import_75.A),
|
|
2798
|
+
getVolumeSliceRangeInfo: () => (/* reexport safe */ _getVolumeSliceRangeInfo_js__rspack_import_35.A),
|
|
2799
|
+
getVolumeViewReferenceId: () => (/* reexport safe */ _getVolumeViewReferenceId_js__rspack_import_106.A),
|
|
2800
|
+
getVolumeViewportScrollInfo: () => (/* reexport safe */ _getVolumeViewportScrollInfo_js__rspack_import_36.A),
|
|
2801
|
+
getVolumeViewportsContainingSameVolumes: () => (/* reexport safe */ _getVolumeViewportsContainingSameVolumes_js__rspack_import_25.A),
|
|
2802
|
+
getWasmBasePath: () => (/* reexport safe */ _wasmBasePath_js__rspack_import_118.ZC),
|
|
2803
|
+
handleMultiframe4D: () => (/* reexport safe */ _splitImageIdsBy4DTags_js__rspack_import_98.FM),
|
|
2804
|
+
hasFloatScalingParameters: () => (/* reexport safe */ _hasFloatScalingParameters_js__rspack_import_76.a),
|
|
2805
|
+
hasNaNValues: () => (/* reexport safe */ _hasNaNValues_js__rspack_import_47.A),
|
|
2803
2806
|
hasOwn: () => (/* reexport safe */ _hasOwn_js__rspack_import_10.A),
|
|
2804
2807
|
imageIdToURI: () => (/* reexport safe */ _imageIdToURI_js__rspack_import_13.A),
|
|
2805
|
-
imageRetrieveMetadataProvider: () => (/* reexport safe */
|
|
2806
|
-
imageToWorldCoords: () => (/* reexport safe */
|
|
2807
|
-
indexAlmostWithinDimensions: () => (/* reexport safe */
|
|
2808
|
-
indexWithinDimensions: () => (/* reexport safe */
|
|
2808
|
+
imageRetrieveMetadataProvider: () => (/* reexport safe */ _imageRetrieveMetadataProvider_js__rspack_import_61.A),
|
|
2809
|
+
imageToWorldCoords: () => (/* reexport safe */ _imageToWorldCoords_js__rspack_import_34.A),
|
|
2810
|
+
indexAlmostWithinDimensions: () => (/* reexport safe */ _indexAlmostWithinDimensions_js__rspack_import_24.A),
|
|
2811
|
+
indexWithinDimensions: () => (/* reexport safe */ _indexWithinDimensions_js__rspack_import_23.A),
|
|
2809
2812
|
invertRgbTransferFunction: () => (/* reexport safe */ _invertRgbTransferFunction_js__rspack_import_1.A),
|
|
2810
|
-
isEqual: () => (/* reexport safe */
|
|
2811
|
-
isEqualAbs: () => (/* reexport safe */
|
|
2812
|
-
isEqualNegative: () => (/* reexport safe */
|
|
2813
|
-
isGenericViewport: () => (/* reexport safe */
|
|
2814
|
-
isImageActor: () => (/* reexport safe */
|
|
2815
|
-
isNumber: () => (/* reexport safe */
|
|
2813
|
+
isEqual: () => (/* reexport safe */ _isEqual_js__rspack_import_121.n4),
|
|
2814
|
+
isEqualAbs: () => (/* reexport safe */ _isEqual_js__rspack_import_121.Ph),
|
|
2815
|
+
isEqualNegative: () => (/* reexport safe */ _isEqual_js__rspack_import_121.WC),
|
|
2816
|
+
isGenericViewport: () => (/* reexport safe */ _viewportCapabilities_js__rspack_import_116.oX),
|
|
2817
|
+
isImageActor: () => (/* reexport safe */ _actorCheck_js__rspack_import_40.e),
|
|
2818
|
+
isNumber: () => (/* reexport safe */ _isEqual_js__rspack_import_121.Et),
|
|
2816
2819
|
isOpposite: () => (/* reexport safe */ _isOpposite_js__rspack_import_16.A),
|
|
2817
|
-
isPTPrescaledWithSUV: () => (/* reexport safe */
|
|
2818
|
-
isValidVolume: () => (/* reexport safe */
|
|
2819
|
-
isVideoTransferSyntax: () => (/* reexport safe */
|
|
2820
|
-
jumpToSlice: () => (/* reexport safe */
|
|
2821
|
-
loadImageToCanvas: () => (/* reexport safe */
|
|
2822
|
-
logger: () => (/* reexport module object */
|
|
2823
|
-
makeVolumeMetadata: () => (/* reexport safe */
|
|
2824
|
-
mapMappedBandToRawRange: () => (/* reexport safe */
|
|
2825
|
-
mapScalarToViewportVoiIntensity: () => (/* reexport safe */
|
|
2826
|
-
mapViewportVoiIntensityToScalar: () => (/* reexport safe */
|
|
2827
|
-
planar: () => (/* reexport module object */
|
|
2828
|
-
pointInShapeCallback: () => (/* reexport safe */
|
|
2829
|
-
renderToCanvasCPU: () => (/* reexport safe */
|
|
2830
|
-
renderToCanvasGPU: () => (/* reexport safe */
|
|
2831
|
-
resolveApplicationUrl: () => (/* reexport safe */
|
|
2832
|
-
resolveGenericViewportVolumeId: () => (/* reexport safe */
|
|
2833
|
-
resolveWasmBasePath: () => (/* reexport safe */
|
|
2834
|
-
rotateToViewCoordinates: () => (/* reexport safe */
|
|
2835
|
-
roundNumber: () => (/* reexport safe */
|
|
2836
|
-
roundToPrecision: () => (/* reexport safe */
|
|
2837
|
-
scaleArray: () => (/* reexport safe */
|
|
2820
|
+
isPTPrescaledWithSUV: () => (/* reexport safe */ _isPTPrescaledWithSUV_js__rspack_import_52.A),
|
|
2821
|
+
isValidVolume: () => (/* reexport safe */ _isValidVolume_js__rspack_import_57.p),
|
|
2822
|
+
isVideoTransferSyntax: () => (/* reexport safe */ _isVideoTransferSyntax_js__rspack_import_63.A),
|
|
2823
|
+
jumpToSlice: () => (/* reexport safe */ _jumpToSlice_js__rspack_import_100.e),
|
|
2824
|
+
loadImageToCanvas: () => (/* reexport safe */ _loadImageToCanvas_js__rspack_import_29.A),
|
|
2825
|
+
logger: () => (/* reexport module object */ _logger_js__rspack_import_108),
|
|
2826
|
+
makeVolumeMetadata: () => (/* reexport safe */ _makeVolumeMetadata_js__rspack_import_55.A),
|
|
2827
|
+
mapMappedBandToRawRange: () => (/* reexport safe */ _viewportVoiIntensityMapping_js__rspack_import_110.j_),
|
|
2828
|
+
mapScalarToViewportVoiIntensity: () => (/* reexport safe */ _viewportVoiIntensityMapping_js__rspack_import_110.fT),
|
|
2829
|
+
mapViewportVoiIntensityToScalar: () => (/* reexport safe */ _viewportVoiIntensityMapping_js__rspack_import_110.l2),
|
|
2830
|
+
planar: () => (/* reexport module object */ _planar_js__rspack_import_81),
|
|
2831
|
+
pointInShapeCallback: () => (/* reexport safe */ _pointInShapeCallback_js__rspack_import_77.ii),
|
|
2832
|
+
renderToCanvasCPU: () => (/* reexport safe */ _renderToCanvasCPU_js__rspack_import_31.A),
|
|
2833
|
+
renderToCanvasGPU: () => (/* reexport safe */ _renderToCanvasGPU_js__rspack_import_32.A),
|
|
2834
|
+
resolveApplicationUrl: () => (/* reexport safe */ _resolveApplicationUrl_js__rspack_import_119.Ay),
|
|
2835
|
+
resolveGenericViewportVolumeId: () => (/* reexport safe */ _resolveGenericViewportVolumeId_js__rspack_import_93.d),
|
|
2836
|
+
resolveWasmBasePath: () => (/* reexport safe */ _wasmBasePath_js__rspack_import_118.Hv),
|
|
2837
|
+
rotateToViewCoordinates: () => (/* reexport safe */ _rotateToViewCoordinates_js__rspack_import_113.P),
|
|
2838
|
+
roundNumber: () => (/* reexport safe */ _roundNumber_js__rspack_import_70.A),
|
|
2839
|
+
roundToPrecision: () => (/* reexport safe */ _roundNumber_js__rspack_import_70.C),
|
|
2840
|
+
scaleArray: () => (/* reexport safe */ _scaleArray_js__rspack_import_97.A),
|
|
2838
2841
|
scaleRgbTransferFunction: () => (/* reexport safe */ _scaleRgbTransferFunction_js__rspack_import_5.A),
|
|
2839
|
-
scroll: () => (/* reexport safe */
|
|
2840
|
-
setWasmBasePath: () => (/* reexport safe */
|
|
2841
|
-
snapFocalPointToSlice: () => (/* reexport safe */
|
|
2842
|
-
sortImageIdsAndGetSpacing: () => (/* reexport safe */
|
|
2843
|
-
spatialRegistrationMetadataProvider: () => (/* reexport safe */
|
|
2844
|
-
splitImageIdsBy4DTags: () => (/* reexport safe */
|
|
2845
|
-
transferFunctionUtils: () => (/* reexport module object */
|
|
2846
|
-
transformIndexToWorld: () => (/* reexport safe */
|
|
2847
|
-
transformWorldToIndex: () => (/* reexport safe */
|
|
2848
|
-
transformWorldToIndexContinuous: () => (/* reexport safe */
|
|
2842
|
+
scroll: () => (/* reexport safe */ _scroll_js__rspack_import_101.A),
|
|
2843
|
+
setWasmBasePath: () => (/* reexport safe */ _wasmBasePath_js__rspack_import_118.Js),
|
|
2844
|
+
snapFocalPointToSlice: () => (/* reexport safe */ _snapFocalPointToSlice_js__rspack_import_38.A),
|
|
2845
|
+
sortImageIdsAndGetSpacing: () => (/* reexport safe */ _sortImageIdsAndGetSpacing_js__rspack_import_54.A),
|
|
2846
|
+
spatialRegistrationMetadataProvider: () => (/* reexport safe */ _spatialRegistrationMetadataProvider_js__rspack_import_45.A),
|
|
2847
|
+
splitImageIdsBy4DTags: () => (/* reexport safe */ _splitImageIdsBy4DTags_js__rspack_import_98.Ay),
|
|
2848
|
+
transferFunctionUtils: () => (/* reexport module object */ _transferFunctionUtils_js__rspack_import_84),
|
|
2849
|
+
transformIndexToWorld: () => (/* reexport safe */ _transformIndexToWorld_js__rspack_import_28.A),
|
|
2850
|
+
transformWorldToIndex: () => (/* reexport safe */ _transformWorldToIndex_js__rspack_import_27.A),
|
|
2851
|
+
transformWorldToIndexContinuous: () => (/* reexport safe */ _transformWorldToIndex_js__rspack_import_27.p),
|
|
2849
2852
|
triggerEvent: () => (/* reexport safe */ _triggerEvent_js__rspack_import_6.A),
|
|
2850
|
-
updatePlaneRestriction: () => (/* reexport safe */
|
|
2851
|
-
updateVTKImageDataWithCornerstoneImage: () => (/* reexport safe */
|
|
2853
|
+
updatePlaneRestriction: () => (/* reexport safe */ _updatePlaneRestriction_js__rspack_import_120.O),
|
|
2854
|
+
updateVTKImageDataWithCornerstoneImage: () => (/* reexport safe */ _updateVTKImageDataWithCornerstoneImage_js__rspack_import_58.J),
|
|
2852
2855
|
uuidv4: () => (/* reexport safe */ _uuidv4_js__rspack_import_7.A),
|
|
2853
|
-
viewportIsInStackMode: () => (/* reexport safe */
|
|
2854
|
-
viewportIsInVolumeMode: () => (/* reexport safe */
|
|
2855
|
-
viewportSupportsDisplaySetPresentation: () => (/* reexport safe */
|
|
2856
|
-
viewportSupportsImageSlices: () => (/* reexport safe */
|
|
2857
|
-
viewportSupportsStackCalibration: () => (/* reexport safe */
|
|
2858
|
-
viewportSupportsStackCompatibility: () => (/* reexport safe */
|
|
2859
|
-
viewportSupportsVolumeActors: () => (/* reexport safe */
|
|
2860
|
-
viewportSupportsVolumeCompatibility: () => (/* reexport safe */
|
|
2861
|
-
viewportSupportsVolumeId: () => (/* reexport safe */
|
|
2862
|
-
viewportSupportsVolumeURI: () => (/* reexport safe */
|
|
2863
|
-
voxelSlab: () => (/* reexport module object */
|
|
2864
|
-
windowLevel: () => (/* reexport module object */
|
|
2865
|
-
worldToImageCoords: () => (/* reexport safe */
|
|
2856
|
+
viewportIsInStackMode: () => (/* reexport safe */ _viewportCapabilities_js__rspack_import_116.NL),
|
|
2857
|
+
viewportIsInVolumeMode: () => (/* reexport safe */ _viewportCapabilities_js__rspack_import_116.zb),
|
|
2858
|
+
viewportSupportsDisplaySetPresentation: () => (/* reexport safe */ _viewportCapabilities_js__rspack_import_116.Tf),
|
|
2859
|
+
viewportSupportsImageSlices: () => (/* reexport safe */ _viewportCapabilities_js__rspack_import_116.hz),
|
|
2860
|
+
viewportSupportsStackCalibration: () => (/* reexport safe */ _viewportCapabilities_js__rspack_import_116.Xu),
|
|
2861
|
+
viewportSupportsStackCompatibility: () => (/* reexport safe */ _viewportCapabilities_js__rspack_import_116.T),
|
|
2862
|
+
viewportSupportsVolumeActors: () => (/* reexport safe */ _viewportCapabilities_js__rspack_import_116.$O),
|
|
2863
|
+
viewportSupportsVolumeCompatibility: () => (/* reexport safe */ _viewportCapabilities_js__rspack_import_116.rw),
|
|
2864
|
+
viewportSupportsVolumeId: () => (/* reexport safe */ _viewportCapabilities_js__rspack_import_116.Uv),
|
|
2865
|
+
viewportSupportsVolumeURI: () => (/* reexport safe */ _viewportCapabilities_js__rspack_import_116.vP),
|
|
2866
|
+
voxelSlab: () => (/* reexport module object */ _voxelSlab_index_js__rspack_import_114),
|
|
2867
|
+
windowLevel: () => (/* reexport module object */ _windowLevel_js__rspack_import_82),
|
|
2868
|
+
worldToImageCoords: () => (/* reexport safe */ _worldToImageCoords_js__rspack_import_33.A)
|
|
2866
2869
|
}, {
|
|
2867
2870
|
getScalingDescriptor: getScalingDescriptor,
|
|
2868
2871
|
getViewportModality: getViewportModality
|
|
@@ -2973,7 +2976,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2973
2976
|
/* import */ var _isPlaneDepthViewable_js__rspack_import_3 = __webpack_require__(45827);
|
|
2974
2977
|
/* import */ var _iterateVoxelsInShape_js__rspack_import_4 = __webpack_require__(72960);
|
|
2975
2978
|
/* import */ var _sampleVoxelsInShape_js__rspack_import_5 = __webpack_require__(98412);
|
|
2976
|
-
/* import */ var _shapes_index_js__rspack_import_6 = __webpack_require__(
|
|
2979
|
+
/* import */ var _shapes_index_js__rspack_import_6 = __webpack_require__(24779);
|
|
2977
2980
|
|
|
2978
2981
|
|
|
2979
2982
|
|
|
@@ -2994,17 +2997,21 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
2994
2997
|
createPlaneBasis: () => (/* reexport safe */ _shapes_index_js__rspack_import_6.NC),
|
|
2995
2998
|
createPolylineShape: () => (/* reexport safe */ _shapes_index_js__rspack_import_6.oY),
|
|
2996
2999
|
createRectangleShape: () => (/* reexport safe */ _shapes_index_js__rspack_import_6.Tc),
|
|
3000
|
+
createUnionShape: () => (/* reexport safe */ _shapes_index_js__rspack_import_6.ZG),
|
|
2997
3001
|
depthAtIndex: () => (/* reexport safe */ _indexSpaceSlab_js__rspack_import_2.xe),
|
|
2998
3002
|
getAxisSteps: () => (/* reexport safe */ _shapes_index_js__rspack_import_6.NU),
|
|
2999
3003
|
getDepthRun: () => (/* reexport safe */ _indexSpaceSlab_js__rspack_import_2.XT),
|
|
3000
3004
|
getDisplayHalfWidth: () => (/* reexport safe */ _slabMembership_js__rspack_import_1.k),
|
|
3005
|
+
getFillHalfWidth: () => (/* reexport safe */ _slabMembership_js__rspack_import_1.xG),
|
|
3001
3006
|
getIndexSpaceNormal: () => (/* reexport safe */ _indexSpaceSlab_js__rspack_import_2.M0),
|
|
3002
3007
|
getMembershipHalfWidth: () => (/* reexport safe */ _slabMembership_js__rspack_import_1.q$),
|
|
3003
3008
|
getSlabAxisBound: () => (/* reexport safe */ _indexSpaceSlab_js__rspack_import_2.i3),
|
|
3004
3009
|
getSlabEpsilon: () => (/* reexport safe */ _slabMembership_js__rspack_import_1.Xm),
|
|
3010
|
+
getSlabHalfWidth: () => (/* reexport safe */ _slabMembership_js__rspack_import_1.ks),
|
|
3005
3011
|
getVoxelThicknessAlongNormal: () => (/* reexport safe */ _getVoxelThicknessAlongNormal_js__rspack_import_0.A),
|
|
3006
3012
|
intersectRanges: () => (/* reexport safe */ _shapes_index_js__rspack_import_6.im),
|
|
3007
3013
|
isPlaneDepthViewable: () => (/* reexport safe */ _isPlaneDepthViewable_js__rspack_import_3.L),
|
|
3014
|
+
isSlabDepthLowInclusive: () => (/* reexport safe */ _slabMembership_js__rspack_import_1.K5),
|
|
3008
3015
|
isVoxelCenterInSlab: () => (/* reexport safe */ _slabMembership_js__rspack_import_1.$X),
|
|
3009
3016
|
isWithinSlab: () => (/* reexport safe */ _slabMembership_js__rspack_import_1.OP),
|
|
3010
3017
|
iterateVoxelsInShape: () => (/* reexport safe */ _iterateVoxelsInShape_js__rspack_import_4.m),
|
|
@@ -3733,6 +3740,239 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
3733
3740
|
});
|
|
3734
3741
|
|
|
3735
3742
|
|
|
3743
|
+
},
|
|
3744
|
+
79157(__unused_rspack___webpack_module__, __unused_rspack___webpack_exports__, __webpack_require__) {
|
|
3745
|
+
/* import */ var _cornerstonejs_core__rspack_import_0 = __webpack_require__(62721);
|
|
3746
|
+
/* import */ var _enums_index_js__rspack_import_1 = __webpack_require__(36776);
|
|
3747
|
+
/* import */ var _getSegmentation_js__rspack_import_2 = __webpack_require__(50115);
|
|
3748
|
+
/* import */ var _getSegmentationRepresentation_js__rspack_import_3 = __webpack_require__(47290);
|
|
3749
|
+
/* import */ var _store_addTool_js__rspack_import_4 = __webpack_require__(36552);
|
|
3750
|
+
/* import */ var _store_state_js__rspack_import_5 = __webpack_require__(57908);
|
|
3751
|
+
/* import */ var _tools_annotation_PlanarFreehandContourSegmentationTool_js__rspack_import_6 = __webpack_require__(31382);
|
|
3752
|
+
/* import */ var _store_ToolGroupManager_index_js__rspack_import_7 = __webpack_require__(91893);
|
|
3753
|
+
/* import */ var _segmentationEventManager_js__rspack_import_8 = __webpack_require__(65604);
|
|
3754
|
+
/* import */ var _SegmentationRepresentationDisplayRegistry_js__rspack_import_9 = __webpack_require__(55377);
|
|
3755
|
+
|
|
3756
|
+
|
|
3757
|
+
|
|
3758
|
+
|
|
3759
|
+
|
|
3760
|
+
|
|
3761
|
+
|
|
3762
|
+
|
|
3763
|
+
|
|
3764
|
+
|
|
3765
|
+
|
|
3766
|
+
const cs3dLogger = _cornerstonejs_core__rspack_import_0.utilities.logger.toolsLog.getLogger('stateManagement.segmentation.SegmentationRenderingEngine');
|
|
3767
|
+
const planarContourToolName = _tools_annotation_PlanarFreehandContourSegmentationTool_js__rspack_import_6/* ["default"].toolName */.A.toolName;
|
|
3768
|
+
class SegmentationRenderingEngine {
|
|
3769
|
+
constructor() {
|
|
3770
|
+
this._needsRender = new Set();
|
|
3771
|
+
this._pendingRenderQueue = [];
|
|
3772
|
+
this._animationFrameSet = false;
|
|
3773
|
+
this._animationFrameHandle = null;
|
|
3774
|
+
this._getAllViewports = () => {
|
|
3775
|
+
const renderingEngine = (0,_cornerstonejs_core__rspack_import_0.getRenderingEngines)();
|
|
3776
|
+
return renderingEngine.flatMap((renderingEngine) => renderingEngine.getViewports());
|
|
3777
|
+
};
|
|
3778
|
+
this._renderFlaggedSegmentations = () => {
|
|
3779
|
+
this._throwIfDestroyed();
|
|
3780
|
+
const viewportIds = Array.from(this._needsRender);
|
|
3781
|
+
viewportIds.forEach((viewportId) => {
|
|
3782
|
+
this._triggerRender(viewportId);
|
|
3783
|
+
});
|
|
3784
|
+
this._needsRender.clear();
|
|
3785
|
+
this._animationFrameSet = false;
|
|
3786
|
+
this._animationFrameHandle = null;
|
|
3787
|
+
if (this._pendingRenderQueue.length > 0) {
|
|
3788
|
+
const nextViewportIds = this._pendingRenderQueue.shift();
|
|
3789
|
+
if (nextViewportIds && nextViewportIds.length > 0) {
|
|
3790
|
+
this._setViewportsToBeRenderedNextFrame(nextViewportIds);
|
|
3791
|
+
}
|
|
3792
|
+
}
|
|
3793
|
+
};
|
|
3794
|
+
}
|
|
3795
|
+
renderSegmentationsForViewport(viewportId) {
|
|
3796
|
+
const viewportIds = viewportId
|
|
3797
|
+
? [viewportId]
|
|
3798
|
+
: this._getViewportIdsForSegmentation();
|
|
3799
|
+
this._setViewportsToBeRenderedNextFrame(viewportIds);
|
|
3800
|
+
}
|
|
3801
|
+
renderSegmentation(segmentationId) {
|
|
3802
|
+
const viewportIds = this._getViewportIdsForSegmentation(segmentationId);
|
|
3803
|
+
this._setViewportsToBeRenderedNextFrame(viewportIds);
|
|
3804
|
+
}
|
|
3805
|
+
_getViewportIdsForSegmentation(segmentationId) {
|
|
3806
|
+
const viewports = this._getAllViewports();
|
|
3807
|
+
const viewportIds = [];
|
|
3808
|
+
for (const viewport of viewports) {
|
|
3809
|
+
const viewportId = viewport.id;
|
|
3810
|
+
if (segmentationId) {
|
|
3811
|
+
const segmentationRepresentations = (0,_getSegmentationRepresentation_js__rspack_import_3/* .getSegmentationRepresentations */.r$)(viewportId, { segmentationId });
|
|
3812
|
+
if (segmentationRepresentations?.length > 0) {
|
|
3813
|
+
viewportIds.push(viewportId);
|
|
3814
|
+
}
|
|
3815
|
+
}
|
|
3816
|
+
else {
|
|
3817
|
+
const segmentationRepresentations = (0,_getSegmentationRepresentation_js__rspack_import_3/* .getSegmentationRepresentations */.r$)(viewportId);
|
|
3818
|
+
if (segmentationRepresentations?.length > 0) {
|
|
3819
|
+
viewportIds.push(viewportId);
|
|
3820
|
+
}
|
|
3821
|
+
}
|
|
3822
|
+
}
|
|
3823
|
+
return viewportIds;
|
|
3824
|
+
}
|
|
3825
|
+
_throwIfDestroyed() {
|
|
3826
|
+
if (this.hasBeenDestroyed) {
|
|
3827
|
+
throw new Error('this.destroy() has been manually called to free up memory, can not longer use this instance. Instead make a new one.');
|
|
3828
|
+
}
|
|
3829
|
+
}
|
|
3830
|
+
_setViewportsToBeRenderedNextFrame(viewportIds) {
|
|
3831
|
+
if (this._animationFrameSet) {
|
|
3832
|
+
this._pendingRenderQueue.push(viewportIds);
|
|
3833
|
+
return;
|
|
3834
|
+
}
|
|
3835
|
+
viewportIds.forEach((viewportId) => {
|
|
3836
|
+
this._needsRender.add(viewportId);
|
|
3837
|
+
});
|
|
3838
|
+
this._render();
|
|
3839
|
+
}
|
|
3840
|
+
_render() {
|
|
3841
|
+
if (this._needsRender.size > 0 && this._animationFrameSet === false) {
|
|
3842
|
+
this._animationFrameHandle = window.requestAnimationFrame(this._renderFlaggedSegmentations);
|
|
3843
|
+
this._animationFrameSet = true;
|
|
3844
|
+
}
|
|
3845
|
+
}
|
|
3846
|
+
_triggerRender(viewportId) {
|
|
3847
|
+
const segmentationRepresentations = (0,_getSegmentationRepresentation_js__rspack_import_3/* .getSegmentationRepresentations */.r$)(viewportId);
|
|
3848
|
+
if (!segmentationRepresentations?.length) {
|
|
3849
|
+
return;
|
|
3850
|
+
}
|
|
3851
|
+
const { viewport } = (0,_cornerstonejs_core__rspack_import_0.getEnabledElementByViewportId)(viewportId) || {};
|
|
3852
|
+
if (!viewport) {
|
|
3853
|
+
return;
|
|
3854
|
+
}
|
|
3855
|
+
const segmentationRenderList = segmentationRepresentations.map((representation) => {
|
|
3856
|
+
if (representation.type === _enums_index_js__rspack_import_1.SegmentationRepresentations.Contour) {
|
|
3857
|
+
this._addPlanarFreeHandToolIfAbsent(viewport);
|
|
3858
|
+
}
|
|
3859
|
+
const display = (0,_SegmentationRepresentationDisplayRegistry_js__rspack_import_9/* .getSegmentationRepresentationDisplay */.I)(representation.type);
|
|
3860
|
+
const segmentation = (0,_getSegmentation_js__rspack_import_2/* .getSegmentation */.T)(representation.segmentationId);
|
|
3861
|
+
const existingRepresentation = segmentation.representationData[representation.type] !== undefined;
|
|
3862
|
+
if (!display) {
|
|
3863
|
+
cs3dLogger.warn(`No display registered for segmentation representation type ${representation.type}.`);
|
|
3864
|
+
return Promise.resolve({
|
|
3865
|
+
segmentationId: representation.segmentationId,
|
|
3866
|
+
type: representation.type,
|
|
3867
|
+
});
|
|
3868
|
+
}
|
|
3869
|
+
return display
|
|
3870
|
+
.render(viewport, representation)
|
|
3871
|
+
.then(() => {
|
|
3872
|
+
if (!existingRepresentation) {
|
|
3873
|
+
(0,_segmentationEventManager_js__rspack_import_8/* .addDefaultSegmentationListener */.Np)(viewport, representation.segmentationId, representation.type);
|
|
3874
|
+
}
|
|
3875
|
+
return {
|
|
3876
|
+
segmentationId: representation.segmentationId,
|
|
3877
|
+
type: representation.type,
|
|
3878
|
+
};
|
|
3879
|
+
})
|
|
3880
|
+
.catch((error) => {
|
|
3881
|
+
cs3dLogger.error(error);
|
|
3882
|
+
return {
|
|
3883
|
+
segmentationId: representation.segmentationId,
|
|
3884
|
+
type: representation.type,
|
|
3885
|
+
};
|
|
3886
|
+
});
|
|
3887
|
+
});
|
|
3888
|
+
Promise.allSettled(segmentationRenderList).then((results) => {
|
|
3889
|
+
const segmentationDetails = results
|
|
3890
|
+
.filter((r) => r.status === 'fulfilled')
|
|
3891
|
+
.map((r) => r.value);
|
|
3892
|
+
function onSegmentationRender(evt) {
|
|
3893
|
+
const { element, viewportId } = evt.detail;
|
|
3894
|
+
element.removeEventListener(_cornerstonejs_core__rspack_import_0.Enums.Events.IMAGE_RENDERED, onSegmentationRender);
|
|
3895
|
+
segmentationDetails.forEach((detail) => {
|
|
3896
|
+
const eventDetail = {
|
|
3897
|
+
viewportId,
|
|
3898
|
+
segmentationId: detail.segmentationId,
|
|
3899
|
+
type: detail.type,
|
|
3900
|
+
};
|
|
3901
|
+
(0,_cornerstonejs_core__rspack_import_0.triggerEvent)(_cornerstonejs_core__rspack_import_0.eventTarget, _enums_index_js__rspack_import_1.Events.SEGMENTATION_RENDERED, {
|
|
3902
|
+
...eventDetail,
|
|
3903
|
+
});
|
|
3904
|
+
});
|
|
3905
|
+
}
|
|
3906
|
+
const element = viewport.element;
|
|
3907
|
+
element.addEventListener(_cornerstonejs_core__rspack_import_0.Enums.Events.IMAGE_RENDERED, onSegmentationRender);
|
|
3908
|
+
viewport.render();
|
|
3909
|
+
});
|
|
3910
|
+
}
|
|
3911
|
+
_addPlanarFreeHandToolIfAbsent(viewport) {
|
|
3912
|
+
if (!(planarContourToolName in _store_state_js__rspack_import_5/* .state.tools */.wk.tools)) {
|
|
3913
|
+
(0,_store_addTool_js__rspack_import_4/* .addTool */.Gx)(_tools_annotation_PlanarFreehandContourSegmentationTool_js__rspack_import_6/* ["default"] */.A);
|
|
3914
|
+
}
|
|
3915
|
+
const toolGroup = (0,_store_ToolGroupManager_index_js__rspack_import_7.getToolGroupForViewport)(viewport.id);
|
|
3916
|
+
if (!toolGroup.hasTool(planarContourToolName)) {
|
|
3917
|
+
toolGroup.addTool(planarContourToolName);
|
|
3918
|
+
toolGroup.setToolPassive(planarContourToolName);
|
|
3919
|
+
}
|
|
3920
|
+
}
|
|
3921
|
+
}
|
|
3922
|
+
function triggerSegmentationRender(viewportId) {
|
|
3923
|
+
segmentationRenderingEngine.renderSegmentationsForViewport(viewportId);
|
|
3924
|
+
}
|
|
3925
|
+
function triggerSegmentationRenderBySegmentationId(segmentationId) {
|
|
3926
|
+
segmentationRenderingEngine.renderSegmentation(segmentationId);
|
|
3927
|
+
}
|
|
3928
|
+
const DEFERRED_SEGMENTATION_RENDER_DELAY_MS = 240;
|
|
3929
|
+
const deferredSegmentationRenderTimers = new Map();
|
|
3930
|
+
function isProjectionHeavySegmentationViewport(viewport) {
|
|
3931
|
+
const blendMode = viewport.getBlendMode?.();
|
|
3932
|
+
if (blendMode === Enums.BlendModes.LABELMAP_EDGE_PROJECTION_BLEND) {
|
|
3933
|
+
return true;
|
|
3934
|
+
}
|
|
3935
|
+
const planarViewport = viewport;
|
|
3936
|
+
if (typeof planarViewport.getDisplaySetPresentation !== 'function') {
|
|
3937
|
+
return false;
|
|
3938
|
+
}
|
|
3939
|
+
const dataIds = [];
|
|
3940
|
+
const sourceDataId = planarViewport.getSourceDataId?.();
|
|
3941
|
+
if (sourceDataId) {
|
|
3942
|
+
dataIds.push(sourceDataId);
|
|
3943
|
+
}
|
|
3944
|
+
planarViewport.getActors?.().forEach((actorEntry) => {
|
|
3945
|
+
if (actorEntry.representationUID) {
|
|
3946
|
+
dataIds.push(String(actorEntry.representationUID));
|
|
3947
|
+
}
|
|
3948
|
+
});
|
|
3949
|
+
return dataIds.some((dataId) => (planarViewport.getDisplaySetPresentation(dataId)?.slabThickness ?? 0) > 0);
|
|
3950
|
+
}
|
|
3951
|
+
function triggerSegmentationRenderForModified(segmentationId) {
|
|
3952
|
+
const viewportIds = segmentationRenderingEngine._getViewportIdsForSegmentation(segmentationId);
|
|
3953
|
+
viewportIds.forEach((viewportId) => {
|
|
3954
|
+
const { viewport } = getEnabledElementByViewportId(viewportId) || {};
|
|
3955
|
+
if (!viewport) {
|
|
3956
|
+
return;
|
|
3957
|
+
}
|
|
3958
|
+
if (!isProjectionHeavySegmentationViewport(viewport)) {
|
|
3959
|
+
segmentationRenderingEngine.renderSegmentationsForViewport(viewportId);
|
|
3960
|
+
return;
|
|
3961
|
+
}
|
|
3962
|
+
const existingTimer = deferredSegmentationRenderTimers.get(viewportId);
|
|
3963
|
+
if (existingTimer !== undefined) {
|
|
3964
|
+
clearTimeout(existingTimer);
|
|
3965
|
+
}
|
|
3966
|
+
deferredSegmentationRenderTimers.set(viewportId, setTimeout(() => {
|
|
3967
|
+
deferredSegmentationRenderTimers.delete(viewportId);
|
|
3968
|
+
segmentationRenderingEngine.renderSegmentationsForViewport(viewportId);
|
|
3969
|
+
}, DEFERRED_SEGMENTATION_RENDER_DELAY_MS));
|
|
3970
|
+
});
|
|
3971
|
+
}
|
|
3972
|
+
const segmentationRenderingEngine = new SegmentationRenderingEngine();
|
|
3973
|
+
|
|
3974
|
+
|
|
3975
|
+
|
|
3736
3976
|
},
|
|
3737
3977
|
55377(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
3738
3978
|
const segmentationRepresentationDisplays = new Map();
|
|
@@ -3999,6 +4239,72 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
3999
4239
|
});
|
|
4000
4240
|
|
|
4001
4241
|
|
|
4242
|
+
},
|
|
4243
|
+
64540(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
4244
|
+
/* import */ var _getSegmentationRepresentation_js__rspack_import_0 = __webpack_require__(47290);
|
|
4245
|
+
/* import */ var _setSegmentationRepresentationVisibility_js__rspack_import_1 = __webpack_require__(54766);
|
|
4246
|
+
/* import */ var _getSegmentationRepresentationVisibility_js__rspack_import_2 = __webpack_require__(45114);
|
|
4247
|
+
/* import */ var _SegmentationRenderingEngine_js__rspack_import_3 = __webpack_require__(79157);
|
|
4248
|
+
/* import */ var _triggerSegmentationEvents_js__rspack_import_4 = __webpack_require__(11815);
|
|
4249
|
+
|
|
4250
|
+
|
|
4251
|
+
|
|
4252
|
+
|
|
4253
|
+
|
|
4254
|
+
function setSegmentationRepresentationVisibility(viewportId, specifier, visibility) {
|
|
4255
|
+
const representations = getSegmentationRepresentations(viewportId, specifier);
|
|
4256
|
+
if (!representations) {
|
|
4257
|
+
return;
|
|
4258
|
+
}
|
|
4259
|
+
representations.forEach((representation) => {
|
|
4260
|
+
_setSegmentationRepresentationVisibility(viewportId, {
|
|
4261
|
+
segmentationId: representation.segmentationId,
|
|
4262
|
+
type: representation.type,
|
|
4263
|
+
}, visibility);
|
|
4264
|
+
});
|
|
4265
|
+
}
|
|
4266
|
+
function getSegmentationRepresentationVisibility(viewportId, specifier) {
|
|
4267
|
+
return _getSegmentationRepresentationVisibility(viewportId, specifier);
|
|
4268
|
+
}
|
|
4269
|
+
function setSegmentIndexVisibility(viewportId, specifier, segmentIndex, visibility) {
|
|
4270
|
+
const representations = getSegmentationRepresentations(viewportId, specifier);
|
|
4271
|
+
if (!representations) {
|
|
4272
|
+
return;
|
|
4273
|
+
}
|
|
4274
|
+
representations.forEach((representation) => {
|
|
4275
|
+
if (!representation.segments || !representation.segments[segmentIndex]) {
|
|
4276
|
+
return;
|
|
4277
|
+
}
|
|
4278
|
+
representation.visible ||= visibility;
|
|
4279
|
+
representation.segments[segmentIndex].visible = visibility;
|
|
4280
|
+
});
|
|
4281
|
+
triggerSegmentationRenderBySegmentationId(specifier.segmentationId);
|
|
4282
|
+
triggerSegmentationRepresentationModified(viewportId, specifier.segmentationId);
|
|
4283
|
+
}
|
|
4284
|
+
function getSegmentIndexVisibility(viewportId, specifier, segmentIndex) {
|
|
4285
|
+
const hiddenSegments = getHiddenSegmentIndices(viewportId, specifier);
|
|
4286
|
+
return !hiddenSegments.has(segmentIndex);
|
|
4287
|
+
}
|
|
4288
|
+
function getHiddenSegmentIndices(viewportId, specifier) {
|
|
4289
|
+
const representation = (0,_getSegmentationRepresentation_js__rspack_import_0/* .getSegmentationRepresentation */.Ut)(viewportId, specifier);
|
|
4290
|
+
if (!representation) {
|
|
4291
|
+
return new Set();
|
|
4292
|
+
}
|
|
4293
|
+
const segmentsHidden = Object.entries(representation.segments).reduce((acc, [segmentIndex, segment]) => {
|
|
4294
|
+
if (!segment.visible) {
|
|
4295
|
+
acc.add(Number(segmentIndex));
|
|
4296
|
+
}
|
|
4297
|
+
return acc;
|
|
4298
|
+
}, new Set());
|
|
4299
|
+
return segmentsHidden;
|
|
4300
|
+
}
|
|
4301
|
+
|
|
4302
|
+
|
|
4303
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
4304
|
+
getHiddenSegmentIndices: () => (getHiddenSegmentIndices)
|
|
4305
|
+
});
|
|
4306
|
+
|
|
4307
|
+
|
|
4002
4308
|
},
|
|
4003
4309
|
14921(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
4004
4310
|
/* import */ var _SegmentationStateManager_js__rspack_import_0 = __webpack_require__(91155);
|
|
@@ -4053,50 +4359,9 @@ function getNextColorLUTIndex() {
|
|
|
4053
4359
|
|
|
4054
4360
|
|
|
4055
4361
|
},
|
|
4056
|
-
|
|
4057
|
-
/* import */ var
|
|
4058
|
-
|
|
4059
|
-
function getSegmentationRepresentations(viewportId, specifier = {}) {
|
|
4060
|
-
const segmentationStateManager = _SegmentationStateManager_js__rspack_import_0/* .defaultSegmentationStateManager */._6;
|
|
4061
|
-
return segmentationStateManager.getSegmentationRepresentations(viewportId, specifier);
|
|
4062
|
-
}
|
|
4063
|
-
function getSegmentationRepresentation(viewportId, specifier) {
|
|
4064
|
-
const segmentationStateManager = _SegmentationStateManager_js__rspack_import_0/* .defaultSegmentationStateManager */._6;
|
|
4065
|
-
if (!specifier.segmentationId || !specifier.type) {
|
|
4066
|
-
throw new Error('getSegmentationRepresentation: No segmentationId or type provided, you need to provide at least one of them');
|
|
4067
|
-
}
|
|
4068
|
-
const representations = segmentationStateManager.getSegmentationRepresentations(viewportId, specifier);
|
|
4069
|
-
return representations?.[0];
|
|
4070
|
-
}
|
|
4071
|
-
function getSegmentationRepresentationsBySegmentationId(segmentationId) {
|
|
4072
|
-
const segmentationStateManager = defaultSegmentationStateManager;
|
|
4073
|
-
return segmentationStateManager.getSegmentationRepresentationsBySegmentationId(segmentationId);
|
|
4074
|
-
}
|
|
4075
|
-
|
|
4076
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
4077
|
-
Ut: () => (getSegmentationRepresentation),
|
|
4078
|
-
r$: () => (getSegmentationRepresentations)
|
|
4079
|
-
});
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
},
|
|
4083
|
-
45114(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
4084
|
-
/* import */ var _SegmentationStateManager_js__rspack_import_0 = __webpack_require__(91155);
|
|
4085
|
-
|
|
4086
|
-
function getSegmentationRepresentationVisibility(viewportId, specifier) {
|
|
4087
|
-
const segmentationStateManager = _SegmentationStateManager_js__rspack_import_0/* .defaultSegmentationStateManager */._6;
|
|
4088
|
-
return segmentationStateManager.getSegmentationRepresentationVisibility(viewportId, specifier);
|
|
4089
|
-
}
|
|
4090
|
-
|
|
4091
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
4092
|
-
I: () => (getSegmentationRepresentationVisibility)
|
|
4093
|
-
});
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
},
|
|
4097
|
-
32092(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
4098
|
-
/* import */ var _cornerstonejs_core__rspack_import_0 = __webpack_require__(62721);
|
|
4099
|
-
/* import */ var _enums_index_js__rspack_import_1 = __webpack_require__(36776);
|
|
4362
|
+
32092(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
4363
|
+
/* import */ var _cornerstonejs_core__rspack_import_0 = __webpack_require__(62721);
|
|
4364
|
+
/* import */ var _enums_index_js__rspack_import_1 = __webpack_require__(36776);
|
|
4100
4365
|
|
|
4101
4366
|
|
|
4102
4367
|
function getActorEntry(viewportId, segmentationId, filterFn) {
|
|
@@ -4224,6 +4489,14 @@ function stackViewportReferencesImages(viewport, layers) {
|
|
|
4224
4489
|
const referencedImageIdSet = new Set(referencedImageIds);
|
|
4225
4490
|
return viewportImageIds.some((imageId) => referencedImageIdSet.has(imageId));
|
|
4226
4491
|
}
|
|
4492
|
+
function mountsAVolume(viewport) {
|
|
4493
|
+
try {
|
|
4494
|
+
return (viewport.getAllVolumeIds?.() ?? []).length > 0;
|
|
4495
|
+
}
|
|
4496
|
+
catch (error) {
|
|
4497
|
+
return false;
|
|
4498
|
+
}
|
|
4499
|
+
}
|
|
4227
4500
|
function isSegmentationOverlayCompatible(viewport, segmentationId, representationType) {
|
|
4228
4501
|
if (representationType !== SegmentationRepresentations.Labelmap) {
|
|
4229
4502
|
return true;
|
|
@@ -4236,8 +4509,11 @@ function isSegmentationOverlayCompatible(viewport, segmentationId, representatio
|
|
|
4236
4509
|
return true;
|
|
4237
4510
|
}
|
|
4238
4511
|
const layers = getLabelmaps(segmentation);
|
|
4239
|
-
const
|
|
4512
|
+
const exposesVolumeApi = typeof viewport
|
|
4240
4513
|
.getAllVolumeIds === 'function';
|
|
4514
|
+
const isVolumeViewport = exposesVolumeApi &&
|
|
4515
|
+
(viewport.type !== Enums.ViewportType.PLANAR_NEXT ||
|
|
4516
|
+
mountsAVolume(viewport));
|
|
4241
4517
|
return isVolumeViewport
|
|
4242
4518
|
? volumeViewportSharesFrameOfReference(viewport, layers)
|
|
4243
4519
|
: stackViewportReferencesImages(viewport, layers);
|
|
@@ -4511,6 +4787,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
4511
4787
|
Mx: () => (/* reexport safe */ _labelmapModel_index_js__rspack_import_0.Mx),
|
|
4512
4788
|
Nf: () => (/* reexport safe */ _labelmapModel_index_js__rspack_import_0.Nf),
|
|
4513
4789
|
Qk: () => (/* reexport safe */ _labelmapModel_index_js__rspack_import_0.Qk),
|
|
4790
|
+
RP: () => (/* reexport safe */ _labelmapModel_index_js__rspack_import_0.RP),
|
|
4514
4791
|
Ry: () => (/* reexport safe */ _labelmapModel_index_js__rspack_import_0.Ry),
|
|
4515
4792
|
VQ: () => (/* reexport safe */ _labelmapModel_index_js__rspack_import_0.VQ),
|
|
4516
4793
|
kL: () => (/* reexport safe */ _labelmapModel_index_js__rspack_import_0.kL),
|
|
@@ -4540,6 +4817,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
4540
4817
|
Mx: () => (/* reexport safe */ _labelmapSegmentBindings_js__rspack_import_3.Mx),
|
|
4541
4818
|
Nf: () => (/* reexport safe */ _labelmapSegmentBindings_js__rspack_import_3.Nf),
|
|
4542
4819
|
Qk: () => (/* reexport safe */ _labelmapEditTransaction_js__rspack_import_5.Qk),
|
|
4820
|
+
RP: () => (/* reexport safe */ _labelmapEditTransaction_js__rspack_import_5.RP),
|
|
4543
4821
|
Ry: () => (/* reexport safe */ _labelmapEditTransaction_js__rspack_import_5.Ry),
|
|
4544
4822
|
VQ: () => (/* reexport safe */ _labelmapEditTransaction_js__rspack_import_5.VQ),
|
|
4545
4823
|
kL: () => (/* reexport safe */ _labelmapLayerStore_js__rspack_import_1.kL),
|
|
@@ -4549,6 +4827,332 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
4549
4827
|
});
|
|
4550
4828
|
|
|
4551
4829
|
|
|
4830
|
+
},
|
|
4831
|
+
78691(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
4832
|
+
/* import */ var _cornerstonejs_core__rspack_import_0 = __webpack_require__(62721);
|
|
4833
|
+
/* import */ var _helpers_getViewportLabelmapRenderMode_js__rspack_import_1 = __webpack_require__(15422);
|
|
4834
|
+
/* import */ var _normalizeLabelmapSegmentationData_js__rspack_import_2 = __webpack_require__(18782);
|
|
4835
|
+
/* import */ var _labelmapLayerStore_js__rspack_import_3 = __webpack_require__(53325);
|
|
4836
|
+
/* import */ var _labelmapSegmentBindings_js__rspack_import_4 = __webpack_require__(53344);
|
|
4837
|
+
/* import */ var _labelmapLegacyAdapter_js__rspack_import_5 = __webpack_require__(19637);
|
|
4838
|
+
/* import */ var _labelmapImageIdMapping_js__rspack_import_6 = __webpack_require__(27749);
|
|
4839
|
+
|
|
4840
|
+
|
|
4841
|
+
|
|
4842
|
+
|
|
4843
|
+
|
|
4844
|
+
|
|
4845
|
+
|
|
4846
|
+
class LabelmapImageReferenceResolver {
|
|
4847
|
+
constructor(getSegmentation) {
|
|
4848
|
+
this.stackLabelmapImageIdReferenceMap = new Map();
|
|
4849
|
+
this.labelmapImageIdReferenceMap = new Map();
|
|
4850
|
+
this.keysBySegmentationId = new Map();
|
|
4851
|
+
this.completedScanResultsBySegmentationId = new Map();
|
|
4852
|
+
this.getSegmentation = getSegmentation;
|
|
4853
|
+
}
|
|
4854
|
+
reset() {
|
|
4855
|
+
this.stackLabelmapImageIdReferenceMap.clear();
|
|
4856
|
+
this.labelmapImageIdReferenceMap.clear();
|
|
4857
|
+
this.keysBySegmentationId.clear();
|
|
4858
|
+
this.completedScanResultsBySegmentationId.clear();
|
|
4859
|
+
}
|
|
4860
|
+
removeSegmentation(segmentationId) {
|
|
4861
|
+
this.stackLabelmapImageIdReferenceMap.delete(segmentationId);
|
|
4862
|
+
this.completedScanResultsBySegmentationId.delete(segmentationId);
|
|
4863
|
+
const keys = this.keysBySegmentationId.get(segmentationId);
|
|
4864
|
+
if (keys) {
|
|
4865
|
+
for (const key of keys) {
|
|
4866
|
+
this.labelmapImageIdReferenceMap.delete(key);
|
|
4867
|
+
}
|
|
4868
|
+
this.keysBySegmentationId.delete(segmentationId);
|
|
4869
|
+
}
|
|
4870
|
+
}
|
|
4871
|
+
setLabelmapImageIds(segmentationId, key, labelmapImageIds) {
|
|
4872
|
+
this.labelmapImageIdReferenceMap.set(key, labelmapImageIds);
|
|
4873
|
+
let keys = this.keysBySegmentationId.get(segmentationId);
|
|
4874
|
+
if (!keys) {
|
|
4875
|
+
keys = new Set();
|
|
4876
|
+
this.keysBySegmentationId.set(segmentationId, keys);
|
|
4877
|
+
}
|
|
4878
|
+
keys.add(key);
|
|
4879
|
+
}
|
|
4880
|
+
getLabelmapImageIds(representationData) {
|
|
4881
|
+
const labelmapData = representationData.Labelmap;
|
|
4882
|
+
let labelmapImageIds;
|
|
4883
|
+
if (!labelmapData) {
|
|
4884
|
+
return;
|
|
4885
|
+
}
|
|
4886
|
+
if (labelmapData?.labelmaps) {
|
|
4887
|
+
const imageIds = Object.values(labelmapData.labelmaps).flatMap((layer) => {
|
|
4888
|
+
if (layer.imageIds?.length) {
|
|
4889
|
+
return layer.imageIds;
|
|
4890
|
+
}
|
|
4891
|
+
if (layer.volumeId) {
|
|
4892
|
+
return _cornerstonejs_core__rspack_import_0.cache.getVolume(layer.volumeId)
|
|
4893
|
+
?.imageIds;
|
|
4894
|
+
}
|
|
4895
|
+
return [];
|
|
4896
|
+
});
|
|
4897
|
+
return Array.from(new Set(imageIds.filter(Boolean)));
|
|
4898
|
+
}
|
|
4899
|
+
if (labelmapData.imageIds) {
|
|
4900
|
+
labelmapImageIds = labelmapData
|
|
4901
|
+
.imageIds;
|
|
4902
|
+
}
|
|
4903
|
+
else if (labelmapData.volumeId) {
|
|
4904
|
+
const volumeId = labelmapData
|
|
4905
|
+
.volumeId;
|
|
4906
|
+
const volume = _cornerstonejs_core__rspack_import_0.cache.getVolume(volumeId);
|
|
4907
|
+
labelmapImageIds = volume.imageIds;
|
|
4908
|
+
}
|
|
4909
|
+
return labelmapImageIds;
|
|
4910
|
+
}
|
|
4911
|
+
getLabelmapImageIdsForImageId(imageId, segmentationId) {
|
|
4912
|
+
const segmentation = this.getSegmentation(segmentationId);
|
|
4913
|
+
if (!segmentation?.representationData?.Labelmap) {
|
|
4914
|
+
return;
|
|
4915
|
+
}
|
|
4916
|
+
(0,_normalizeLabelmapSegmentationData_js__rspack_import_2/* .ensureLabelmapState */.uk)(segmentation);
|
|
4917
|
+
return (0,_labelmapLegacyAdapter_js__rspack_import_5/* .getReferencedImageIdToCurrentImageIdMap */._)(segmentation).get(imageId);
|
|
4918
|
+
}
|
|
4919
|
+
updateLabelmapSegmentationImageReferences(viewportId, segmentationId) {
|
|
4920
|
+
const segmentation = this.getSegmentation(segmentationId);
|
|
4921
|
+
if (!segmentation) {
|
|
4922
|
+
return;
|
|
4923
|
+
}
|
|
4924
|
+
if (!this.stackLabelmapImageIdReferenceMap.has(segmentationId)) {
|
|
4925
|
+
this.stackLabelmapImageIdReferenceMap.set(segmentationId, new Map());
|
|
4926
|
+
}
|
|
4927
|
+
const { representationData } = segmentation;
|
|
4928
|
+
if (!representationData.Labelmap) {
|
|
4929
|
+
return;
|
|
4930
|
+
}
|
|
4931
|
+
const labelmapImageIds = this.getLabelmapImageIds(representationData);
|
|
4932
|
+
const enabledElement = (0,_cornerstonejs_core__rspack_import_0.getEnabledElementByViewportId)(viewportId);
|
|
4933
|
+
if (!enabledElement || !labelmapImageIds?.length) {
|
|
4934
|
+
return;
|
|
4935
|
+
}
|
|
4936
|
+
const viewport = enabledElement.viewport;
|
|
4937
|
+
const scanKey = this.generateScanKey('current', viewport, labelmapImageIds);
|
|
4938
|
+
if (scanKey && this.hasCompletedScan(segmentationId, scanKey)) {
|
|
4939
|
+
return this.getCompletedScanResult(segmentationId, scanKey);
|
|
4940
|
+
}
|
|
4941
|
+
const result = this.updateLabelmapSegmentationReferences(segmentationId, viewport, labelmapImageIds);
|
|
4942
|
+
if (scanKey) {
|
|
4943
|
+
this.markCompletedScan(segmentationId, scanKey, result);
|
|
4944
|
+
}
|
|
4945
|
+
return result;
|
|
4946
|
+
}
|
|
4947
|
+
generateScanKey(kind, viewport, labelmapImageIds) {
|
|
4948
|
+
const referenceImageId = typeof viewport.getCurrentImageId === 'function'
|
|
4949
|
+
? viewport.getCurrentImageId()
|
|
4950
|
+
: undefined;
|
|
4951
|
+
if (!referenceImageId) {
|
|
4952
|
+
return;
|
|
4953
|
+
}
|
|
4954
|
+
return `${kind}|${viewport.id}|${referenceImageId}|${labelmapImageIds.length}|${labelmapImageIds[0]}|${labelmapImageIds[labelmapImageIds.length - 1]}`;
|
|
4955
|
+
}
|
|
4956
|
+
hasCompletedScan(segmentationId, scanKey) {
|
|
4957
|
+
return !!this.completedScanResultsBySegmentationId
|
|
4958
|
+
.get(segmentationId)
|
|
4959
|
+
?.has(scanKey);
|
|
4960
|
+
}
|
|
4961
|
+
getCompletedScanResult(segmentationId, scanKey) {
|
|
4962
|
+
return this.completedScanResultsBySegmentationId
|
|
4963
|
+
.get(segmentationId)
|
|
4964
|
+
?.get(scanKey);
|
|
4965
|
+
}
|
|
4966
|
+
markCompletedScan(segmentationId, scanKey, result) {
|
|
4967
|
+
let results = this.completedScanResultsBySegmentationId.get(segmentationId);
|
|
4968
|
+
if (!results) {
|
|
4969
|
+
results = new Map();
|
|
4970
|
+
this.completedScanResultsBySegmentationId.set(segmentationId, results);
|
|
4971
|
+
}
|
|
4972
|
+
results.set(scanKey, result);
|
|
4973
|
+
}
|
|
4974
|
+
getCurrentLabelmapImageIdsForViewport(viewportId, segmentationId) {
|
|
4975
|
+
const enabledElement = (0,_cornerstonejs_core__rspack_import_0.getEnabledElementByViewportId)(viewportId);
|
|
4976
|
+
if (!enabledElement) {
|
|
4977
|
+
return;
|
|
4978
|
+
}
|
|
4979
|
+
const { viewport } = enabledElement;
|
|
4980
|
+
const viewportRenderMode = (0,_helpers_getViewportLabelmapRenderMode_js__rspack_import_1/* ["default"] */.A)(viewport);
|
|
4981
|
+
if (viewportRenderMode !== 'image' ||
|
|
4982
|
+
typeof viewport.getCurrentImageId !== 'function') {
|
|
4983
|
+
return;
|
|
4984
|
+
}
|
|
4985
|
+
const referenceImageId = viewport.getCurrentImageId();
|
|
4986
|
+
const segmentation = this.getSegmentation(segmentationId);
|
|
4987
|
+
if (!segmentation) {
|
|
4988
|
+
return;
|
|
4989
|
+
}
|
|
4990
|
+
(0,_normalizeLabelmapSegmentationData_js__rspack_import_2/* .ensureLabelmapState */.uk)(segmentation);
|
|
4991
|
+
const viewportImageIds = viewport.getImageIds();
|
|
4992
|
+
const currentIndex = viewportImageIds.indexOf(referenceImageId);
|
|
4993
|
+
const labelmapImageIds = [];
|
|
4994
|
+
(0,_labelmapLayerStore_js__rspack_import_3/* .getLabelmaps */.m)(segmentation).forEach((layer) => {
|
|
4995
|
+
const referencedLabelmapImageIds = (0,_labelmapImageIdMapping_js__rspack_import_6/* .getLabelmapImageIdsForReferencedImageId */.s_)(layer, referenceImageId);
|
|
4996
|
+
if (referencedLabelmapImageIds.length) {
|
|
4997
|
+
labelmapImageIds.push(...referencedLabelmapImageIds);
|
|
4998
|
+
return;
|
|
4999
|
+
}
|
|
5000
|
+
if (currentIndex !== -1 && layer.imageIds?.[currentIndex]) {
|
|
5001
|
+
labelmapImageIds.push(layer.imageIds[currentIndex]);
|
|
5002
|
+
return;
|
|
5003
|
+
}
|
|
5004
|
+
layer.imageIds?.some((candidateImageId) => {
|
|
5005
|
+
const viewableImageId = viewport.isReferenceViewable({ referencedImageId: candidateImageId }, { asOverlay: true });
|
|
5006
|
+
if (viewableImageId) {
|
|
5007
|
+
labelmapImageIds.push(candidateImageId);
|
|
5008
|
+
}
|
|
5009
|
+
return !!viewableImageId;
|
|
5010
|
+
});
|
|
5011
|
+
});
|
|
5012
|
+
const resolvedImageIds = Array.from(new Set(labelmapImageIds));
|
|
5013
|
+
const key = this.generateMapKey({
|
|
5014
|
+
segmentationId,
|
|
5015
|
+
referenceImageId,
|
|
5016
|
+
});
|
|
5017
|
+
this.setLabelmapImageIds(segmentationId, key, resolvedImageIds);
|
|
5018
|
+
if (!this.stackLabelmapImageIdReferenceMap.has(segmentationId)) {
|
|
5019
|
+
this.stackLabelmapImageIdReferenceMap.set(segmentationId, new Map());
|
|
5020
|
+
}
|
|
5021
|
+
const activeSegmentIndex = Object.keys(segmentation.segments).find((segmentIndex) => segmentation.segments[segmentIndex].active);
|
|
5022
|
+
const activeImageId = activeSegmentIndex
|
|
5023
|
+
? (0,_labelmapSegmentBindings_js__rspack_import_4/* .getLabelmapForSegment */.r)(segmentation, Number(activeSegmentIndex))
|
|
5024
|
+
?.imageIds?.[currentIndex]
|
|
5025
|
+
: undefined;
|
|
5026
|
+
this.stackLabelmapImageIdReferenceMap
|
|
5027
|
+
.get(segmentationId)
|
|
5028
|
+
.set(referenceImageId, activeImageId ?? resolvedImageIds[0]);
|
|
5029
|
+
return resolvedImageIds;
|
|
5030
|
+
}
|
|
5031
|
+
getCurrentLabelmapImageIdForViewport(viewportId, segmentationId) {
|
|
5032
|
+
const enabledElement = (0,_cornerstonejs_core__rspack_import_0.getEnabledElementByViewportId)(viewportId);
|
|
5033
|
+
if (!enabledElement) {
|
|
5034
|
+
return;
|
|
5035
|
+
}
|
|
5036
|
+
const { viewport } = enabledElement;
|
|
5037
|
+
const viewportRenderMode = (0,_helpers_getViewportLabelmapRenderMode_js__rspack_import_1/* ["default"] */.A)(viewport);
|
|
5038
|
+
if (viewportRenderMode !== 'image' ||
|
|
5039
|
+
typeof viewport.getCurrentImageId !== 'function') {
|
|
5040
|
+
return;
|
|
5041
|
+
}
|
|
5042
|
+
const currentImageId = viewport.getCurrentImageId();
|
|
5043
|
+
const currentImageIds = this.getCurrentLabelmapImageIdsForViewport(viewportId, segmentationId);
|
|
5044
|
+
if (!currentImageIds?.length) {
|
|
5045
|
+
return;
|
|
5046
|
+
}
|
|
5047
|
+
const segmentation = this.getSegmentation(segmentationId);
|
|
5048
|
+
const currentIndex = viewport
|
|
5049
|
+
.getImageIds()
|
|
5050
|
+
.indexOf(currentImageId);
|
|
5051
|
+
const activeSegmentIndex = segmentation
|
|
5052
|
+
? Object.keys(segmentation.segments).find((segmentIndex) => segmentation.segments[segmentIndex].active)
|
|
5053
|
+
: undefined;
|
|
5054
|
+
const activeImageId = segmentation && activeSegmentIndex
|
|
5055
|
+
? (0,_labelmapSegmentBindings_js__rspack_import_4/* .getLabelmapForSegment */.r)(segmentation, Number(activeSegmentIndex))
|
|
5056
|
+
?.imageIds?.[currentIndex]
|
|
5057
|
+
: undefined;
|
|
5058
|
+
return activeImageId ?? currentImageIds[0];
|
|
5059
|
+
}
|
|
5060
|
+
getStackSegmentationImageIdsForViewport(viewportId, segmentationId) {
|
|
5061
|
+
const segmentation = this.getSegmentation(segmentationId);
|
|
5062
|
+
if (!segmentation) {
|
|
5063
|
+
return [];
|
|
5064
|
+
}
|
|
5065
|
+
this.updateAllLabelmapSegmentationImageReferences(viewportId, segmentationId);
|
|
5066
|
+
const enabledElement = (0,_cornerstonejs_core__rspack_import_0.getEnabledElementByViewportId)(viewportId);
|
|
5067
|
+
const imageIds = enabledElement?.viewport.getImageIds?.() ?? [];
|
|
5068
|
+
const imageIdMap = (0,_labelmapLegacyAdapter_js__rspack_import_5/* .getReferencedImageIdToCurrentImageIdMap */._)(segmentation);
|
|
5069
|
+
return imageIds.flatMap((imageId) => imageIdMap.get(imageId) ?? []);
|
|
5070
|
+
}
|
|
5071
|
+
updateLabelmapSegmentationReferences(segmentationId, viewport, labelmapImageIds, updateCallback) {
|
|
5072
|
+
const referenceImageId = viewport.getCurrentImageId();
|
|
5073
|
+
let viewableLabelmapImageIdFound = false;
|
|
5074
|
+
for (const labelmapImageId of labelmapImageIds) {
|
|
5075
|
+
const viewableImageId = viewport.isReferenceViewable({ referencedImageId: labelmapImageId }, { asOverlay: true });
|
|
5076
|
+
if (viewableImageId) {
|
|
5077
|
+
viewableLabelmapImageIdFound = true;
|
|
5078
|
+
this.stackLabelmapImageIdReferenceMap
|
|
5079
|
+
.get(segmentationId)
|
|
5080
|
+
.set(referenceImageId, labelmapImageId);
|
|
5081
|
+
this.updateLabelmapImageIdReferenceMap({
|
|
5082
|
+
segmentationId,
|
|
5083
|
+
referenceImageId,
|
|
5084
|
+
labelmapImageId,
|
|
5085
|
+
});
|
|
5086
|
+
}
|
|
5087
|
+
}
|
|
5088
|
+
updateCallback?.(viewport, segmentationId, labelmapImageIds);
|
|
5089
|
+
return viewableLabelmapImageIdFound
|
|
5090
|
+
? this.stackLabelmapImageIdReferenceMap
|
|
5091
|
+
.get(segmentationId)
|
|
5092
|
+
.get(referenceImageId)
|
|
5093
|
+
: undefined;
|
|
5094
|
+
}
|
|
5095
|
+
updateAllLabelmapSegmentationImageReferences(viewportId, segmentationId) {
|
|
5096
|
+
const segmentation = this.getSegmentation(segmentationId);
|
|
5097
|
+
if (!segmentation) {
|
|
5098
|
+
return;
|
|
5099
|
+
}
|
|
5100
|
+
if (!this.stackLabelmapImageIdReferenceMap.has(segmentationId)) {
|
|
5101
|
+
this.stackLabelmapImageIdReferenceMap.set(segmentationId, new Map());
|
|
5102
|
+
}
|
|
5103
|
+
const { representationData } = segmentation;
|
|
5104
|
+
if (!representationData.Labelmap) {
|
|
5105
|
+
return;
|
|
5106
|
+
}
|
|
5107
|
+
const labelmapImageIds = this.getLabelmapImageIds(representationData);
|
|
5108
|
+
const enabledElement = (0,_cornerstonejs_core__rspack_import_0.getEnabledElementByViewportId)(viewportId);
|
|
5109
|
+
if (!enabledElement || !labelmapImageIds?.length) {
|
|
5110
|
+
return;
|
|
5111
|
+
}
|
|
5112
|
+
const stackViewport = enabledElement.viewport;
|
|
5113
|
+
const scanKey = this.generateScanKey('all', stackViewport, labelmapImageIds);
|
|
5114
|
+
if (scanKey && this.hasCompletedScan(segmentationId, scanKey)) {
|
|
5115
|
+
return;
|
|
5116
|
+
}
|
|
5117
|
+
if (scanKey) {
|
|
5118
|
+
this.markCompletedScan(segmentationId, scanKey);
|
|
5119
|
+
}
|
|
5120
|
+
this.updateLabelmapSegmentationReferences(segmentationId, stackViewport, labelmapImageIds, (stackViewport, segmentationId, labelmapImageIds) => {
|
|
5121
|
+
const imageIds = stackViewport.getImageIds();
|
|
5122
|
+
imageIds.forEach((referenceImageId, index) => {
|
|
5123
|
+
for (const labelmapImageId of labelmapImageIds) {
|
|
5124
|
+
const viewableImageId = stackViewport.isReferenceViewable({ referencedImageId: labelmapImageId, sliceIndex: index }, { asOverlay: true, withNavigation: true });
|
|
5125
|
+
if (viewableImageId) {
|
|
5126
|
+
this.stackLabelmapImageIdReferenceMap
|
|
5127
|
+
.get(segmentationId)
|
|
5128
|
+
.set(referenceImageId, labelmapImageId);
|
|
5129
|
+
this.updateLabelmapImageIdReferenceMap({
|
|
5130
|
+
segmentationId,
|
|
5131
|
+
referenceImageId,
|
|
5132
|
+
labelmapImageId,
|
|
5133
|
+
});
|
|
5134
|
+
}
|
|
5135
|
+
}
|
|
5136
|
+
});
|
|
5137
|
+
});
|
|
5138
|
+
}
|
|
5139
|
+
updateLabelmapImageIdReferenceMap({ segmentationId, referenceImageId, labelmapImageId, }) {
|
|
5140
|
+
const key = this.generateMapKey({ segmentationId, referenceImageId });
|
|
5141
|
+
if (!this.labelmapImageIdReferenceMap.has(key)) {
|
|
5142
|
+
this.setLabelmapImageIds(segmentationId, key, [labelmapImageId]);
|
|
5143
|
+
return;
|
|
5144
|
+
}
|
|
5145
|
+
const currentValues = this.labelmapImageIdReferenceMap.get(key) ?? [];
|
|
5146
|
+
const newValues = Array.from(new Set([...currentValues, labelmapImageId]));
|
|
5147
|
+
this.setLabelmapImageIds(segmentationId, key, newValues);
|
|
5148
|
+
}
|
|
5149
|
+
generateMapKey({ segmentationId, referenceImageId }) {
|
|
5150
|
+
return `${segmentationId}-${referenceImageId}`;
|
|
5151
|
+
}
|
|
5152
|
+
}
|
|
5153
|
+
/* export default */ __webpack_exports__.A = (LabelmapImageReferenceResolver);
|
|
5154
|
+
|
|
5155
|
+
|
|
4552
5156
|
},
|
|
4553
5157
|
53325(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
4554
5158
|
/* import */ var _cornerstonejs_core__rspack_import_0 = __webpack_require__(62721);
|
|
@@ -4724,6 +5328,89 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
4724
5328
|
});
|
|
4725
5329
|
|
|
4726
5330
|
|
|
5331
|
+
},
|
|
5332
|
+
16489(__unused_rspack___webpack_module__, __unused_rspack___webpack_exports__, __webpack_require__) {
|
|
5333
|
+
/* import */ var _enums_SegmentationRepresentations_js__rspack_import_0 = __webpack_require__(52602);
|
|
5334
|
+
/* import */ var _getSegmentationRepresentation_js__rspack_import_1 = __webpack_require__(47290);
|
|
5335
|
+
/* import */ var _cornerstonejs_core__rspack_import_2 = __webpack_require__(62721);
|
|
5336
|
+
/* import */ var _SegmentationStateManager_js__rspack_import_3 = __webpack_require__(91155);
|
|
5337
|
+
/* import */ var _segmentationEventManager_js__rspack_import_4 = __webpack_require__(65604);
|
|
5338
|
+
/* import */ var _SegmentationRepresentationDisplayRegistry_js__rspack_import_5 = __webpack_require__(55377);
|
|
5339
|
+
|
|
5340
|
+
|
|
5341
|
+
|
|
5342
|
+
|
|
5343
|
+
|
|
5344
|
+
|
|
5345
|
+
|
|
5346
|
+
const cs3dLogger = _cornerstonejs_core__rspack_import_2.utilities.logger.toolsLog.getLogger('stateManagement.segmentation.removeSegmentationRepresentations');
|
|
5347
|
+
function removeSegmentationRepresentation(viewportId, specifier, immediate) {
|
|
5348
|
+
return _removeSegmentationRepresentations(viewportId, specifier, immediate);
|
|
5349
|
+
}
|
|
5350
|
+
function removeSegmentationRepresentations(viewportId, specifier, immediate) {
|
|
5351
|
+
return _removeSegmentationRepresentations(viewportId, specifier, immediate);
|
|
5352
|
+
}
|
|
5353
|
+
function _removeSegmentationRepresentations(viewportId, specifier, immediate) {
|
|
5354
|
+
const { segmentationId, type } = specifier;
|
|
5355
|
+
_removeRepresentationObject(viewportId, segmentationId, type, immediate);
|
|
5356
|
+
return defaultSegmentationStateManager.removeSegmentationRepresentations(viewportId, {
|
|
5357
|
+
segmentationId,
|
|
5358
|
+
type,
|
|
5359
|
+
});
|
|
5360
|
+
}
|
|
5361
|
+
function removeAllSegmentationRepresentations() {
|
|
5362
|
+
const state = defaultSegmentationStateManager.getAllViewportSegmentationRepresentations();
|
|
5363
|
+
state.forEach(({ viewportId, representations }) => {
|
|
5364
|
+
representations.forEach(({ segmentationId, type }) => {
|
|
5365
|
+
removeSegmentationRepresentation(viewportId, {
|
|
5366
|
+
segmentationId,
|
|
5367
|
+
type,
|
|
5368
|
+
});
|
|
5369
|
+
});
|
|
5370
|
+
});
|
|
5371
|
+
defaultSegmentationStateManager.resetState();
|
|
5372
|
+
}
|
|
5373
|
+
function removeLabelmapRepresentation(viewportId, segmentationId, immediate) {
|
|
5374
|
+
removeSegmentationRepresentation(viewportId, {
|
|
5375
|
+
segmentationId,
|
|
5376
|
+
type: SegmentationRepresentations.Labelmap,
|
|
5377
|
+
}, immediate);
|
|
5378
|
+
}
|
|
5379
|
+
function removeContourRepresentation(viewportId, segmentationId, immediate) {
|
|
5380
|
+
removeSegmentationRepresentation(viewportId, {
|
|
5381
|
+
segmentationId,
|
|
5382
|
+
type: SegmentationRepresentations.Contour,
|
|
5383
|
+
}, immediate);
|
|
5384
|
+
}
|
|
5385
|
+
function removeSurfaceRepresentation(viewportId, segmentationId, immediate) {
|
|
5386
|
+
removeSegmentationRepresentation(viewportId, {
|
|
5387
|
+
segmentationId,
|
|
5388
|
+
type: SegmentationRepresentations.Surface,
|
|
5389
|
+
}, immediate);
|
|
5390
|
+
}
|
|
5391
|
+
function _removeRepresentationObject(viewportId, segmentationId, type, immediate) {
|
|
5392
|
+
const representations = getSegmentationRepresentations(viewportId, {
|
|
5393
|
+
segmentationId,
|
|
5394
|
+
type,
|
|
5395
|
+
});
|
|
5396
|
+
representations.forEach((representation) => {
|
|
5397
|
+
const display = getSegmentationRepresentationDisplay(representation.type);
|
|
5398
|
+
if (display) {
|
|
5399
|
+
display.removeRepresentation(viewportId, representation.segmentationId, immediate);
|
|
5400
|
+
}
|
|
5401
|
+
else {
|
|
5402
|
+
cs3dLogger.warn(`No display registered for segmentation representation type ${representation.type}.`);
|
|
5403
|
+
}
|
|
5404
|
+
removeSegmentationListener(representation.segmentationId, representation.type);
|
|
5405
|
+
});
|
|
5406
|
+
const { viewport } = getEnabledElementByViewportId(viewportId) || {};
|
|
5407
|
+
if (viewport) {
|
|
5408
|
+
viewport.render();
|
|
5409
|
+
}
|
|
5410
|
+
}
|
|
5411
|
+
|
|
5412
|
+
|
|
5413
|
+
|
|
4727
5414
|
},
|
|
4728
5415
|
77074(__unused_rspack___webpack_module__, __unused_rspack___webpack_exports__, __webpack_require__) {
|
|
4729
5416
|
/* import */ var _store_ToolGroupManager_index_js__rspack_import_0 = __webpack_require__(91893);
|
|
@@ -4843,7 +5530,7 @@ function isSegmentIndexLocked(segmentationId, segmentIndex) {
|
|
|
4843
5530
|
throw new Error(`No segmentation state found for ${segmentationId}`);
|
|
4844
5531
|
}
|
|
4845
5532
|
const { segments } = segmentation;
|
|
4846
|
-
return segments[segmentIndex]
|
|
5533
|
+
return segments?.[segmentIndex]?.locked === true;
|
|
4847
5534
|
}
|
|
4848
5535
|
function setSegmentIndexLocked(segmentationId, segmentIndex, locked = true) {
|
|
4849
5536
|
const segmentation = getSegmentation(segmentationId);
|
|
@@ -4873,6 +5560,82 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
4873
5560
|
});
|
|
4874
5561
|
|
|
4875
5562
|
|
|
5563
|
+
},
|
|
5564
|
+
65604(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
5565
|
+
/* import */ var _cornerstonejs_core__rspack_import_0 = __webpack_require__(62721);
|
|
5566
|
+
/* import */ var _enums_index_js__rspack_import_1 = __webpack_require__(36776);
|
|
5567
|
+
/* import */ var _triggerSegmentationEvents_js__rspack_import_2 = __webpack_require__(11815);
|
|
5568
|
+
/* import */ var _utilities_debounce_js__rspack_import_3 = __webpack_require__(20361);
|
|
5569
|
+
/* import */ var _getSegmentation_js__rspack_import_4 = __webpack_require__(50115);
|
|
5570
|
+
/* import */ var _SegmentationRepresentationDisplayRegistry_js__rspack_import_5 = __webpack_require__(55377);
|
|
5571
|
+
|
|
5572
|
+
|
|
5573
|
+
|
|
5574
|
+
|
|
5575
|
+
|
|
5576
|
+
|
|
5577
|
+
const segmentationListeners = new Map();
|
|
5578
|
+
function addDefaultSegmentationListener(viewport, segmentationId, representationType) {
|
|
5579
|
+
const updateFunction = (0,_SegmentationRepresentationDisplayRegistry_js__rspack_import_5/* .getSegmentationRepresentationDisplay */.I)(representationType)?.getUpdateFunction(viewport);
|
|
5580
|
+
if (updateFunction) {
|
|
5581
|
+
addSegmentationListener(segmentationId, representationType, updateFunction);
|
|
5582
|
+
}
|
|
5583
|
+
}
|
|
5584
|
+
function addSegmentationListener(segmentationId, representationType, updateFunction) {
|
|
5585
|
+
if (!segmentationListeners.has(segmentationId)) {
|
|
5586
|
+
segmentationListeners.set(segmentationId, new Map());
|
|
5587
|
+
}
|
|
5588
|
+
const listenerMap = segmentationListeners.get(segmentationId);
|
|
5589
|
+
if (listenerMap.has(representationType)) {
|
|
5590
|
+
removeSegmentationListener(segmentationId, representationType);
|
|
5591
|
+
}
|
|
5592
|
+
const listener = createDebouncedSegmentationListener(segmentationId, representationType, updateFunction);
|
|
5593
|
+
_cornerstonejs_core__rspack_import_0.eventTarget.addEventListener(_enums_index_js__rspack_import_1.Events.SEGMENTATION_DATA_MODIFIED, listener);
|
|
5594
|
+
listenerMap.set(representationType, listener);
|
|
5595
|
+
}
|
|
5596
|
+
function removeSegmentationListener(segmentationId, representationType) {
|
|
5597
|
+
const listenerMap = segmentationListeners.get(segmentationId);
|
|
5598
|
+
if (!listenerMap) {
|
|
5599
|
+
return;
|
|
5600
|
+
}
|
|
5601
|
+
const listener = listenerMap.get(representationType);
|
|
5602
|
+
if (!listener) {
|
|
5603
|
+
return;
|
|
5604
|
+
}
|
|
5605
|
+
_cornerstonejs_core__rspack_import_0.eventTarget.removeEventListener(_enums_index_js__rspack_import_1.Events.SEGMENTATION_DATA_MODIFIED, listener);
|
|
5606
|
+
listenerMap.delete(representationType);
|
|
5607
|
+
}
|
|
5608
|
+
function removeAllSegmentationListeners(segmentationId) {
|
|
5609
|
+
const listenerMap = segmentationListeners.get(segmentationId);
|
|
5610
|
+
if (!listenerMap) {
|
|
5611
|
+
return;
|
|
5612
|
+
}
|
|
5613
|
+
for (const listener of listenerMap.values()) {
|
|
5614
|
+
eventTarget.removeEventListener(Events.SEGMENTATION_DATA_MODIFIED, listener);
|
|
5615
|
+
}
|
|
5616
|
+
segmentationListeners.delete(segmentationId);
|
|
5617
|
+
}
|
|
5618
|
+
function createDebouncedSegmentationListener(segmentationId, representationType, updateFunction) {
|
|
5619
|
+
const debouncedHandler = (0,_utilities_debounce_js__rspack_import_3/* ["default"] */.A)((event) => {
|
|
5620
|
+
const eventSegmentationId = event.detail?.segmentationId;
|
|
5621
|
+
const segmentation = (0,_getSegmentation_js__rspack_import_4/* .getSegmentation */.T)(eventSegmentationId);
|
|
5622
|
+
if (eventSegmentationId === segmentationId &&
|
|
5623
|
+
!!segmentation?.representationData?.[representationType]) {
|
|
5624
|
+
updateFunction(segmentationId);
|
|
5625
|
+
(0,_triggerSegmentationEvents_js__rspack_import_2.triggerSegmentationModified)(segmentationId);
|
|
5626
|
+
}
|
|
5627
|
+
}, 300);
|
|
5628
|
+
return ((event) => {
|
|
5629
|
+
debouncedHandler(event);
|
|
5630
|
+
});
|
|
5631
|
+
}
|
|
5632
|
+
|
|
5633
|
+
|
|
5634
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
5635
|
+
Np: () => (addDefaultSegmentationListener)
|
|
5636
|
+
});
|
|
5637
|
+
|
|
5638
|
+
|
|
4876
5639
|
},
|
|
4877
5640
|
61342(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
4878
5641
|
/* import */ var _getSegmentation_js__rspack_import_0 = __webpack_require__(50115);
|
|
@@ -6257,6 +7020,10 @@ BrushTool.toolName = 'Brush';
|
|
|
6257
7020
|
/* import */ var _enums_index_js__rspack_import_4 = __webpack_require__(36776);
|
|
6258
7021
|
/* import */ var _compositions_index_js__rspack_import_5 = __webpack_require__(68292);
|
|
6259
7022
|
/* import */ var _utilities_math_sphere_index_js__rspack_import_6 = __webpack_require__(95515);
|
|
7023
|
+
/* import */ var _utils_brushVoxelSlab_js__rspack_import_7 = __webpack_require__(90058);
|
|
7024
|
+
/* import */ var _utilities_genericViewportToolHelpers_js__rspack_import_8 = __webpack_require__(73820);
|
|
7025
|
+
|
|
7026
|
+
|
|
6260
7027
|
|
|
6261
7028
|
|
|
6262
7029
|
|
|
@@ -6275,19 +7042,23 @@ function getEllipseCornersFromCanvasCoordinates(canvasCoordinates) {
|
|
|
6275
7042
|
}
|
|
6276
7043
|
function createCircleCornersForCenter(center, viewUp, viewRight, yRadius, xRadius) {
|
|
6277
7044
|
const centerVec = gl_matrix__rspack_import_0/* .vec3.fromValues */.eR.fA(center[0], center[1], center[2]);
|
|
6278
|
-
const
|
|
6279
|
-
gl_matrix__rspack_import_0/* .vec3.scaleAndAdd */.eR.Ln(
|
|
6280
|
-
|
|
6281
|
-
gl_matrix__rspack_import_0/* .vec3.
|
|
6282
|
-
|
|
6283
|
-
gl_matrix__rspack_import_0/* .vec3.scaleAndAdd */.eR.Ln(
|
|
6284
|
-
const
|
|
6285
|
-
gl_matrix__rspack_import_0/* .vec3.scaleAndAdd */.eR.Ln(
|
|
7045
|
+
const topRight = gl_matrix__rspack_import_0/* .vec3.create */.eR.vt();
|
|
7046
|
+
gl_matrix__rspack_import_0/* .vec3.scaleAndAdd */.eR.Ln(topRight, centerVec, viewUp, yRadius);
|
|
7047
|
+
gl_matrix__rspack_import_0/* .vec3.scaleAndAdd */.eR.Ln(topRight, topRight, viewRight, xRadius);
|
|
7048
|
+
const topLeft = gl_matrix__rspack_import_0/* .vec3.create */.eR.vt();
|
|
7049
|
+
gl_matrix__rspack_import_0/* .vec3.scaleAndAdd */.eR.Ln(topLeft, centerVec, viewUp, yRadius);
|
|
7050
|
+
gl_matrix__rspack_import_0/* .vec3.scaleAndAdd */.eR.Ln(topLeft, topLeft, viewRight, -xRadius);
|
|
7051
|
+
const bottomRight = gl_matrix__rspack_import_0/* .vec3.create */.eR.vt();
|
|
7052
|
+
gl_matrix__rspack_import_0/* .vec3.scaleAndAdd */.eR.Ln(bottomRight, centerVec, viewUp, -yRadius);
|
|
7053
|
+
gl_matrix__rspack_import_0/* .vec3.scaleAndAdd */.eR.Ln(bottomRight, bottomRight, viewRight, xRadius);
|
|
7054
|
+
const bottomLeft = gl_matrix__rspack_import_0/* .vec3.create */.eR.vt();
|
|
7055
|
+
gl_matrix__rspack_import_0/* .vec3.scaleAndAdd */.eR.Ln(bottomLeft, centerVec, viewUp, -yRadius);
|
|
7056
|
+
gl_matrix__rspack_import_0/* .vec3.scaleAndAdd */.eR.Ln(bottomLeft, bottomLeft, viewRight, -xRadius);
|
|
6286
7057
|
return [
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
7058
|
+
topRight,
|
|
7059
|
+
topLeft,
|
|
7060
|
+
bottomRight,
|
|
7061
|
+
bottomLeft,
|
|
6291
7062
|
];
|
|
6292
7063
|
}
|
|
6293
7064
|
function createStrokePredicate(centers, xRadius, yRadius) {
|
|
@@ -6400,32 +7171,59 @@ const initializeCircle = {
|
|
|
6400
7171
|
xRadius,
|
|
6401
7172
|
yRadius,
|
|
6402
7173
|
aspectRatio,
|
|
7174
|
+
viewRight,
|
|
7175
|
+
viewUp: normalizedViewUp,
|
|
7176
|
+
viewNormal: normalizedPlaneNormal,
|
|
6403
7177
|
});
|
|
6404
7178
|
operationData.isInObjectBoundsIJK = boundsIJK;
|
|
7179
|
+
const viewThicknessWorld = (0,_utilities_genericViewportToolHelpers_js__rspack_import_8/* .getViewSlabDepthOfViewport */._U)(viewport);
|
|
7180
|
+
(0,_utils_brushVoxelSlab_js__rspack_import_7/* .applyBrushFill */.Ws)(operationData, (0,_utils_brushVoxelSlab_js__rspack_import_7/* .createCircleBrushFill */.SH)({
|
|
7181
|
+
segmentationImageData,
|
|
7182
|
+
viewUp: normalizedViewUp,
|
|
7183
|
+
viewPlaneNormal: normalizedPlaneNormal,
|
|
7184
|
+
centerWorld: operationData.centerWorld,
|
|
7185
|
+
xRadius,
|
|
7186
|
+
yRadius,
|
|
7187
|
+
strokeCentersWorld: strokeCenters,
|
|
7188
|
+
viewThicknessWorld,
|
|
7189
|
+
}));
|
|
6405
7190
|
},
|
|
6406
7191
|
};
|
|
6407
7192
|
function createPointInEllipse(cornersInWorld = [], options = {}) {
|
|
6408
7193
|
if (!cornersInWorld || cornersInWorld.length !== 4) {
|
|
6409
7194
|
throw new Error('createPointInEllipse: cornersInWorld must have 4 points');
|
|
6410
7195
|
}
|
|
6411
|
-
const [topLeft, bottomRight,
|
|
7196
|
+
const [topLeft, bottomRight, , topRight] = cornersInWorld;
|
|
6412
7197
|
const aspectRatio = options.aspectRatio || [1, 1];
|
|
7198
|
+
const segmentationImageData = options.segmentationImageData;
|
|
7199
|
+
const { viewRight, viewUp, viewNormal } = options;
|
|
7200
|
+
const spacing = segmentationImageData?.getSpacing?.();
|
|
7201
|
+
const direction = segmentationImageData?.getDirection?.();
|
|
7202
|
+
const spacingInNormal = spacing && direction && viewNormal
|
|
7203
|
+
? _cornerstonejs_core__rspack_import_1.utilities.getSpacingInNormalDirection({ spacing, direction }, viewNormal)
|
|
7204
|
+
: spacing
|
|
7205
|
+
? Math.max(...spacing, Number.EPSILON)
|
|
7206
|
+
: 1;
|
|
7207
|
+
const planeTolerance = Math.max(spacingInNormal / 2, Number.EPSILON);
|
|
6413
7208
|
const center = gl_matrix__rspack_import_0/* .vec3.create */.eR.vt();
|
|
6414
7209
|
gl_matrix__rspack_import_0/* .vec3.add */.eR.WQ(center, topLeft, bottomRight);
|
|
6415
7210
|
gl_matrix__rspack_import_0/* .vec3.scale */.eR.hs(center, center, 0.5);
|
|
6416
7211
|
const majorAxisVec = gl_matrix__rspack_import_0/* .vec3.create */.eR.vt();
|
|
6417
7212
|
gl_matrix__rspack_import_0/* .vec3.subtract */.eR.Re(majorAxisVec, topRight, topLeft);
|
|
6418
7213
|
const originalRadius = gl_matrix__rspack_import_0/* .vec3.length */.eR.Bw(majorAxisVec) / 2;
|
|
6419
|
-
gl_matrix__rspack_import_0/* .vec3.normalize */.eR.S8(majorAxisVec, majorAxisVec);
|
|
6420
|
-
const minorAxisVec = gl_matrix__rspack_import_0/* .vec3.create */.eR.vt();
|
|
6421
|
-
gl_matrix__rspack_import_0/* .vec3.subtract */.eR.Re(minorAxisVec, bottomLeft, topLeft);
|
|
6422
|
-
gl_matrix__rspack_import_0/* .vec3.normalize */.eR.S8(minorAxisVec, minorAxisVec);
|
|
6423
7214
|
const xRadius = originalRadius / aspectRatio[0];
|
|
6424
7215
|
const yRadius = originalRadius / aspectRatio[1];
|
|
7216
|
+
const invXRadiusSquared = 1 / (xRadius * xRadius);
|
|
7217
|
+
const invYRadiusSquared = 1 / (yRadius * yRadius);
|
|
7218
|
+
const invZRadiusSquared = options.depthRadius > 0
|
|
7219
|
+
? 1 / (options.depthRadius * options.depthRadius)
|
|
7220
|
+
: null;
|
|
6425
7221
|
const xRadiusForStroke = options.xRadius ?? xRadius;
|
|
6426
7222
|
const yRadiusForStroke = options.yRadius ?? yRadius;
|
|
6427
7223
|
const strokePredicate = createStrokePredicate(options.strokePointsWorld || [], xRadiusForStroke, yRadiusForStroke);
|
|
6428
|
-
|
|
7224
|
+
const isSphere = isEqual(xRadius, yRadius) &&
|
|
7225
|
+
(invZRadiusSquared === null || isEqual(options.depthRadius, xRadius));
|
|
7226
|
+
if (isSphere) {
|
|
6429
7227
|
const radius = xRadius;
|
|
6430
7228
|
const sphereObj = {
|
|
6431
7229
|
center,
|
|
@@ -6459,9 +7257,18 @@ function createPointInEllipse(cornersInWorld = [], options = {}) {
|
|
|
6459
7257
|
}
|
|
6460
7258
|
const pointVec = gl_matrix__rspack_import_0/* .vec3.create */.eR.vt();
|
|
6461
7259
|
gl_matrix__rspack_import_0/* .vec3.subtract */.eR.Re(pointVec, worldPoint, center);
|
|
6462
|
-
const
|
|
6463
|
-
const
|
|
6464
|
-
|
|
7260
|
+
const xDist = gl_matrix__rspack_import_0/* .vec3.dot */.eR.Om(pointVec, viewRight);
|
|
7261
|
+
const yDist = gl_matrix__rspack_import_0/* .vec3.dot */.eR.Om(pointVec, viewUp);
|
|
7262
|
+
const xTerm = xDist * xDist * invXRadiusSquared;
|
|
7263
|
+
const yTerm = yDist * yDist * invYRadiusSquared;
|
|
7264
|
+
const zDist = gl_matrix__rspack_import_0/* .vec3.dot */.eR.Om(pointVec, viewNormal);
|
|
7265
|
+
if (invZRadiusSquared !== null) {
|
|
7266
|
+
return xTerm + yTerm + zDist * zDist * invZRadiusSquared <= 1;
|
|
7267
|
+
}
|
|
7268
|
+
if (xTerm + yTerm <= 1) {
|
|
7269
|
+
return Math.abs(zDist) <= planeTolerance;
|
|
7270
|
+
}
|
|
7271
|
+
return false;
|
|
6465
7272
|
};
|
|
6466
7273
|
}
|
|
6467
7274
|
const CIRCLE_STRATEGY = new _BrushStrategy_js__rspack_import_3/* ["default"] */.A('Circle', _compositions_index_js__rspack_import_5/* ["default"].regionFill */.A.regionFill, _compositions_index_js__rspack_import_5/* ["default"].setValue */.A.setValue, initializeCircle, _compositions_index_js__rspack_import_5/* ["default"].determineSegmentIndex */.A.determineSegmentIndex, _compositions_index_js__rspack_import_5/* ["default"].preview */.A.preview, _compositions_index_js__rspack_import_5/* ["default"].labelmapStatistics */.A.labelmapStatistics);
|
|
@@ -6487,12 +7294,10 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
6487
7294
|
65704(__unused_rspack___webpack_module__, __unused_rspack___webpack_exports__, __webpack_require__) {
|
|
6488
7295
|
/* import */ var gl_matrix__rspack_import_0 = __webpack_require__(50341);
|
|
6489
7296
|
/* import */ var _cornerstonejs_core__rspack_import_1 = __webpack_require__(62721);
|
|
6490
|
-
/* import */ var
|
|
6491
|
-
/* import */ var
|
|
6492
|
-
/* import */ var
|
|
6493
|
-
/* import */ var
|
|
6494
|
-
/* import */ var _compositions_index_js__rspack_import_6 = __webpack_require__(68292);
|
|
6495
|
-
|
|
7297
|
+
/* import */ var _BrushStrategy_js__rspack_import_2 = __webpack_require__(33699);
|
|
7298
|
+
/* import */ var _enums_index_js__rspack_import_3 = __webpack_require__(36776);
|
|
7299
|
+
/* import */ var _compositions_index_js__rspack_import_4 = __webpack_require__(68292);
|
|
7300
|
+
/* import */ var _utils_brushVoxelSlab_js__rspack_import_5 = __webpack_require__(90058);
|
|
6496
7301
|
|
|
6497
7302
|
|
|
6498
7303
|
|
|
@@ -6500,9 +7305,45 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
6500
7305
|
|
|
6501
7306
|
|
|
6502
7307
|
const { transformWorldToIndex } = _cornerstonejs_core__rspack_import_1.utilities;
|
|
7308
|
+
function orderRectangleCorners(pts) {
|
|
7309
|
+
if (pts.length < 3) {
|
|
7310
|
+
return [...pts];
|
|
7311
|
+
}
|
|
7312
|
+
const center = gl_matrix__rspack_import_0/* .vec3.create */.eR.vt();
|
|
7313
|
+
pts.forEach((p) => gl_matrix__rspack_import_0/* .vec3.add */.eR.WQ(center, center, p));
|
|
7314
|
+
gl_matrix__rspack_import_0/* .vec3.scale */.eR.hs(center, center, 1 / pts.length);
|
|
7315
|
+
const radials = pts.map((p) => gl_matrix__rspack_import_0/* .vec3.subtract */.eR.Re(gl_matrix__rspack_import_0/* .vec3.create */.eR.vt(), p, center));
|
|
7316
|
+
let axisInPlane = radials[0];
|
|
7317
|
+
let maxLenSq = gl_matrix__rspack_import_0/* .vec3.squaredLength */.eR.m3(axisInPlane);
|
|
7318
|
+
for (const radial of radials) {
|
|
7319
|
+
const lenSq = gl_matrix__rspack_import_0/* .vec3.squaredLength */.eR.m3(radial);
|
|
7320
|
+
if (lenSq > maxLenSq) {
|
|
7321
|
+
maxLenSq = lenSq;
|
|
7322
|
+
axisInPlane = radial;
|
|
7323
|
+
}
|
|
7324
|
+
}
|
|
7325
|
+
const e1 = gl_matrix__rspack_import_0/* .vec3.normalize */.eR.S8(gl_matrix__rspack_import_0/* .vec3.create */.eR.vt(), axisInPlane);
|
|
7326
|
+
const normal = gl_matrix__rspack_import_0/* .vec3.create */.eR.vt();
|
|
7327
|
+
const candidate = gl_matrix__rspack_import_0/* .vec3.create */.eR.vt();
|
|
7328
|
+
for (const radial of radials) {
|
|
7329
|
+
gl_matrix__rspack_import_0/* .vec3.cross */.eR.$A(candidate, e1, radial);
|
|
7330
|
+
if (gl_matrix__rspack_import_0/* .vec3.squaredLength */.eR.m3(candidate) > gl_matrix__rspack_import_0/* .vec3.squaredLength */.eR.m3(normal)) {
|
|
7331
|
+
gl_matrix__rspack_import_0/* .vec3.copy */.eR.C(normal, candidate);
|
|
7332
|
+
}
|
|
7333
|
+
}
|
|
7334
|
+
gl_matrix__rspack_import_0/* .vec3.normalize */.eR.S8(normal, normal);
|
|
7335
|
+
const e2 = gl_matrix__rspack_import_0/* .vec3.normalize */.eR.S8(gl_matrix__rspack_import_0/* .vec3.create */.eR.vt(), gl_matrix__rspack_import_0/* .vec3.cross */.eR.$A(gl_matrix__rspack_import_0/* .vec3.create */.eR.vt(), normal, e1));
|
|
7336
|
+
return [...pts].sort((a, b) => {
|
|
7337
|
+
const ra = gl_matrix__rspack_import_0/* .vec3.subtract */.eR.Re(gl_matrix__rspack_import_0/* .vec3.create */.eR.vt(), a, center);
|
|
7338
|
+
const rb = gl_matrix__rspack_import_0/* .vec3.subtract */.eR.Re(gl_matrix__rspack_import_0/* .vec3.create */.eR.vt(), b, center);
|
|
7339
|
+
const angleA = Math.atan2(gl_matrix__rspack_import_0/* .vec3.dot */.eR.Om(ra, e2), gl_matrix__rspack_import_0/* .vec3.dot */.eR.Om(ra, e1));
|
|
7340
|
+
const angleB = Math.atan2(gl_matrix__rspack_import_0/* .vec3.dot */.eR.Om(rb, e2), gl_matrix__rspack_import_0/* .vec3.dot */.eR.Om(rb, e1));
|
|
7341
|
+
return angleA - angleB;
|
|
7342
|
+
});
|
|
7343
|
+
}
|
|
6503
7344
|
const initializeRectangle = {
|
|
6504
|
-
[
|
|
6505
|
-
const { points,
|
|
7345
|
+
[_enums_index_js__rspack_import_3.StrategyCallbacks.Initialize]: (operationData) => {
|
|
7346
|
+
const { points, segmentationImageData, viewPlaneNormal, } = operationData;
|
|
6506
7347
|
if (!points) {
|
|
6507
7348
|
return;
|
|
6508
7349
|
}
|
|
@@ -6513,22 +7354,38 @@ const initializeRectangle = {
|
|
|
6513
7354
|
gl_matrix__rspack_import_0/* .vec3.scale */.eR.hs(center, center, 1 / points.length);
|
|
6514
7355
|
operationData.centerWorld = center;
|
|
6515
7356
|
operationData.centerIJK = transformWorldToIndex(segmentationImageData, center);
|
|
6516
|
-
const
|
|
7357
|
+
const orderedPoints = orderRectangleCorners(points);
|
|
7358
|
+
const { boundsIJK, pointInShapeFn } = createPointInRectangle(orderedPoints, segmentationImageData);
|
|
6517
7359
|
operationData.isInObject = pointInShapeFn;
|
|
6518
7360
|
operationData.isInObjectBoundsIJK = boundsIJK;
|
|
7361
|
+
(0,_utils_brushVoxelSlab_js__rspack_import_5/* .applyBrushFill */.Ws)(operationData, (0,_utils_brushVoxelSlab_js__rspack_import_5/* .createRectangleBrushFill */.LY)({
|
|
7362
|
+
segmentationImageData,
|
|
7363
|
+
cornersWorld: orderedPoints,
|
|
7364
|
+
viewPlaneNormal: viewPlaneNormal,
|
|
7365
|
+
}));
|
|
6519
7366
|
},
|
|
6520
7367
|
};
|
|
6521
|
-
function createPointInRectangle(
|
|
6522
|
-
|
|
6523
|
-
|
|
6524
|
-
|
|
6525
|
-
|
|
6526
|
-
|
|
6527
|
-
|
|
6528
|
-
|
|
6529
|
-
|
|
6530
|
-
|
|
6531
|
-
|
|
7368
|
+
function createPointInRectangle(orderedPoints, segmentationImageData) {
|
|
7369
|
+
const [p0, p1, , p3] = orderedPoints;
|
|
7370
|
+
const rectangleCornersIJK = orderedPoints.map((world) => transformWorldToIndex(segmentationImageData, world));
|
|
7371
|
+
const dims = segmentationImageData.getDimensions();
|
|
7372
|
+
const cornerIValues = rectangleCornersIJK.map((p) => p[0]);
|
|
7373
|
+
const cornerJValues = rectangleCornersIJK.map((p) => p[1]);
|
|
7374
|
+
const cornerKValues = rectangleCornersIJK.map((p) => p[2]);
|
|
7375
|
+
const boundsIJK = [
|
|
7376
|
+
[
|
|
7377
|
+
Math.max(0, Math.floor(Math.min(...cornerIValues))),
|
|
7378
|
+
Math.min(dims[0] - 1, Math.ceil(Math.max(...cornerIValues))),
|
|
7379
|
+
],
|
|
7380
|
+
[
|
|
7381
|
+
Math.max(0, Math.floor(Math.min(...cornerJValues))),
|
|
7382
|
+
Math.min(dims[1] - 1, Math.ceil(Math.max(...cornerJValues))),
|
|
7383
|
+
],
|
|
7384
|
+
[
|
|
7385
|
+
Math.max(0, Math.floor(Math.min(...cornerKValues))),
|
|
7386
|
+
Math.min(dims[2] - 1, Math.ceil(Math.max(...cornerKValues))),
|
|
7387
|
+
],
|
|
7388
|
+
];
|
|
6532
7389
|
const axisU = gl_matrix__rspack_import_0/* .vec3.create */.eR.vt();
|
|
6533
7390
|
const axisV = gl_matrix__rspack_import_0/* .vec3.create */.eR.vt();
|
|
6534
7391
|
gl_matrix__rspack_import_0/* .vec3.subtract */.eR.Re(axisU, p1, p0);
|
|
@@ -6540,29 +7397,31 @@ function createPointInRectangle(viewport, points, segmentationImageData) {
|
|
|
6540
7397
|
const normal = gl_matrix__rspack_import_0/* .vec3.create */.eR.vt();
|
|
6541
7398
|
gl_matrix__rspack_import_0/* .vec3.cross */.eR.$A(normal, axisU, axisV);
|
|
6542
7399
|
gl_matrix__rspack_import_0/* .vec3.normalize */.eR.S8(normal, normal);
|
|
6543
|
-
const direction = segmentationImageData.getDirection();
|
|
6544
7400
|
const spacing = segmentationImageData.getSpacing();
|
|
6545
|
-
const
|
|
6546
|
-
const
|
|
7401
|
+
const direction = segmentationImageData.getDirection();
|
|
7402
|
+
const projectedSpacing = _cornerstonejs_core__rspack_import_1.utilities.getSpacingInNormalDirection({
|
|
6547
7403
|
direction,
|
|
6548
7404
|
spacing,
|
|
6549
|
-
},
|
|
7405
|
+
}, normal);
|
|
7406
|
+
const thickness = projectedSpacing;
|
|
7407
|
+
const inPlaneSpacing = Math.min(spacing[0], spacing[1]);
|
|
7408
|
+
const inPlaneTolerance = inPlaneSpacing / 2;
|
|
6550
7409
|
const pointInShapeFn = (pointLPS) => {
|
|
6551
7410
|
const v = gl_matrix__rspack_import_0/* .vec3.create */.eR.vt();
|
|
6552
7411
|
gl_matrix__rspack_import_0/* .vec3.subtract */.eR.Re(v, pointLPS, p0);
|
|
6553
7412
|
const u = gl_matrix__rspack_import_0/* .vec3.dot */.eR.Om(v, axisU);
|
|
6554
7413
|
const vproj = gl_matrix__rspack_import_0/* .vec3.dot */.eR.Om(v, axisV);
|
|
6555
|
-
const
|
|
6556
|
-
return (u >= -
|
|
6557
|
-
u <= uLen +
|
|
6558
|
-
vproj >= -
|
|
6559
|
-
vproj <= vLen +
|
|
6560
|
-
|
|
7414
|
+
const distanceToPlane = Math.abs(gl_matrix__rspack_import_0/* .vec3.dot */.eR.Om(v, normal));
|
|
7415
|
+
return (u >= -inPlaneTolerance &&
|
|
7416
|
+
u <= uLen + inPlaneTolerance &&
|
|
7417
|
+
vproj >= -inPlaneTolerance &&
|
|
7418
|
+
vproj <= vLen + inPlaneTolerance &&
|
|
7419
|
+
distanceToPlane <= thickness);
|
|
6561
7420
|
};
|
|
6562
7421
|
return { boundsIJK, pointInShapeFn };
|
|
6563
7422
|
}
|
|
6564
|
-
const RECTANGLE_STRATEGY = new
|
|
6565
|
-
const RECTANGLE_THRESHOLD_STRATEGY = new
|
|
7423
|
+
const RECTANGLE_STRATEGY = new _BrushStrategy_js__rspack_import_2/* ["default"] */.A('Rectangle', _compositions_index_js__rspack_import_4/* ["default"].regionFill */.A.regionFill, _compositions_index_js__rspack_import_4/* ["default"].setValue */.A.setValue, initializeRectangle, _compositions_index_js__rspack_import_4/* ["default"].determineSegmentIndex */.A.determineSegmentIndex, _compositions_index_js__rspack_import_4/* ["default"].preview */.A.preview, _compositions_index_js__rspack_import_4/* ["default"].labelmapStatistics */.A.labelmapStatistics);
|
|
7424
|
+
const RECTANGLE_THRESHOLD_STRATEGY = new _BrushStrategy_js__rspack_import_2/* ["default"] */.A('RectangleThreshold', _compositions_index_js__rspack_import_4/* ["default"].regionFill */.A.regionFill, _compositions_index_js__rspack_import_4/* ["default"].setValue */.A.setValue, initializeRectangle, _compositions_index_js__rspack_import_4/* ["default"].determineSegmentIndex */.A.determineSegmentIndex, _compositions_index_js__rspack_import_4/* ["default"].dynamicThreshold */.A.dynamicThreshold, _compositions_index_js__rspack_import_4/* ["default"].threshold */.A.threshold, _compositions_index_js__rspack_import_4/* ["default"].preview */.A.preview, _compositions_index_js__rspack_import_4/* ["default"].islandRemoval */.A.islandRemoval, _compositions_index_js__rspack_import_4/* ["default"].labelmapStatistics */.A.labelmapStatistics);
|
|
6566
7425
|
const fillInsideRectangle = RECTANGLE_STRATEGY.strategyFunction;
|
|
6567
7426
|
const thresholdInsideRectangle = RECTANGLE_THRESHOLD_STRATEGY.strategyFunction;
|
|
6568
7427
|
|
|
@@ -7081,40 +7940,125 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
7081
7940
|
|
|
7082
7941
|
|
|
7083
7942
|
},
|
|
7084
|
-
|
|
7943
|
+
73820(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
7085
7944
|
/* import */ var _cornerstonejs_core__rspack_import_0 = __webpack_require__(62721);
|
|
7945
|
+
/* import */ var _viewportPresentation_js__rspack_import_1 = __webpack_require__(69356);
|
|
7086
7946
|
|
|
7087
|
-
|
|
7088
|
-
const
|
|
7089
|
-
|
|
7090
|
-
|
|
7091
|
-
|
|
7092
|
-
|
|
7093
|
-
|
|
7094
|
-
|
|
7095
|
-
|
|
7096
|
-
const
|
|
7097
|
-
|
|
7098
|
-
|
|
7099
|
-
|
|
7100
|
-
|
|
7101
|
-
|
|
7102
|
-
|
|
7103
|
-
|
|
7104
|
-
|
|
7105
|
-
|
|
7106
|
-
|
|
7107
|
-
|
|
7108
|
-
|
|
7109
|
-
|
|
7110
|
-
|
|
7111
|
-
|
|
7112
|
-
|
|
7113
|
-
|
|
7114
|
-
|
|
7115
|
-
|
|
7116
|
-
|
|
7117
|
-
|
|
7947
|
+
|
|
7948
|
+
const { RENDERING_DEFAULTS } = _cornerstonejs_core__rspack_import_0.CONSTANTS;
|
|
7949
|
+
function getSlabThicknessOrDefault(viewport) {
|
|
7950
|
+
if (csUtils.isGenericViewport(viewport)) {
|
|
7951
|
+
return RENDERING_DEFAULTS.MINIMUM_SLAB_THICKNESS;
|
|
7952
|
+
}
|
|
7953
|
+
return viewport.getSlabThickness();
|
|
7954
|
+
}
|
|
7955
|
+
function getViewSlabDepthOfViewport(viewport) {
|
|
7956
|
+
const slabThickness = viewport.getSlabThickness?.();
|
|
7957
|
+
if (!Number.isFinite(slabThickness)) {
|
|
7958
|
+
return undefined;
|
|
7959
|
+
}
|
|
7960
|
+
return _cornerstonejs_core__rspack_import_0.utilities.getViewSlabDepth(_cornerstonejs_core__rspack_import_0.utilities.isGenericViewport(viewport) ? slabThickness : slabThickness * 2);
|
|
7961
|
+
}
|
|
7962
|
+
function jumpToFocalPoint(viewport, cameraFocalPoint) {
|
|
7963
|
+
if (csUtils.isGenericViewport(viewport)) {
|
|
7964
|
+
viewport.setViewReference({ cameraFocalPoint });
|
|
7965
|
+
}
|
|
7966
|
+
}
|
|
7967
|
+
function navigatePlanarViewportToPoint(viewport, worldPoint) {
|
|
7968
|
+
if (!csUtils.isGenericViewport(viewport)) {
|
|
7969
|
+
return false;
|
|
7970
|
+
}
|
|
7971
|
+
const isStackContent = viewport.getCurrentMode?.() === 'stack';
|
|
7972
|
+
if (isStackContent) {
|
|
7973
|
+
const stackViewport = viewport;
|
|
7974
|
+
if (typeof stackViewport.getImageIds !== 'function' ||
|
|
7975
|
+
typeof stackViewport.getCurrentImageIdIndex !== 'function') {
|
|
7976
|
+
return false;
|
|
7977
|
+
}
|
|
7978
|
+
let imageIndex = null;
|
|
7979
|
+
try {
|
|
7980
|
+
imageIndex = csUtils.getClosestStackImageIndexForPoint(worldPoint, stackViewport);
|
|
7981
|
+
}
|
|
7982
|
+
catch {
|
|
7983
|
+
return false;
|
|
7984
|
+
}
|
|
7985
|
+
if (imageIndex === null || imageIndex < 0) {
|
|
7986
|
+
return false;
|
|
7987
|
+
}
|
|
7988
|
+
viewport.setViewReference({
|
|
7989
|
+
sliceIndex: imageIndex,
|
|
7990
|
+
});
|
|
7991
|
+
return true;
|
|
7992
|
+
}
|
|
7993
|
+
viewport.setViewReference({
|
|
7994
|
+
cameraFocalPoint: [worldPoint[0], worldPoint[1], worldPoint[2]],
|
|
7995
|
+
});
|
|
7996
|
+
return true;
|
|
7997
|
+
}
|
|
7998
|
+
function getNativeSourceProperties(viewport) {
|
|
7999
|
+
if (!csUtils.viewportSupportsDisplaySetPresentation(viewport)) {
|
|
8000
|
+
return { properties: {} };
|
|
8001
|
+
}
|
|
8002
|
+
const sourceDataId = viewport.getSourceDataId();
|
|
8003
|
+
const properties = {
|
|
8004
|
+
...((sourceDataId
|
|
8005
|
+
? viewport.getDisplaySetPresentation(sourceDataId)
|
|
8006
|
+
: {}) ?? {}),
|
|
8007
|
+
};
|
|
8008
|
+
const voiLUTFunction = properties.VOILUTFunction ?? properties.voiLUTFunction;
|
|
8009
|
+
if (voiLUTFunction !== undefined) {
|
|
8010
|
+
properties.VOILUTFunction = voiLUTFunction;
|
|
8011
|
+
}
|
|
8012
|
+
const presentation = (getViewportPresentation(viewport) ?? {});
|
|
8013
|
+
return {
|
|
8014
|
+
properties,
|
|
8015
|
+
rotation: presentation.rotation,
|
|
8016
|
+
flipHorizontal: presentation.flipHorizontal,
|
|
8017
|
+
flipVertical: presentation.flipVertical,
|
|
8018
|
+
currentImageId: viewport.getCurrentImageId(),
|
|
8019
|
+
};
|
|
8020
|
+
}
|
|
8021
|
+
|
|
8022
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
8023
|
+
_U: () => (getViewSlabDepthOfViewport)
|
|
8024
|
+
});
|
|
8025
|
+
|
|
8026
|
+
|
|
8027
|
+
},
|
|
8028
|
+
67392(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
8029
|
+
/* import */ var _cornerstonejs_core__rspack_import_0 = __webpack_require__(62721);
|
|
8030
|
+
|
|
8031
|
+
const { CalibrationTypes } = _cornerstonejs_core__rspack_import_0.Enums;
|
|
8032
|
+
const PIXEL_UNITS = 'px';
|
|
8033
|
+
const VOXEL_UNITS = 'voxels';
|
|
8034
|
+
const SUPPORTED_REGION_DATA_TYPES = [
|
|
8035
|
+
1,
|
|
8036
|
+
2,
|
|
8037
|
+
3,
|
|
8038
|
+
4,
|
|
8039
|
+
];
|
|
8040
|
+
const SUPPORTED_PROBE_VARIANT = [
|
|
8041
|
+
'4,3',
|
|
8042
|
+
'4,7',
|
|
8043
|
+
'4,-1',
|
|
8044
|
+
];
|
|
8045
|
+
const UNIT_MAPPING = {
|
|
8046
|
+
0: 'px',
|
|
8047
|
+
1: 'percent',
|
|
8048
|
+
2: 'dB',
|
|
8049
|
+
3: 'cm',
|
|
8050
|
+
4: 'seconds',
|
|
8051
|
+
5: 'hertz',
|
|
8052
|
+
6: 'dB/seconds',
|
|
8053
|
+
7: 'cm/sec',
|
|
8054
|
+
8: 'cm\xb2',
|
|
8055
|
+
9: 'cm\xb2/s',
|
|
8056
|
+
0xc: 'degrees',
|
|
8057
|
+
[-1]: 'mV',
|
|
8058
|
+
};
|
|
8059
|
+
const EPS = 1e-3;
|
|
8060
|
+
const SQUARE = '\xb2';
|
|
8061
|
+
const types = [
|
|
7118
8062
|
CalibrationTypes.ERMF,
|
|
7119
8063
|
CalibrationTypes.USER,
|
|
7120
8064
|
CalibrationTypes.ERROR,
|
|
@@ -7493,9 +8437,10 @@ const precalculatePointInEllipse = (ellipse, inverts = {}) => {
|
|
|
7493
8437
|
|
|
7494
8438
|
;// CONCATENATED MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/ellipse/getCanvasEllipseCorners.js
|
|
7495
8439
|
function getCanvasEllipseCorners(ellipseCanvasPoints) {
|
|
7496
|
-
const
|
|
7497
|
-
const
|
|
7498
|
-
const
|
|
8440
|
+
const xs = ellipseCanvasPoints.map((point) => point[0]);
|
|
8441
|
+
const ys = ellipseCanvasPoints.map((point) => point[1]);
|
|
8442
|
+
const topLeft = [Math.min(...xs), Math.min(...ys)];
|
|
8443
|
+
const bottomRight = [Math.max(...xs), Math.max(...ys)];
|
|
7499
8444
|
return [topLeft, bottomRight];
|
|
7500
8445
|
}
|
|
7501
8446
|
|
|
@@ -7537,8 +8482,8 @@ var ellipse = __webpack_require__(88688);
|
|
|
7537
8482
|
var line = __webpack_require__(48682);
|
|
7538
8483
|
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/point/index.js + 1 modules
|
|
7539
8484
|
var point = __webpack_require__(3756);
|
|
7540
|
-
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/polyline/index.js +
|
|
7541
|
-
var polyline = __webpack_require__(
|
|
8485
|
+
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/polyline/index.js + 3 modules
|
|
8486
|
+
var polyline = __webpack_require__(1109);
|
|
7542
8487
|
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/rectangle/index.js
|
|
7543
8488
|
var rectangle = __webpack_require__(3001);
|
|
7544
8489
|
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/vec2/index.js
|
|
@@ -7610,6 +8555,50 @@ function mirror(mirrorPoint, staticPoint) {
|
|
|
7610
8555
|
|
|
7611
8556
|
|
|
7612
8557
|
|
|
8558
|
+
},
|
|
8559
|
+
45393(__unused_rspack___webpack_module__, __unused_rspack___webpack_exports__, __webpack_require__) {
|
|
8560
|
+
/* import */ var _isClosed_js__rspack_import_0 = __webpack_require__(89102);
|
|
8561
|
+
|
|
8562
|
+
function containsPoint(polyline, point, options = {
|
|
8563
|
+
closed: undefined,
|
|
8564
|
+
}) {
|
|
8565
|
+
if (polyline.length < 3) {
|
|
8566
|
+
return false;
|
|
8567
|
+
}
|
|
8568
|
+
const numPolylinePoints = polyline.length;
|
|
8569
|
+
let numIntersections = 0;
|
|
8570
|
+
const { closed, holes } = options;
|
|
8571
|
+
if (holes?.length) {
|
|
8572
|
+
for (const hole of holes) {
|
|
8573
|
+
if (containsPoint(hole, point)) {
|
|
8574
|
+
return false;
|
|
8575
|
+
}
|
|
8576
|
+
}
|
|
8577
|
+
}
|
|
8578
|
+
const shouldClose = !(closed === undefined ? isClosed(polyline) : closed);
|
|
8579
|
+
const maxSegmentIndex = polyline.length - (shouldClose ? 1 : 2);
|
|
8580
|
+
for (let i = 0; i <= maxSegmentIndex; i++) {
|
|
8581
|
+
const p1 = polyline[i];
|
|
8582
|
+
const p2Index = i === numPolylinePoints - 1 ? 0 : i + 1;
|
|
8583
|
+
const p2 = polyline[p2Index];
|
|
8584
|
+
const maxX = p1[0] >= p2[0] ? p1[0] : p2[0];
|
|
8585
|
+
const maxY = p1[1] >= p2[1] ? p1[1] : p2[1];
|
|
8586
|
+
const minY = p1[1] <= p2[1] ? p1[1] : p2[1];
|
|
8587
|
+
const mayIntersectLineSegment = point[0] <= maxX && point[1] >= minY && point[1] < maxY;
|
|
8588
|
+
if (mayIntersectLineSegment) {
|
|
8589
|
+
const isVerticalLine = p1[0] === p2[0];
|
|
8590
|
+
let intersects = isVerticalLine;
|
|
8591
|
+
if (!intersects) {
|
|
8592
|
+
const xIntersection = ((point[1] - p1[1]) * (p2[0] - p1[0])) / (p2[1] - p1[1]) + p1[0];
|
|
8593
|
+
intersects = point[0] <= xIntersection;
|
|
8594
|
+
}
|
|
8595
|
+
numIntersections += intersects ? 1 : 0;
|
|
8596
|
+
}
|
|
8597
|
+
}
|
|
8598
|
+
return !!(numIntersections % 2);
|
|
8599
|
+
}
|
|
8600
|
+
|
|
8601
|
+
|
|
7613
8602
|
},
|
|
7614
8603
|
33290(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
7615
8604
|
function getAABB(polyline, options) {
|
|
@@ -7659,7 +8648,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
7659
8648
|
|
|
7660
8649
|
|
|
7661
8650
|
},
|
|
7662
|
-
|
|
8651
|
+
1109(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
7663
8652
|
|
|
7664
8653
|
// EXPORTS
|
|
7665
8654
|
__webpack_require__.d(__webpack_exports__, {
|
|
@@ -7670,17 +8659,16 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
7670
8659
|
getFirstLineSegmentIntersectionIndexes: () => (/* reexport */ getFirstLineSegmentIntersectionIndexes/* ["default"] */.A),
|
|
7671
8660
|
getSubPixelSpacingAndXYDirections: () => (/* reexport */ getSubPixelSpacingAndXYDirections/* ["default"] */.A),
|
|
7672
8661
|
getWindingDirection: () => (/* reexport */ getWindingDirection/* ["default"] */.A),
|
|
7673
|
-
isPointInsidePolyline3D: () => (/* reexport */ isPointInsidePolyline3D/* .isPointInsidePolyline3D */.i),
|
|
7674
8662
|
pointCanProjectOnLine: () => (/* reexport */ pointCanProjectOnLine/* ["default"] */.A),
|
|
7675
8663
|
pointsAreWithinCloseContourProximity: () => (/* reexport */ pointsAreWithinCloseContourProximity/* ["default"] */.A)
|
|
7676
8664
|
});
|
|
7677
8665
|
|
|
7678
|
-
// UNUSED EXPORTS: arePolylinesIdentical, containsPoint, containsPoints, convexHull, getClosestLineSegmentIntersection, getLineSegmentIntersectionsCoordinates, getLineSegmentIntersectionsIndexes, getNormal2, getNormal3, getSignedArea, intersectPolyline, intersectPolylines, isClosed, mergePolylines, projectTo2D, subtractPolylines
|
|
8666
|
+
// UNUSED EXPORTS: arePolylinesIdentical, containsPoint, containsPoints, convexHull, getClosestLineSegmentIntersection, getLineSegmentIntersectionsCoordinates, getLineSegmentIntersectionsIndexes, getNormal2, getNormal3, getSignedArea, intersectPolyline, intersectPolylines, isClosed, isPointInsidePolyline3D, mergePolylines, projectTo2D, subtractPolylines
|
|
7679
8667
|
|
|
7680
8668
|
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/polyline/isClosed.js
|
|
7681
8669
|
var isClosed = __webpack_require__(89102);
|
|
7682
8670
|
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/polyline/containsPoint.js
|
|
7683
|
-
var
|
|
8671
|
+
var polyline_containsPoint = __webpack_require__(45393);
|
|
7684
8672
|
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/polyline/containsPoints.js
|
|
7685
8673
|
var containsPoints = __webpack_require__(56772);
|
|
7686
8674
|
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/polyline/getAABB.js
|
|
@@ -7721,10 +8709,62 @@ var pointsAreWithinCloseContourProximity = __webpack_require__(41177);
|
|
|
7721
8709
|
var addCanvasPointsToArray = __webpack_require__(13248);
|
|
7722
8710
|
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/polyline/pointCanProjectOnLine.js
|
|
7723
8711
|
var pointCanProjectOnLine = __webpack_require__(94018);
|
|
7724
|
-
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/
|
|
7725
|
-
var
|
|
7726
|
-
|
|
7727
|
-
|
|
8712
|
+
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/core/dist/esm/index.js
|
|
8713
|
+
var esm = __webpack_require__(62721);
|
|
8714
|
+
;// CONCATENATED MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/polyline/projectTo2D.js
|
|
8715
|
+
|
|
8716
|
+
const epsilon = 1e-6;
|
|
8717
|
+
function projectTo2D_projectTo2D(polyline) {
|
|
8718
|
+
let sharedDimensionIndex;
|
|
8719
|
+
const testPoints = utilities.getRandomSampleFromArray(polyline, 50);
|
|
8720
|
+
for (let i = 0; i < 3; i++) {
|
|
8721
|
+
if (testPoints.every((point, index, array) => Math.abs(point[i] - array[0][i]) < epsilon)) {
|
|
8722
|
+
sharedDimensionIndex = i;
|
|
8723
|
+
break;
|
|
8724
|
+
}
|
|
8725
|
+
}
|
|
8726
|
+
if (sharedDimensionIndex === undefined) {
|
|
8727
|
+
throw new Error('Cannot find a shared dimension index for polyline, probably oblique plane');
|
|
8728
|
+
}
|
|
8729
|
+
const points2D = [];
|
|
8730
|
+
const firstDim = (sharedDimensionIndex + 1) % 3;
|
|
8731
|
+
const secondDim = (sharedDimensionIndex + 2) % 3;
|
|
8732
|
+
for (let i = 0; i < polyline.length; i++) {
|
|
8733
|
+
points2D.push([polyline[i][firstDim], polyline[i][secondDim]]);
|
|
8734
|
+
}
|
|
8735
|
+
return {
|
|
8736
|
+
sharedDimensionIndex,
|
|
8737
|
+
projectedPolyline: points2D,
|
|
8738
|
+
};
|
|
8739
|
+
}
|
|
8740
|
+
|
|
8741
|
+
;// CONCATENATED MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/polyline/isPointInsidePolyline3D.js
|
|
8742
|
+
|
|
8743
|
+
|
|
8744
|
+
function isPointInsidePolyline3D(point, polyline, options = {}) {
|
|
8745
|
+
const { sharedDimensionIndex, projectedPolyline } = projectTo2D(polyline);
|
|
8746
|
+
const { holes } = options;
|
|
8747
|
+
const projectedHoles = [];
|
|
8748
|
+
if (holes) {
|
|
8749
|
+
for (let i = 0; i < holes.length; i++) {
|
|
8750
|
+
const hole = holes[i];
|
|
8751
|
+
const hole2D = [];
|
|
8752
|
+
for (let j = 0; j < hole.length; j++) {
|
|
8753
|
+
hole2D.push([
|
|
8754
|
+
hole[j][(sharedDimensionIndex + 1) % 3],
|
|
8755
|
+
hole[j][(sharedDimensionIndex + 2) % 3],
|
|
8756
|
+
]);
|
|
8757
|
+
}
|
|
8758
|
+
projectedHoles.push(hole2D);
|
|
8759
|
+
}
|
|
8760
|
+
}
|
|
8761
|
+
const point2D = [
|
|
8762
|
+
point[(sharedDimensionIndex + 1) % 3],
|
|
8763
|
+
point[(sharedDimensionIndex + 2) % 3],
|
|
8764
|
+
];
|
|
8765
|
+
return containsPoint(projectedPolyline, point2D, { holes: projectedHoles });
|
|
8766
|
+
}
|
|
8767
|
+
|
|
7728
8768
|
;// CONCATENATED MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/polyline/convexHull.js
|
|
7729
8769
|
function convexHull(pts) {
|
|
7730
8770
|
if (pts.length < 3) {
|
|
@@ -7788,6 +8828,24 @@ var arePolylinesIdentical = __webpack_require__(62290);
|
|
|
7788
8828
|
|
|
7789
8829
|
|
|
7790
8830
|
|
|
8831
|
+
|
|
8832
|
+
|
|
8833
|
+
},
|
|
8834
|
+
89102(__unused_rspack___webpack_module__, __unused_rspack___webpack_exports__, __webpack_require__) {
|
|
8835
|
+
/* import */ var gl_matrix__rspack_import_0 = __webpack_require__(50341);
|
|
8836
|
+
/* import */ var _point_index_js__rspack_import_1 = __webpack_require__(3756);
|
|
8837
|
+
|
|
8838
|
+
|
|
8839
|
+
function isClosed(polyline) {
|
|
8840
|
+
if (polyline.length < 3) {
|
|
8841
|
+
return false;
|
|
8842
|
+
}
|
|
8843
|
+
const numPolylinePoints = polyline.length;
|
|
8844
|
+
const firstPoint = polyline[0];
|
|
8845
|
+
const lastPoint = polyline[numPolylinePoints - 1];
|
|
8846
|
+
const distFirstToLastPoints = distanceToPointSquared(firstPoint, lastPoint);
|
|
8847
|
+
return glMatrix.equals(0, distFirstToLastPoints);
|
|
8848
|
+
}
|
|
7791
8849
|
|
|
7792
8850
|
|
|
7793
8851
|
},
|
|
@@ -8651,7 +9709,38 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
8651
9709
|
|
|
8652
9710
|
|
|
8653
9711
|
},
|
|
8654
|
-
|
|
9712
|
+
69356(__unused_rspack___webpack_module__, __unused_rspack___webpack_exports__, __webpack_require__) {
|
|
9713
|
+
/* import */ var _cornerstonejs_core__rspack_import_0 = __webpack_require__(62721);
|
|
9714
|
+
|
|
9715
|
+
function getViewportPresentation(viewport, selector) {
|
|
9716
|
+
const projectionPresentation = viewportProjection.getPresentation(viewport, {
|
|
9717
|
+
selector,
|
|
9718
|
+
});
|
|
9719
|
+
if (projectionPresentation) {
|
|
9720
|
+
return projectionPresentation;
|
|
9721
|
+
}
|
|
9722
|
+
return viewport.getViewPresentation?.(selector);
|
|
9723
|
+
}
|
|
9724
|
+
function applyViewportPresentation(viewport, presentation) {
|
|
9725
|
+
if (!presentation) {
|
|
9726
|
+
return false;
|
|
9727
|
+
}
|
|
9728
|
+
const target = viewport;
|
|
9729
|
+
const nextViewState = viewportProjection.withPresentation(viewport, presentation);
|
|
9730
|
+
if (nextViewState && typeof target.setViewState === 'function') {
|
|
9731
|
+
target.setViewState(nextViewState);
|
|
9732
|
+
return true;
|
|
9733
|
+
}
|
|
9734
|
+
if (typeof target.setViewPresentation === 'function') {
|
|
9735
|
+
target.setViewPresentation(presentation);
|
|
9736
|
+
return true;
|
|
9737
|
+
}
|
|
9738
|
+
return false;
|
|
9739
|
+
}
|
|
9740
|
+
|
|
9741
|
+
|
|
9742
|
+
},
|
|
9743
|
+
77911(__unused_rspack___webpack_module__, __unused_rspack___webpack_exports__, __webpack_require__) {
|
|
8655
9744
|
|
|
8656
9745
|
// EXTERNAL MODULE: ../../node_modules/comlink/dist/esm/comlink.mjs
|
|
8657
9746
|
var comlink = __webpack_require__(47695);
|
|
@@ -8667,245 +9756,8 @@ var rectangleROIThresholdVolumeByRange = __webpack_require__(75267);
|
|
|
8667
9756
|
var createMergedLabelmapForIndex = __webpack_require__(77838);
|
|
8668
9757
|
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/utilities/segmentation/createLabelmapVolumeForViewport.js
|
|
8669
9758
|
var createLabelmapVolumeForViewport = __webpack_require__(57044);
|
|
8670
|
-
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/
|
|
8671
|
-
var
|
|
8672
|
-
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/getSegmentation.js
|
|
8673
|
-
var segmentation_getSegmentation = __webpack_require__(50115);
|
|
8674
|
-
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/getSegmentationRepresentation.js
|
|
8675
|
-
var getSegmentationRepresentation = __webpack_require__(47290);
|
|
8676
|
-
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/store/addTool.js
|
|
8677
|
-
var addTool = __webpack_require__(36552);
|
|
8678
|
-
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/store/state.js
|
|
8679
|
-
var state = __webpack_require__(57908);
|
|
8680
|
-
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/tools/annotation/PlanarFreehandContourSegmentationTool.js
|
|
8681
|
-
var PlanarFreehandContourSegmentationTool = __webpack_require__(31382);
|
|
8682
|
-
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/store/ToolGroupManager/index.js + 5 modules
|
|
8683
|
-
var ToolGroupManager = __webpack_require__(91893);
|
|
8684
|
-
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/segmentationEventManager.js
|
|
8685
|
-
var segmentationEventManager = __webpack_require__(65604);
|
|
8686
|
-
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/SegmentationRepresentationDisplayRegistry.js
|
|
8687
|
-
var SegmentationRepresentationDisplayRegistry = __webpack_require__(55377);
|
|
8688
|
-
;// CONCATENATED MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/SegmentationRenderingEngine.js
|
|
8689
|
-
|
|
8690
|
-
|
|
8691
|
-
|
|
8692
|
-
|
|
8693
|
-
|
|
8694
|
-
|
|
8695
|
-
|
|
8696
|
-
|
|
8697
|
-
|
|
8698
|
-
|
|
8699
|
-
|
|
8700
|
-
const cs3dLogger = esm.utilities.logger.toolsLog.getLogger('stateManagement.segmentation.SegmentationRenderingEngine');
|
|
8701
|
-
const planarContourToolName = PlanarFreehandContourSegmentationTool/* ["default"].toolName */.A.toolName;
|
|
8702
|
-
class SegmentationRenderingEngine {
|
|
8703
|
-
constructor() {
|
|
8704
|
-
this._needsRender = new Set();
|
|
8705
|
-
this._pendingRenderQueue = [];
|
|
8706
|
-
this._animationFrameSet = false;
|
|
8707
|
-
this._animationFrameHandle = null;
|
|
8708
|
-
this._getAllViewports = () => {
|
|
8709
|
-
const renderingEngine = (0,esm.getRenderingEngines)();
|
|
8710
|
-
return renderingEngine.flatMap((renderingEngine) => renderingEngine.getViewports());
|
|
8711
|
-
};
|
|
8712
|
-
this._renderFlaggedSegmentations = () => {
|
|
8713
|
-
this._throwIfDestroyed();
|
|
8714
|
-
const viewportIds = Array.from(this._needsRender);
|
|
8715
|
-
viewportIds.forEach((viewportId) => {
|
|
8716
|
-
this._triggerRender(viewportId);
|
|
8717
|
-
});
|
|
8718
|
-
this._needsRender.clear();
|
|
8719
|
-
this._animationFrameSet = false;
|
|
8720
|
-
this._animationFrameHandle = null;
|
|
8721
|
-
if (this._pendingRenderQueue.length > 0) {
|
|
8722
|
-
const nextViewportIds = this._pendingRenderQueue.shift();
|
|
8723
|
-
if (nextViewportIds && nextViewportIds.length > 0) {
|
|
8724
|
-
this._setViewportsToBeRenderedNextFrame(nextViewportIds);
|
|
8725
|
-
}
|
|
8726
|
-
}
|
|
8727
|
-
};
|
|
8728
|
-
}
|
|
8729
|
-
renderSegmentationsForViewport(viewportId) {
|
|
8730
|
-
const viewportIds = viewportId
|
|
8731
|
-
? [viewportId]
|
|
8732
|
-
: this._getViewportIdsForSegmentation();
|
|
8733
|
-
this._setViewportsToBeRenderedNextFrame(viewportIds);
|
|
8734
|
-
}
|
|
8735
|
-
renderSegmentation(segmentationId) {
|
|
8736
|
-
const viewportIds = this._getViewportIdsForSegmentation(segmentationId);
|
|
8737
|
-
this._setViewportsToBeRenderedNextFrame(viewportIds);
|
|
8738
|
-
}
|
|
8739
|
-
_getViewportIdsForSegmentation(segmentationId) {
|
|
8740
|
-
const viewports = this._getAllViewports();
|
|
8741
|
-
const viewportIds = [];
|
|
8742
|
-
for (const viewport of viewports) {
|
|
8743
|
-
const viewportId = viewport.id;
|
|
8744
|
-
if (segmentationId) {
|
|
8745
|
-
const segmentationRepresentations = (0,getSegmentationRepresentation/* .getSegmentationRepresentations */.r$)(viewportId, { segmentationId });
|
|
8746
|
-
if (segmentationRepresentations?.length > 0) {
|
|
8747
|
-
viewportIds.push(viewportId);
|
|
8748
|
-
}
|
|
8749
|
-
}
|
|
8750
|
-
else {
|
|
8751
|
-
const segmentationRepresentations = (0,getSegmentationRepresentation/* .getSegmentationRepresentations */.r$)(viewportId);
|
|
8752
|
-
if (segmentationRepresentations?.length > 0) {
|
|
8753
|
-
viewportIds.push(viewportId);
|
|
8754
|
-
}
|
|
8755
|
-
}
|
|
8756
|
-
}
|
|
8757
|
-
return viewportIds;
|
|
8758
|
-
}
|
|
8759
|
-
_throwIfDestroyed() {
|
|
8760
|
-
if (this.hasBeenDestroyed) {
|
|
8761
|
-
throw new Error('this.destroy() has been manually called to free up memory, can not longer use this instance. Instead make a new one.');
|
|
8762
|
-
}
|
|
8763
|
-
}
|
|
8764
|
-
_setViewportsToBeRenderedNextFrame(viewportIds) {
|
|
8765
|
-
if (this._animationFrameSet) {
|
|
8766
|
-
this._pendingRenderQueue.push(viewportIds);
|
|
8767
|
-
return;
|
|
8768
|
-
}
|
|
8769
|
-
viewportIds.forEach((viewportId) => {
|
|
8770
|
-
this._needsRender.add(viewportId);
|
|
8771
|
-
});
|
|
8772
|
-
this._render();
|
|
8773
|
-
}
|
|
8774
|
-
_render() {
|
|
8775
|
-
if (this._needsRender.size > 0 && this._animationFrameSet === false) {
|
|
8776
|
-
this._animationFrameHandle = window.requestAnimationFrame(this._renderFlaggedSegmentations);
|
|
8777
|
-
this._animationFrameSet = true;
|
|
8778
|
-
}
|
|
8779
|
-
}
|
|
8780
|
-
_triggerRender(viewportId) {
|
|
8781
|
-
const segmentationRepresentations = (0,getSegmentationRepresentation/* .getSegmentationRepresentations */.r$)(viewportId);
|
|
8782
|
-
if (!segmentationRepresentations?.length) {
|
|
8783
|
-
return;
|
|
8784
|
-
}
|
|
8785
|
-
const { viewport } = (0,esm.getEnabledElementByViewportId)(viewportId) || {};
|
|
8786
|
-
if (!viewport) {
|
|
8787
|
-
return;
|
|
8788
|
-
}
|
|
8789
|
-
const segmentationRenderList = segmentationRepresentations.map((representation) => {
|
|
8790
|
-
if (representation.type === enums.SegmentationRepresentations.Contour) {
|
|
8791
|
-
this._addPlanarFreeHandToolIfAbsent(viewport);
|
|
8792
|
-
}
|
|
8793
|
-
const display = (0,SegmentationRepresentationDisplayRegistry/* .getSegmentationRepresentationDisplay */.I)(representation.type);
|
|
8794
|
-
const segmentation = (0,segmentation_getSegmentation/* .getSegmentation */.T)(representation.segmentationId);
|
|
8795
|
-
const existingRepresentation = segmentation.representationData[representation.type] !== undefined;
|
|
8796
|
-
if (!display) {
|
|
8797
|
-
cs3dLogger.warn(`No display registered for segmentation representation type ${representation.type}.`);
|
|
8798
|
-
return Promise.resolve({
|
|
8799
|
-
segmentationId: representation.segmentationId,
|
|
8800
|
-
type: representation.type,
|
|
8801
|
-
});
|
|
8802
|
-
}
|
|
8803
|
-
return display
|
|
8804
|
-
.render(viewport, representation)
|
|
8805
|
-
.then(() => {
|
|
8806
|
-
if (!existingRepresentation) {
|
|
8807
|
-
(0,segmentationEventManager/* .addDefaultSegmentationListener */.Np)(viewport, representation.segmentationId, representation.type);
|
|
8808
|
-
}
|
|
8809
|
-
return {
|
|
8810
|
-
segmentationId: representation.segmentationId,
|
|
8811
|
-
type: representation.type,
|
|
8812
|
-
};
|
|
8813
|
-
})
|
|
8814
|
-
.catch((error) => {
|
|
8815
|
-
cs3dLogger.error(error);
|
|
8816
|
-
return {
|
|
8817
|
-
segmentationId: representation.segmentationId,
|
|
8818
|
-
type: representation.type,
|
|
8819
|
-
};
|
|
8820
|
-
});
|
|
8821
|
-
});
|
|
8822
|
-
Promise.allSettled(segmentationRenderList).then((results) => {
|
|
8823
|
-
const segmentationDetails = results
|
|
8824
|
-
.filter((r) => r.status === 'fulfilled')
|
|
8825
|
-
.map((r) => r.value);
|
|
8826
|
-
function onSegmentationRender(evt) {
|
|
8827
|
-
const { element, viewportId } = evt.detail;
|
|
8828
|
-
element.removeEventListener(esm.Enums.Events.IMAGE_RENDERED, onSegmentationRender);
|
|
8829
|
-
segmentationDetails.forEach((detail) => {
|
|
8830
|
-
const eventDetail = {
|
|
8831
|
-
viewportId,
|
|
8832
|
-
segmentationId: detail.segmentationId,
|
|
8833
|
-
type: detail.type,
|
|
8834
|
-
};
|
|
8835
|
-
(0,esm.triggerEvent)(esm.eventTarget, enums.Events.SEGMENTATION_RENDERED, {
|
|
8836
|
-
...eventDetail,
|
|
8837
|
-
});
|
|
8838
|
-
});
|
|
8839
|
-
}
|
|
8840
|
-
const element = viewport.element;
|
|
8841
|
-
element.addEventListener(esm.Enums.Events.IMAGE_RENDERED, onSegmentationRender);
|
|
8842
|
-
viewport.render();
|
|
8843
|
-
});
|
|
8844
|
-
}
|
|
8845
|
-
_addPlanarFreeHandToolIfAbsent(viewport) {
|
|
8846
|
-
if (!(planarContourToolName in state/* .state.tools */.wk.tools)) {
|
|
8847
|
-
(0,addTool/* .addTool */.Gx)(PlanarFreehandContourSegmentationTool/* ["default"] */.A);
|
|
8848
|
-
}
|
|
8849
|
-
const toolGroup = (0,ToolGroupManager.getToolGroupForViewport)(viewport.id);
|
|
8850
|
-
if (!toolGroup.hasTool(planarContourToolName)) {
|
|
8851
|
-
toolGroup.addTool(planarContourToolName);
|
|
8852
|
-
toolGroup.setToolPassive(planarContourToolName);
|
|
8853
|
-
}
|
|
8854
|
-
}
|
|
8855
|
-
}
|
|
8856
|
-
function triggerSegmentationRender(viewportId) {
|
|
8857
|
-
segmentationRenderingEngine.renderSegmentationsForViewport(viewportId);
|
|
8858
|
-
}
|
|
8859
|
-
function triggerSegmentationRenderBySegmentationId(segmentationId) {
|
|
8860
|
-
segmentationRenderingEngine.renderSegmentation(segmentationId);
|
|
8861
|
-
}
|
|
8862
|
-
const DEFERRED_SEGMENTATION_RENDER_DELAY_MS = 240;
|
|
8863
|
-
const deferredSegmentationRenderTimers = new Map();
|
|
8864
|
-
function isProjectionHeavySegmentationViewport(viewport) {
|
|
8865
|
-
const blendMode = viewport.getBlendMode?.();
|
|
8866
|
-
if (blendMode === Enums.BlendModes.LABELMAP_EDGE_PROJECTION_BLEND) {
|
|
8867
|
-
return true;
|
|
8868
|
-
}
|
|
8869
|
-
const planarViewport = viewport;
|
|
8870
|
-
if (typeof planarViewport.getDisplaySetPresentation !== 'function') {
|
|
8871
|
-
return false;
|
|
8872
|
-
}
|
|
8873
|
-
const dataIds = [];
|
|
8874
|
-
const sourceDataId = planarViewport.getSourceDataId?.();
|
|
8875
|
-
if (sourceDataId) {
|
|
8876
|
-
dataIds.push(sourceDataId);
|
|
8877
|
-
}
|
|
8878
|
-
planarViewport.getActors?.().forEach((actorEntry) => {
|
|
8879
|
-
if (actorEntry.representationUID) {
|
|
8880
|
-
dataIds.push(String(actorEntry.representationUID));
|
|
8881
|
-
}
|
|
8882
|
-
});
|
|
8883
|
-
return dataIds.some((dataId) => (planarViewport.getDisplaySetPresentation(dataId)?.slabThickness ?? 0) > 0);
|
|
8884
|
-
}
|
|
8885
|
-
function triggerSegmentationRenderForModified(segmentationId) {
|
|
8886
|
-
const viewportIds = segmentationRenderingEngine._getViewportIdsForSegmentation(segmentationId);
|
|
8887
|
-
viewportIds.forEach((viewportId) => {
|
|
8888
|
-
const { viewport } = getEnabledElementByViewportId(viewportId) || {};
|
|
8889
|
-
if (!viewport) {
|
|
8890
|
-
return;
|
|
8891
|
-
}
|
|
8892
|
-
if (!isProjectionHeavySegmentationViewport(viewport)) {
|
|
8893
|
-
segmentationRenderingEngine.renderSegmentationsForViewport(viewportId);
|
|
8894
|
-
return;
|
|
8895
|
-
}
|
|
8896
|
-
const existingTimer = deferredSegmentationRenderTimers.get(viewportId);
|
|
8897
|
-
if (existingTimer !== undefined) {
|
|
8898
|
-
clearTimeout(existingTimer);
|
|
8899
|
-
}
|
|
8900
|
-
deferredSegmentationRenderTimers.set(viewportId, setTimeout(() => {
|
|
8901
|
-
deferredSegmentationRenderTimers.delete(viewportId);
|
|
8902
|
-
segmentationRenderingEngine.renderSegmentationsForViewport(viewportId);
|
|
8903
|
-
}, DEFERRED_SEGMENTATION_RENDER_DELAY_MS));
|
|
8904
|
-
});
|
|
8905
|
-
}
|
|
8906
|
-
const segmentationRenderingEngine = new SegmentationRenderingEngine();
|
|
8907
|
-
|
|
8908
|
-
|
|
9759
|
+
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/SegmentationRenderingEngine.js
|
|
9760
|
+
var SegmentationRenderingEngine = __webpack_require__(79157);
|
|
8909
9761
|
;// CONCATENATED MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/utilities/segmentation/floodFill.js
|
|
8910
9762
|
function floodFill(getter, seed, options = {}) {
|
|
8911
9763
|
const onFlood = options.onFlood;
|
|
@@ -9044,8 +9896,12 @@ var createBidirectionalToolData = __webpack_require__(77234);
|
|
|
9044
9896
|
var segmentContourAction = __webpack_require__(66816);
|
|
9045
9897
|
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/utilities/segmentation/invalidateBrushCursor.js
|
|
9046
9898
|
var invalidateBrushCursor = __webpack_require__(46010);
|
|
9899
|
+
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/enums/index.js + 3 modules
|
|
9900
|
+
var enums = __webpack_require__(36776);
|
|
9047
9901
|
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/utilities/segmentation/utilities.js
|
|
9048
9902
|
var segmentation_utilities = __webpack_require__(57055);
|
|
9903
|
+
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/getSegmentation.js
|
|
9904
|
+
var segmentation_getSegmentation = __webpack_require__(50115);
|
|
9049
9905
|
;// CONCATENATED MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/utilities/segmentation/getUniqueSegmentIndices.js
|
|
9050
9906
|
|
|
9051
9907
|
|
|
@@ -9105,8 +9961,8 @@ function handleSurfaceSegmentation(segmentation) {
|
|
|
9105
9961
|
var segmentationState = __webpack_require__(61342);
|
|
9106
9962
|
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/index.js
|
|
9107
9963
|
var stateManagement = __webpack_require__(63666);
|
|
9108
|
-
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/polyline/index.js +
|
|
9109
|
-
var math_polyline = __webpack_require__(
|
|
9964
|
+
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/polyline/index.js + 3 modules
|
|
9965
|
+
var math_polyline = __webpack_require__(1109);
|
|
9110
9966
|
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/utilities/planar/filterAnnotationsForDisplay.js
|
|
9111
9967
|
var planar_filterAnnotationsForDisplay = __webpack_require__(29362);
|
|
9112
9968
|
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/helpers/getSegmentationActor.js
|
|
@@ -9481,7 +10337,7 @@ fn main(
|
|
|
9481
10337
|
|
|
9482
10338
|
|
|
9483
10339
|
|
|
9484
|
-
const
|
|
10340
|
+
const cs3dLogger = esm.utilities.logger.toolsLog.getLogger('utilities.segmentation.growCut.runGrowCut');
|
|
9485
10341
|
const GB = (/* unused pure expression or super */ null && (1024 * 1024 * 1024));
|
|
9486
10342
|
const WEBGPU_MEMORY_LIMIT = (/* unused pure expression or super */ null && (1.99 * GB));
|
|
9487
10343
|
const DEFAULT_GROWCUT_OPTIONS = (/* unused pure expression or super */ null && ({
|
|
@@ -9755,7 +10611,7 @@ async function runGrowCut(referenceVolumeId, labelmapVolumeId, options = DEFAULT
|
|
|
9755
10611
|
}
|
|
9756
10612
|
}
|
|
9757
10613
|
if (limitProcessingTime && performance.now() > limitProcessingTime) {
|
|
9758
|
-
|
|
10614
|
+
cs3dLogger.warn(`Exceeded processing time limit (${maxProcessingTime})ms`);
|
|
9759
10615
|
break;
|
|
9760
10616
|
}
|
|
9761
10617
|
}
|