@cornerstonejs/core 5.16.0 → 5.17.1
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/esm/RenderingEngine/BaseRenderingEngine.d.ts +2 -0
- package/dist/esm/RenderingEngine/BaseRenderingEngine.js +25 -0
- package/dist/esm/RenderingEngine/BaseVolumeViewport.d.ts +11 -1
- package/dist/esm/RenderingEngine/BaseVolumeViewport.js +101 -2
- package/dist/esm/RenderingEngine/ContextPoolRenderingEngine.js +5 -2
- package/dist/esm/RenderingEngine/GenericViewport/GenericViewport.d.ts +11 -1
- package/dist/esm/RenderingEngine/GenericViewport/GenericViewport.js +63 -0
- package/dist/esm/RenderingEngine/GenericViewport/Planar/CpuImageSliceRenderPath.js +19 -1
- package/dist/esm/RenderingEngine/GenericViewport/Planar/CpuVolumeSliceRenderPath.d.ts +1 -1
- package/dist/esm/RenderingEngine/GenericViewport/Planar/CpuVolumeSliceRenderPath.js +12 -3
- package/dist/esm/RenderingEngine/GenericViewport/Planar/PlanarMountedData.js +4 -0
- package/dist/esm/RenderingEngine/GenericViewport/Planar/PlanarRenderPathDecisionService.d.ts +6 -0
- package/dist/esm/RenderingEngine/GenericViewport/Planar/PlanarRenderPathDecisionService.js +42 -13
- package/dist/esm/RenderingEngine/GenericViewport/Planar/PlanarViewReferenceController.d.ts +1 -0
- package/dist/esm/RenderingEngine/GenericViewport/Planar/PlanarViewReferenceController.js +39 -0
- package/dist/esm/RenderingEngine/GenericViewport/Planar/PlanarViewport.d.ts +9 -0
- package/dist/esm/RenderingEngine/GenericViewport/Planar/PlanarViewport.js +65 -6
- package/dist/esm/RenderingEngine/GenericViewport/Planar/PlanarViewportLegacyAdapter.d.ts +1 -0
- package/dist/esm/RenderingEngine/GenericViewport/Planar/PlanarViewportLegacyAdapter.js +3 -0
- package/dist/esm/RenderingEngine/GenericViewport/Planar/PlanarViewportTypes.d.ts +1 -0
- package/dist/esm/RenderingEngine/GenericViewport/Planar/VtkImageMapperRenderPath.js +18 -1
- package/dist/esm/RenderingEngine/GenericViewport/Planar/VtkVolumeSliceRenderPath.d.ts +8 -0
- package/dist/esm/RenderingEngine/GenericViewport/Planar/VtkVolumeSliceRenderPath.js +49 -30
- package/dist/esm/RenderingEngine/GenericViewport/Planar/planarAcquiredFrames.d.ts +6 -0
- package/dist/esm/RenderingEngine/GenericViewport/Planar/planarAcquiredFrames.js +185 -0
- package/dist/esm/RenderingEngine/GenericViewport/Planar/planarImageEvents.d.ts +6 -0
- package/dist/esm/RenderingEngine/GenericViewport/Planar/planarImageEvents.js +16 -0
- package/dist/esm/RenderingEngine/GenericViewport/Planar/planarRuntimeTypes.d.ts +3 -1
- package/dist/esm/RenderingEngine/GenericViewport/ViewportArchitectureTypes.d.ts +17 -2
- package/dist/esm/RenderingEngine/GenericViewport/Volume3D/VolumeViewport3DLegacyAdapter.d.ts +1 -0
- package/dist/esm/RenderingEngine/GenericViewport/Volume3D/VolumeViewport3DLegacyAdapter.js +13 -0
- package/dist/esm/RenderingEngine/GenericViewport/Volume3D/VtkVolume3DRenderPath.d.ts +5 -0
- package/dist/esm/RenderingEngine/GenericViewport/Volume3D/VtkVolume3DRenderPath.js +49 -34
- package/dist/esm/RenderingEngine/GenericViewport/Volume3D/viewport3D.d.ts +4 -1
- package/dist/esm/RenderingEngine/GenericViewport/Volume3D/viewport3D.js +15 -0
- package/dist/esm/RenderingEngine/GenericViewport/Volume3D/viewport3DTypes.d.ts +2 -1
- package/dist/esm/RenderingEngine/GenericViewport/renderingFidelity.d.ts +16 -0
- package/dist/esm/RenderingEngine/GenericViewport/renderingFidelity.js +15 -0
- package/dist/esm/RenderingEngine/StackViewport.d.ts +3 -0
- package/dist/esm/RenderingEngine/StackViewport.js +7 -0
- package/dist/esm/RenderingEngine/TiledRenderingEngine.js +7 -1
- package/dist/esm/RenderingEngine/Viewport.d.ts +8 -1
- package/dist/esm/RenderingEngine/Viewport.js +26 -0
- package/dist/esm/RenderingEngine/VolumeViewport3D.js +5 -9
- package/dist/esm/RenderingEngine/helpers/actorsWaitingForStorage.d.ts +3 -0
- package/dist/esm/RenderingEngine/helpers/actorsWaitingForStorage.js +5 -0
- package/dist/esm/RenderingEngine/helpers/createVolumeActor.d.ts +2 -1
- package/dist/esm/RenderingEngine/helpers/createVolumeActor.js +15 -1
- package/dist/esm/RenderingEngine/helpers/createVolumeMapper.d.ts +15 -1
- package/dist/esm/RenderingEngine/helpers/createVolumeMapper.js +41 -8
- package/dist/esm/RenderingEngine/helpers/createVolumeSliceActor.d.ts +2 -1
- package/dist/esm/RenderingEngine/helpers/createVolumeSliceActor.js +16 -4
- package/dist/esm/RenderingEngine/helpers/fidelityIndicator/attachFidelityIndicator.d.ts +7 -0
- package/dist/esm/RenderingEngine/helpers/fidelityIndicator/attachFidelityIndicator.js +396 -0
- package/dist/esm/RenderingEngine/helpers/fidelityIndicator/buildViewportFidelityState.d.ts +4 -0
- package/dist/esm/RenderingEngine/helpers/fidelityIndicator/buildViewportFidelityState.js +138 -0
- package/dist/esm/RenderingEngine/helpers/fidelityIndicator/collectFidelityLines.d.ts +30 -0
- package/dist/esm/RenderingEngine/helpers/fidelityIndicator/collectFidelityLines.js +138 -0
- package/dist/esm/RenderingEngine/helpers/fidelityIndicator/displaySpacingOfViewport.d.ts +33 -0
- package/dist/esm/RenderingEngine/helpers/fidelityIndicator/displaySpacingOfViewport.js +67 -0
- package/dist/esm/RenderingEngine/helpers/fidelityIndicator/fidelityDetailsText.d.ts +3 -0
- package/dist/esm/RenderingEngine/helpers/fidelityIndicator/fidelityDetailsText.js +108 -0
- package/dist/esm/RenderingEngine/helpers/fidelityIndicator/fidelityIndicatorState.d.ts +34 -0
- package/dist/esm/RenderingEngine/helpers/fidelityIndicator/fidelityIndicatorState.js +135 -0
- package/dist/esm/RenderingEngine/helpers/fidelityIndicator/fidelityIndicatorStyles.d.ts +2 -0
- package/dist/esm/RenderingEngine/helpers/fidelityIndicator/fidelityIndicatorStyles.js +67 -0
- package/dist/esm/RenderingEngine/helpers/fidelityIndicator/fidelityLabel.d.ts +3 -0
- package/dist/esm/RenderingEngine/helpers/fidelityIndicator/fidelityLabel.js +6 -0
- package/dist/esm/RenderingEngine/helpers/fidelityIndicator/index.d.ts +9 -0
- package/dist/esm/RenderingEngine/helpers/fidelityIndicator/index.js +9 -0
- package/dist/esm/RenderingEngine/helpers/fidelityIndicator/isLabelmapActorEntry.d.ts +2 -0
- package/dist/esm/RenderingEngine/helpers/fidelityIndicator/isLabelmapActorEntry.js +3 -0
- package/dist/esm/RenderingEngine/helpers/fidelityIndicator/notifyFidelityStateChanged.d.ts +9 -0
- package/dist/esm/RenderingEngine/helpers/fidelityIndicator/notifyFidelityStateChanged.js +21 -0
- package/dist/esm/RenderingEngine/helpers/legacyActorTextureSet.d.ts +3 -0
- package/dist/esm/RenderingEngine/helpers/legacyActorTextureSet.js +54 -0
- package/dist/esm/RenderingEngine/helpers/resolveVolumeTexture.d.ts +14 -0
- package/dist/esm/RenderingEngine/helpers/resolveVolumeTexture.js +22 -0
- package/dist/esm/RenderingEngine/helpers/setDefaultVolumeVOI.js +6 -4
- package/dist/esm/RenderingEngine/helpers/stats/RenderModesPanel.d.ts +13 -6
- package/dist/esm/RenderingEngine/helpers/stats/RenderModesPanel.js +98 -5
- package/dist/esm/RenderingEngine/helpers/stats/StatsOverlay.d.ts +3 -0
- package/dist/esm/RenderingEngine/helpers/stats/StatsOverlay.js +70 -0
- package/dist/esm/RenderingEngine/helpers/stats/constants.d.ts +21 -1
- package/dist/esm/RenderingEngine/helpers/stats/constants.js +21 -1
- package/dist/esm/RenderingEngine/helpers/volumeRenderStrategy.d.ts +43 -0
- package/dist/esm/RenderingEngine/helpers/volumeRenderStrategy.js +153 -0
- package/dist/esm/RenderingEngine/helpers/volumeStrategyLifecycle.d.ts +31 -0
- package/dist/esm/RenderingEngine/helpers/volumeStrategyLifecycle.js +104 -0
- package/dist/esm/RenderingEngine/vtkClasses/canUseFloatOpacityTexture.d.ts +1 -1
- package/dist/esm/RenderingEngine/vtkClasses/canUseFloatOpacityTexture.js +2 -5
- package/dist/esm/RenderingEngine/vtkClasses/takeBoundScalarTexture.d.ts +1 -0
- package/dist/esm/RenderingEngine/vtkClasses/takeBoundScalarTexture.js +12 -0
- package/dist/esm/RenderingEngine/vtkClasses/vtkStreamingOpenGLImageResliceMapper.js +11 -2
- package/dist/esm/RenderingEngine/vtkClasses/vtkStreamingOpenGLTexture.js +393 -7
- package/dist/esm/RenderingEngine/vtkClasses/vtkStreamingOpenGLVolumeMapper.d.ts +4 -0
- package/dist/esm/RenderingEngine/vtkClasses/vtkStreamingOpenGLVolumeMapper.js +48 -3
- package/dist/esm/cache/cache.d.ts +3 -0
- package/dist/esm/cache/cache.js +21 -13
- package/dist/esm/cache/classes/BaseStreamingImageVolume.d.ts +12 -5
- package/dist/esm/cache/classes/BaseStreamingImageVolume.js +117 -18
- package/dist/esm/cache/classes/ImageVolume.d.ts +44 -2
- package/dist/esm/cache/classes/ImageVolume.js +169 -9
- package/dist/esm/cache/classes/StreamingDynamicImageVolume.d.ts +1 -2
- package/dist/esm/cache/classes/StreamingDynamicImageVolume.js +4 -0
- package/dist/esm/cache/classes/VolumeTextureSet.d.ts +42 -0
- package/dist/esm/cache/classes/VolumeTextureSet.js +66 -0
- package/dist/esm/cache/index.d.ts +5 -1
- package/dist/esm/cache/index.js +3 -1
- package/dist/esm/cache/volumeTextureStore.d.ts +46 -0
- package/dist/esm/cache/volumeTextureStore.js +181 -0
- package/dist/esm/enums/Events.d.ts +3 -0
- package/dist/esm/enums/Events.js +3 -0
- package/dist/esm/enums/VoxelDataSources.d.ts +5 -0
- package/dist/esm/enums/VoxelDataSources.js +15 -0
- package/dist/esm/enums/VoxelReductions.d.ts +5 -0
- package/dist/esm/enums/VoxelReductions.js +15 -0
- package/dist/esm/enums/VoxelStatistics.d.ts +5 -0
- package/dist/esm/enums/VoxelStatistics.js +13 -0
- package/dist/esm/enums/index.d.ts +4 -1
- package/dist/esm/enums/index.js +4 -1
- package/dist/esm/index.d.ts +13 -3
- package/dist/esm/index.js +7 -3
- package/dist/esm/init.d.ts +4 -2
- package/dist/esm/init.js +23 -2
- package/dist/esm/loaders/ProgressiveRetrieveImages.d.ts +5 -1
- package/dist/esm/loaders/ProgressiveRetrieveImages.js +21 -4
- package/dist/esm/loaders/configuration/coarseInterleavedRetrieve.d.ts +5 -0
- package/dist/esm/loaders/configuration/coarseInterleavedRetrieve.js +58 -0
- package/dist/esm/loaders/volumeLoader.js +8 -2
- package/dist/esm/types/Cornerstone3DConfig.d.ts +13 -1
- package/dist/esm/types/EventTypes.d.ts +8 -1
- package/dist/esm/types/IActor.d.ts +1 -0
- package/dist/esm/types/IImage.d.ts +1 -0
- package/dist/esm/types/IVoxelManager.d.ts +88 -2
- package/dist/esm/types/ImageLoadRequests.d.ts +2 -2
- package/dist/esm/types/ViewportFidelity.d.ts +33 -0
- package/dist/esm/types/ViewportFidelity.js +0 -0
- package/dist/esm/types/VolumeProps.d.ts +2 -0
- package/dist/esm/types/VoxelGrid.d.ts +23 -0
- package/dist/esm/types/VoxelGrid.js +0 -0
- package/dist/esm/types/VoxelQuality.d.ts +38 -0
- package/dist/esm/types/VoxelQuality.js +0 -0
- package/dist/esm/types/VoxelQualityRegistry.d.ts +34 -0
- package/dist/esm/types/VoxelQualityRegistry.js +0 -0
- package/dist/esm/types/VoxelStatistic.d.ts +29 -0
- package/dist/esm/types/VoxelStatistic.js +0 -0
- package/dist/esm/types/VoxelStatisticRegistry.d.ts +13 -0
- package/dist/esm/types/VoxelStatisticRegistry.js +0 -0
- package/dist/esm/types/index.d.ts +9 -2
- package/dist/esm/utilities/CompositeVoxelManager.d.ts +150 -0
- package/dist/esm/utilities/CompositeVoxelManager.js +854 -0
- package/dist/esm/utilities/VoxelManager.d.ts +16 -14
- package/dist/esm/utilities/VoxelManager.js +140 -33
- package/dist/esm/utilities/getBufferConfiguration.d.ts +2 -1
- package/dist/esm/utilities/getBufferConfiguration.js +9 -1
- package/dist/esm/utilities/getVolumeSliceRangeInfo.js +2 -1
- package/dist/esm/utilities/getVolumeViewportScrollInfo.js +5 -1
- package/dist/esm/utilities/gpuSettingsPresets.d.ts +19 -0
- package/dist/esm/utilities/gpuSettingsPresets.js +77 -0
- package/dist/esm/utilities/index.d.ts +4 -1
- package/dist/esm/utilities/index.js +4 -1
- package/dist/esm/utilities/isAcquisitionPlaneNormal.d.ts +2 -0
- package/dist/esm/utilities/isAcquisitionPlaneNormal.js +9 -0
- package/dist/esm/utilities/renderingCapabilities.d.ts +0 -1
- package/dist/esm/utilities/renderingCapabilities.js +5 -14
- package/dist/esm/utilities/voxelGrid/averagePlane.d.ts +3 -0
- package/dist/esm/utilities/voxelGrid/averagePlane.js +44 -0
- package/dist/esm/utilities/voxelGrid/boxAverageReductionFactors.d.ts +6 -0
- package/dist/esm/utilities/voxelGrid/boxAverageReductionFactors.js +45 -0
- package/dist/esm/utilities/voxelGrid/boxSpan.d.ts +12 -0
- package/dist/esm/utilities/voxelGrid/boxSpan.js +41 -0
- package/dist/esm/utilities/voxelGrid/boxStatistic.d.ts +22 -0
- package/dist/esm/utilities/voxelGrid/boxStatistic.js +117 -0
- package/dist/esm/utilities/voxelGrid/deriveBoxAverageGrid.d.ts +3 -0
- package/dist/esm/utilities/voxelGrid/deriveBoxAverageGrid.js +33 -0
- package/dist/esm/utilities/voxelGrid/foregroundMajorityPlane.d.ts +5 -0
- package/dist/esm/utilities/voxelGrid/foregroundMajorityPlane.js +44 -0
- package/dist/esm/utilities/voxelGrid/index.d.ts +9 -0
- package/dist/esm/utilities/voxelGrid/index.js +9 -0
- package/dist/esm/utilities/voxelGrid/reducedDimensions.d.ts +4 -0
- package/dist/esm/utilities/voxelGrid/reducedDimensions.js +17 -0
- package/dist/esm/utilities/voxelGrid/resolveReduction.d.ts +10 -0
- package/dist/esm/utilities/voxelGrid/resolveReduction.js +17 -0
- package/dist/esm/utilities/voxelGrid/sliceReductions.d.ts +7 -0
- package/dist/esm/utilities/voxelGrid/sliceReductions.js +168 -0
- package/dist/esm/utilities/voxelGrid/voxelGridKey.d.ts +4 -0
- package/dist/esm/utilities/voxelGrid/voxelGridKey.js +47 -0
- package/dist/esm/utilities/voxelGrid/voxelGridSize.d.ts +5 -0
- package/dist/esm/utilities/voxelGrid/voxelGridSize.js +17 -0
- package/dist/esm/utilities/voxelGrid/voxelGridTransforms.d.ts +16 -0
- package/dist/esm/utilities/voxelGrid/voxelGridTransforms.js +145 -0
- package/dist/esm/utilities/voxelGrid/voxelQuality.d.ts +19 -0
- package/dist/esm/utilities/voxelGrid/voxelQuality.js +106 -0
- package/dist/esm/utilities/voxelGrid/voxelStatistics.d.ts +20 -0
- package/dist/esm/utilities/voxelGrid/voxelStatistics.js +141 -0
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +5 -5
|
@@ -2,8 +2,9 @@ import type { IRetrieveConfiguration, IImagesLoader, RetrieveStage, ImageLoadLis
|
|
|
2
2
|
import singleRetrieveStages from './configuration/singleRetrieve.js';
|
|
3
3
|
import sequentialRetrieveStages from './configuration/sequentialRetrieve.js';
|
|
4
4
|
import interleavedRetrieveStages from './configuration/interleavedRetrieve.js';
|
|
5
|
+
import coarseInterleavedRetrieveStages from './configuration/coarseInterleavedRetrieve.js';
|
|
5
6
|
import { ImageQualityStatus } from '../enums/index.js';
|
|
6
|
-
export { sequentialRetrieveStages, interleavedRetrieveStages, singleRetrieveStages, };
|
|
7
|
+
export { sequentialRetrieveStages, interleavedRetrieveStages, coarseInterleavedRetrieveStages, singleRetrieveStages, };
|
|
7
8
|
export interface NearbyRequest {
|
|
8
9
|
itemId: string;
|
|
9
10
|
index?: number;
|
|
@@ -22,6 +23,9 @@ export declare class ProgressiveRetrieveImages implements IImagesLoader, IRetrie
|
|
|
22
23
|
static interleavedRetrieveStages: {
|
|
23
24
|
stages: RetrieveStage[];
|
|
24
25
|
};
|
|
26
|
+
static coarseInterleavedRetrieveStages: {
|
|
27
|
+
stages: RetrieveStage[];
|
|
28
|
+
};
|
|
25
29
|
static singleRetrieveStages: {
|
|
26
30
|
stages: RetrieveStage[];
|
|
27
31
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import singleRetrieveStages from './configuration/singleRetrieve.js';
|
|
2
2
|
import sequentialRetrieveStages from './configuration/sequentialRetrieve.js';
|
|
3
3
|
import interleavedRetrieveStages from './configuration/interleavedRetrieve.js';
|
|
4
|
+
import coarseInterleavedRetrieveStages from './configuration/coarseInterleavedRetrieve.js';
|
|
4
5
|
import { loadAndCacheImage } from './imageLoader.js';
|
|
5
6
|
import triggerEvent from '../utilities/triggerEvent.js';
|
|
6
7
|
import ProgressiveIterator from '../utilities/ProgressiveIterator.js';
|
|
@@ -11,8 +12,9 @@ import cache from '../cache/cache.js';
|
|
|
11
12
|
import eventTarget from '../eventTarget.js';
|
|
12
13
|
import { fillNearbyFrames } from './fillNearbyFrames.js';
|
|
13
14
|
import { coreLog } from '../utilities/logger.js';
|
|
15
|
+
import { getLossyDownsampling } from '../init.js';
|
|
14
16
|
const log = coreLog.getLogger('loaders', 'ProgressiveRetrieveImages');
|
|
15
|
-
export { sequentialRetrieveStages, interleavedRetrieveStages, singleRetrieveStages, };
|
|
17
|
+
export { sequentialRetrieveStages, interleavedRetrieveStages, coarseInterleavedRetrieveStages, singleRetrieveStages, };
|
|
16
18
|
export class ProgressiveRetrieveImages {
|
|
17
19
|
constructor(imageRetrieveConfiguration) {
|
|
18
20
|
this.stages = imageRetrieveConfiguration.stages || singleRetrieveStages;
|
|
@@ -27,6 +29,9 @@ ProgressiveRetrieveImages.createProgressive = createProgressive;
|
|
|
27
29
|
ProgressiveRetrieveImages.interleavedRetrieveStages = {
|
|
28
30
|
stages: interleavedRetrieveStages,
|
|
29
31
|
};
|
|
32
|
+
ProgressiveRetrieveImages.coarseInterleavedRetrieveStages = {
|
|
33
|
+
stages: coarseInterleavedRetrieveStages,
|
|
34
|
+
};
|
|
30
35
|
ProgressiveRetrieveImages.singleRetrieveStages = {
|
|
31
36
|
stages: singleRetrieveStages,
|
|
32
37
|
};
|
|
@@ -57,6 +62,7 @@ class ProgressiveRetrieveImagesInstance {
|
|
|
57
62
|
sendRequest(request, options) {
|
|
58
63
|
const { imageId, next } = request;
|
|
59
64
|
const errorCallback = (reason, done) => {
|
|
65
|
+
reported = true;
|
|
60
66
|
this.listener.errorCallback(imageId, complete || !next, reason);
|
|
61
67
|
if (done) {
|
|
62
68
|
this.updateStageStatus(request.stage, reason);
|
|
@@ -65,6 +71,7 @@ class ProgressiveRetrieveImagesInstance {
|
|
|
65
71
|
const loadedPromise = (options.loader || loadAndCacheImage)(imageId, options);
|
|
66
72
|
const uncompressedIterator = ProgressiveIterator.as(loadedPromise);
|
|
67
73
|
let complete = false;
|
|
74
|
+
let reported = false;
|
|
68
75
|
uncompressedIterator
|
|
69
76
|
.forEach(async (image, done) => {
|
|
70
77
|
const oldStatus = cache.getImageQuality(imageId);
|
|
@@ -74,6 +81,7 @@ class ProgressiveRetrieveImagesInstance {
|
|
|
74
81
|
}
|
|
75
82
|
const { imageQualityStatus } = image;
|
|
76
83
|
complete ||= imageQualityStatus === ImageQualityStatus.FULL_RESOLUTION;
|
|
84
|
+
image.imageQualityPending = !complete && (!done || !!next);
|
|
77
85
|
if (oldStatus !== undefined && oldStatus > imageQualityStatus) {
|
|
78
86
|
this.updateStageStatus(request.stage, null, true);
|
|
79
87
|
return;
|
|
@@ -92,7 +100,13 @@ class ProgressiveRetrieveImagesInstance {
|
|
|
92
100
|
}
|
|
93
101
|
else {
|
|
94
102
|
if (!complete) {
|
|
95
|
-
|
|
103
|
+
const shown = cache.getImage(imageId);
|
|
104
|
+
if (shown) {
|
|
105
|
+
shown.imageQualityPending = false;
|
|
106
|
+
}
|
|
107
|
+
if (!reported) {
|
|
108
|
+
this.listener.errorCallback(imageId, true, "Couldn't decode");
|
|
109
|
+
}
|
|
96
110
|
}
|
|
97
111
|
this.outstandingRequests--;
|
|
98
112
|
for (let skip = next; skip; skip = skip.next) {
|
|
@@ -123,7 +137,10 @@ class ProgressiveRetrieveImagesInstance {
|
|
|
123
137
|
};
|
|
124
138
|
const priority = stage.priority ?? -5;
|
|
125
139
|
const requestType = stage.requestType || RequestType.Interaction;
|
|
126
|
-
const additionalDetails = {
|
|
140
|
+
const additionalDetails = {
|
|
141
|
+
imageId,
|
|
142
|
+
volumeId: this.listener.volumeId,
|
|
143
|
+
};
|
|
127
144
|
imageLoadPoolManager.addRequest(this.sendRequest.bind(this, request, options), requestType, additionalDetails, priority);
|
|
128
145
|
}
|
|
129
146
|
updateStageStatus(stage, failure, skipped = false) {
|
|
@@ -195,7 +212,7 @@ class ProgressiveRetrieveImagesInstance {
|
|
|
195
212
|
}
|
|
196
213
|
findNearbyRequests(index, stage) {
|
|
197
214
|
const nearby = new Array();
|
|
198
|
-
if (!stage.nearbyFrames) {
|
|
215
|
+
if (!stage.nearbyFrames || !getLossyDownsampling().interleavedLoading) {
|
|
199
216
|
return nearby;
|
|
200
217
|
}
|
|
201
218
|
for (const nearbyItem of stage.nearbyFrames) {
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { RetrieveStage } from '../../types/index.js';
|
|
2
|
+
import { ImageQualityStatus } from '../../enums/index.js';
|
|
3
|
+
export declare function replicateQualityOf(offset: number): ImageQualityStatus;
|
|
4
|
+
declare const coarseInterleavedRetrieveStages: RetrieveStage[];
|
|
5
|
+
export default coarseInterleavedRetrieveStages;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { RequestType, ImageQualityStatus } from '../../enums/index.js';
|
|
2
|
+
const DECIMATE = 64;
|
|
3
|
+
const OFFSET_BITS = Math.log2(DECIMATE);
|
|
4
|
+
export function replicateQualityOf(offset) {
|
|
5
|
+
const distance = Math.abs(offset);
|
|
6
|
+
return distance <= 1
|
|
7
|
+
? ImageQualityStatus.ADJACENT_REPLICATE
|
|
8
|
+
: (ImageQualityStatus.FAR_REPLICATE + 1 / distance);
|
|
9
|
+
}
|
|
10
|
+
function nearbyFramesOfDecimation(decimate) {
|
|
11
|
+
const frames = [];
|
|
12
|
+
const first = -Math.floor((decimate - 1) / 2);
|
|
13
|
+
for (let offset = first; offset < first + decimate; offset++) {
|
|
14
|
+
if (offset !== 0) {
|
|
15
|
+
frames.push({ offset, imageQualityStatus: replicateQualityOf(offset) });
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return frames;
|
|
19
|
+
}
|
|
20
|
+
function reverseBits(value, bits) {
|
|
21
|
+
let reversed = 0;
|
|
22
|
+
for (let bit = 0; bit < bits; bit++) {
|
|
23
|
+
reversed = (reversed << 1) | ((value >> bit) & 1);
|
|
24
|
+
}
|
|
25
|
+
return reversed;
|
|
26
|
+
}
|
|
27
|
+
function gapAfterStage(index) {
|
|
28
|
+
const level = index === 0 ? 0 : Math.floor(Math.log2(index)) + 1;
|
|
29
|
+
return DECIMATE >> level;
|
|
30
|
+
}
|
|
31
|
+
const decimateStages = Array.from({ length: DECIMATE }, (_, index) => {
|
|
32
|
+
const offset = reverseBits(index, OFFSET_BITS);
|
|
33
|
+
const gap = gapAfterStage(index);
|
|
34
|
+
return {
|
|
35
|
+
id: `decimate${DECIMATE}At${offset}`,
|
|
36
|
+
decimate: DECIMATE,
|
|
37
|
+
offset,
|
|
38
|
+
priority: 6 + index,
|
|
39
|
+
requestType: RequestType.Thumbnail,
|
|
40
|
+
retrieveType: 'default',
|
|
41
|
+
nearbyFrames: gap > 1 ? nearbyFramesOfDecimation(gap) : undefined,
|
|
42
|
+
};
|
|
43
|
+
});
|
|
44
|
+
const coarseInterleavedRetrieveStages = [
|
|
45
|
+
{
|
|
46
|
+
id: 'initialImages',
|
|
47
|
+
positions: [0.5, -1],
|
|
48
|
+
retrieveType: 'default',
|
|
49
|
+
requestType: RequestType.Thumbnail,
|
|
50
|
+
priority: 5,
|
|
51
|
+
nearbyFrames: nearbyFramesOfDecimation(DECIMATE),
|
|
52
|
+
},
|
|
53
|
+
...decimateStages,
|
|
54
|
+
{
|
|
55
|
+
id: 'errorRetrieve',
|
|
56
|
+
},
|
|
57
|
+
];
|
|
58
|
+
export default coarseInterleavedRetrieveStages;
|
|
@@ -10,6 +10,7 @@ import VoxelManager from '../utilities/VoxelManager.js';
|
|
|
10
10
|
import { createAndCacheLocalImage, createAndCacheDerivedImages, } from './imageLoader.js';
|
|
11
11
|
import { generateVolumePropsFromImageIds } from '../utilities/generateVolumePropsFromImageIds.js';
|
|
12
12
|
import { cornerstoneStreamingImageVolumeLoader } from './cornerstoneStreamingImageVolumeLoader.js';
|
|
13
|
+
import VoxelStatistics from '../enums/VoxelStatistics.js';
|
|
13
14
|
const volumeLoaders = {};
|
|
14
15
|
let unknownVolumeLoader = cornerstoneStreamingImageVolumeLoader;
|
|
15
16
|
function loadVolumeFromVolumeLoader(volumeId, options) {
|
|
@@ -205,6 +206,7 @@ export function createLocalVolume(volumeId, options = {}) {
|
|
|
205
206
|
dimensions,
|
|
206
207
|
numberOfComponents: 1,
|
|
207
208
|
id: volumeId,
|
|
209
|
+
dataType,
|
|
208
210
|
});
|
|
209
211
|
imageVolume.voxelManager = voxelManager;
|
|
210
212
|
if (!preventCache) {
|
|
@@ -227,17 +229,21 @@ export function getUnknownVolumeLoaderSchema() {
|
|
|
227
229
|
return unknownVolumeLoader.name;
|
|
228
230
|
}
|
|
229
231
|
export function createAndCacheDerivedLabelmapVolume(referencedVolumeId, options = {}) {
|
|
230
|
-
|
|
232
|
+
const volume = createAndCacheDerivedVolume(referencedVolumeId, {
|
|
231
233
|
...options,
|
|
232
234
|
targetBuffer: {
|
|
233
235
|
type: 'Uint8Array',
|
|
234
236
|
...options?.targetBuffer,
|
|
235
237
|
},
|
|
236
238
|
});
|
|
239
|
+
volume.reductionStatistic = VoxelStatistics.ForegroundMajority;
|
|
240
|
+
return volume;
|
|
237
241
|
}
|
|
238
242
|
export function createLocalLabelmapVolume(options, volumeId, preventCache = false) {
|
|
239
243
|
if (!options.scalarData) {
|
|
240
244
|
options.scalarData = new Uint8Array(options.dimensions[0] * options.dimensions[1] * options.dimensions[2]);
|
|
241
245
|
}
|
|
242
|
-
|
|
246
|
+
const volume = createLocalVolume(volumeId, { ...options, preventCache });
|
|
247
|
+
volume.reductionStatistic = VoxelStatistics.ForegroundMajority;
|
|
248
|
+
return volume;
|
|
243
249
|
}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import type { RenderingEngineModeType } from '../types/index.js';
|
|
2
2
|
import type { RenderBackendValue, VoxelManagerEnum } from '../enums/index.js';
|
|
3
|
+
interface LossyDownsampling {
|
|
4
|
+
final?: boolean;
|
|
5
|
+
interactive?: boolean;
|
|
6
|
+
interleavedLoading?: boolean;
|
|
7
|
+
}
|
|
3
8
|
interface Cornerstone3DConfig {
|
|
4
9
|
isMobile?: boolean;
|
|
10
|
+
dangerouslyDisableFidelityIndicator?: boolean;
|
|
5
11
|
rendering?: {
|
|
6
12
|
preferSizeOverAccuracy?: boolean;
|
|
7
13
|
useCPURendering?: boolean;
|
|
@@ -20,6 +26,11 @@ interface Cornerstone3DConfig {
|
|
|
20
26
|
volumeRendering?: {
|
|
21
27
|
sampleDistanceMultiplier?: number;
|
|
22
28
|
};
|
|
29
|
+
reducedTextureFill?: {
|
|
30
|
+
maxSlicesPerRender?: number;
|
|
31
|
+
maxMillisecondsPerRender?: number;
|
|
32
|
+
};
|
|
33
|
+
lossyDownsampling?: LossyDownsampling;
|
|
23
34
|
useGenericViewport?: boolean;
|
|
24
35
|
};
|
|
25
36
|
segmentation?: {
|
|
@@ -27,7 +38,8 @@ interface Cornerstone3DConfig {
|
|
|
27
38
|
};
|
|
28
39
|
debug: {
|
|
29
40
|
statsOverlay?: boolean;
|
|
41
|
+
fidelityIndicatorDebug?: boolean;
|
|
30
42
|
};
|
|
31
43
|
peerImport?: (moduleId: string) => Promise<any>;
|
|
32
44
|
}
|
|
33
|
-
export type { Cornerstone3DConfig as default };
|
|
45
|
+
export type { Cornerstone3DConfig as default, LossyDownsampling };
|
|
@@ -14,6 +14,7 @@ import type IImageCalibration from './IImageCalibration.js';
|
|
|
14
14
|
import type { ColormapPublic } from './Colormap.js';
|
|
15
15
|
import type IVolumeViewport from './IVolumeViewport.js';
|
|
16
16
|
import type { ActorEntry } from './IActor.js';
|
|
17
|
+
import type { ViewportFidelityState } from './ViewportFidelity.js';
|
|
17
18
|
interface CameraModifiedEventDetail {
|
|
18
19
|
previousCamera?: ICamera;
|
|
19
20
|
camera: ICamera;
|
|
@@ -58,6 +59,12 @@ interface ElementEnabledEventDetail {
|
|
|
58
59
|
viewportId: string;
|
|
59
60
|
renderingEngineId: string;
|
|
60
61
|
}
|
|
62
|
+
interface ViewportFidelityChangedEventDetail {
|
|
63
|
+
viewportId: string;
|
|
64
|
+
renderingEngineId: string;
|
|
65
|
+
state: ViewportFidelityState;
|
|
66
|
+
}
|
|
67
|
+
type ViewportFidelityChangedEvent = CustomEventType<ViewportFidelityChangedEventDetail>;
|
|
61
68
|
interface ImageRenderedEventDetail {
|
|
62
69
|
element: HTMLDivElement;
|
|
63
70
|
viewportId: string;
|
|
@@ -192,4 +199,4 @@ interface ActorsChangedEventDetail {
|
|
|
192
199
|
currentActors: ActorEntry[];
|
|
193
200
|
}
|
|
194
201
|
type ActorsChangedEvent = CustomEventType<ActorsChangedEventDetail>;
|
|
195
|
-
export type { VolumeScrollOutOfBoundsEventDetail, VolumeScrollOutOfBoundsEvent, ActorsChangedEventDetail, ActorsChangedEvent, CameraModifiedEventDetail, CameraModifiedEvent, VoiModifiedEvent, VoiModifiedEventDetail, ColormapModifiedEvent, ColormapModifiedEventDetail, DisplayAreaModifiedEvent, DisplayAreaModifiedEventDetail, ElementDisabledEvent, ElementDisabledEventDetail, ElementEnabledEvent, ElementEnabledEventDetail, ImageRenderedEventDetail, ImageRenderedEvent, ImageVolumeModifiedEvent, ImageVolumeModifiedEventDetail, ImageVolumeLoadingCompletedEvent, ImageVolumeLoadingCompletedEventDetail, ImageLoadedEvent, ImageLoadedEventDetail, ImageLoadedFailedEventDetail, ImageLoadedFailedEvent, VolumeLoadedEvent, VolumeLoadedEventDetail, VolumeLoadedFailedEvent, VolumeLoadedFailedEventDetail, ImageCacheImageAddedEvent, ImageCacheImageAddedEventDetail, ImageCacheImageRemovedEvent, ImageCacheImageRemovedEventDetail, VolumeCacheVolumeAddedEvent, VolumeCacheVolumeAddedEventDetail, VolumeCacheVolumeRemovedEvent, VolumeCacheVolumeRemovedEventDetail, StackNewImageEvent, StackNewImageEventDetail, PreStackNewImageEvent, PreStackNewImageEventDetail, ImageSpacingCalibratedEvent, ImageSpacingCalibratedEventDetail, VolumeNewImageEvent, VolumeNewImageEventDetail, StackViewportNewStackEvent, StackViewportNewStackEventDetail, StackViewportScrollEvent, StackViewportScrollEventDetail, StackScrollOutOfBoundsEvent, StackScrollOutOfBoundsEventDetail, CameraResetEvent, CameraResetEventDetail, };
|
|
202
|
+
export type { VolumeScrollOutOfBoundsEventDetail, VolumeScrollOutOfBoundsEvent, ActorsChangedEventDetail, ActorsChangedEvent, ViewportFidelityChangedEventDetail, ViewportFidelityChangedEvent, CameraModifiedEventDetail, CameraModifiedEvent, VoiModifiedEvent, VoiModifiedEventDetail, ColormapModifiedEvent, ColormapModifiedEventDetail, DisplayAreaModifiedEvent, DisplayAreaModifiedEventDetail, ElementDisabledEvent, ElementDisabledEventDetail, ElementEnabledEvent, ElementEnabledEventDetail, ImageRenderedEventDetail, ImageRenderedEvent, ImageVolumeModifiedEvent, ImageVolumeModifiedEventDetail, ImageVolumeLoadingCompletedEvent, ImageVolumeLoadingCompletedEventDetail, ImageLoadedEvent, ImageLoadedEventDetail, ImageLoadedFailedEventDetail, ImageLoadedFailedEvent, VolumeLoadedEvent, VolumeLoadedEventDetail, VolumeLoadedFailedEvent, VolumeLoadedFailedEventDetail, ImageCacheImageAddedEvent, ImageCacheImageAddedEventDetail, ImageCacheImageRemovedEvent, ImageCacheImageRemovedEventDetail, VolumeCacheVolumeAddedEvent, VolumeCacheVolumeAddedEventDetail, VolumeCacheVolumeRemovedEvent, VolumeCacheVolumeRemovedEventDetail, StackNewImageEvent, StackNewImageEventDetail, PreStackNewImageEvent, PreStackNewImageEventDetail, ImageSpacingCalibratedEvent, ImageSpacingCalibratedEventDetail, VolumeNewImageEvent, VolumeNewImageEventDetail, StackViewportNewStackEvent, StackViewportNewStackEventDetail, StackViewportScrollEvent, StackViewportScrollEventDetail, StackScrollOutOfBoundsEvent, StackScrollOutOfBoundsEventDetail, CameraResetEvent, CameraResetEventDetail, };
|
|
@@ -1,2 +1,88 @@
|
|
|
1
|
-
import type
|
|
2
|
-
|
|
1
|
+
import type vtkImageData from '@kitware/vtk.js/Common/DataModel/ImageData';
|
|
2
|
+
import type { PointInShape } from '../utilities/pointInShapeCallback.js';
|
|
3
|
+
import type BoundsIJK from './BoundsIJK.js';
|
|
4
|
+
import type { CPUImageData } from './CPUIImageData.js';
|
|
5
|
+
import type { IRLEVoxelMap } from './IRLEVoxelMap.js';
|
|
6
|
+
import type { PixelDataTypedArray } from './PixelDataTypedArray.js';
|
|
7
|
+
import type Point3 from './Point3.js';
|
|
8
|
+
export type VoxelManagerForEachOptions = {
|
|
9
|
+
boundsIJK?: BoundsIJK;
|
|
10
|
+
isInObject?: (pointLPS: any, pointIJK: any) => boolean;
|
|
11
|
+
returnPoints?: boolean;
|
|
12
|
+
imageData?: vtkImageData | CPUImageData;
|
|
13
|
+
};
|
|
14
|
+
export type VoxelManagerForEachCallbackArguments = {
|
|
15
|
+
value: unknown;
|
|
16
|
+
index: number;
|
|
17
|
+
pointIJK: Point3;
|
|
18
|
+
pointLPS: Point3;
|
|
19
|
+
};
|
|
20
|
+
export interface IVoxelManager<T> {
|
|
21
|
+
readonly id: string;
|
|
22
|
+
readonly dimensions: Point3;
|
|
23
|
+
readonly numberOfComponents: number;
|
|
24
|
+
width: number;
|
|
25
|
+
frameSize: number;
|
|
26
|
+
map: Map<number, T> | IRLEVoxelMap<T>;
|
|
27
|
+
sourceVoxelManager: IVoxelManager<T>;
|
|
28
|
+
points: Set<number>;
|
|
29
|
+
modifiedSlices: Set<number>;
|
|
30
|
+
isInObject: (pointLPS: any, pointIJK: any) => boolean;
|
|
31
|
+
getCompleteScalarDataArray?: () => ArrayLike<number>;
|
|
32
|
+
setCompleteScalarDataArray?: (scalarData: ArrayLike<number>) => void;
|
|
33
|
+
invalidateCache?: () => void;
|
|
34
|
+
invalidateSlice?: (sliceIndex: number) => void;
|
|
35
|
+
getRange?: () => [number, number];
|
|
36
|
+
readonly _get: (index: number) => T;
|
|
37
|
+
readonly _set: (index: number, v: T) => boolean;
|
|
38
|
+
readonly _getConstructor?: () => new (length: number) => PixelDataTypedArray;
|
|
39
|
+
_getScalarDataLength?: () => number;
|
|
40
|
+
_getScalarData?: () => ArrayLike<number>;
|
|
41
|
+
_updateScalarData?: (scalarData: ArrayLike<number>) => PixelDataTypedArray;
|
|
42
|
+
_getSliceData?: (args: {
|
|
43
|
+
sliceIndex: number;
|
|
44
|
+
slicePlane: number;
|
|
45
|
+
}) => PixelDataTypedArray;
|
|
46
|
+
getAtIJK: (i: number, j: number, k: number) => T;
|
|
47
|
+
setAtIJK: (i: number, j: number, k: number, v: any) => boolean;
|
|
48
|
+
getAtIJKPoint: (point: Point3) => T;
|
|
49
|
+
setAtIJKPoint: (point: Point3, v: any) => void;
|
|
50
|
+
getAtIndex: (index: number) => T;
|
|
51
|
+
setAtIndex: (index: number, v: any) => boolean;
|
|
52
|
+
toIJK(index: number): Point3;
|
|
53
|
+
toIndex(ijk: Point3): number;
|
|
54
|
+
getDefaultBounds(): BoundsIJK;
|
|
55
|
+
getBoundsIJK(): BoundsIJK;
|
|
56
|
+
setBounds(bounds: BoundsIJK): void;
|
|
57
|
+
clearBounds(): void;
|
|
58
|
+
forEach: (callback: (args: VoxelManagerForEachCallbackArguments) => void, options?: VoxelManagerForEachOptions) => PointInShape[] | void;
|
|
59
|
+
rleForEach(callback: any, options?: any): void;
|
|
60
|
+
getScalarData(storeScalarData?: boolean): PixelDataTypedArray;
|
|
61
|
+
setScalarData(newScalarData: PixelDataTypedArray): void;
|
|
62
|
+
getWritableScalarData(): PixelDataTypedArray | undefined;
|
|
63
|
+
setFromScalarData(scalarData: ArrayLike<number>): void;
|
|
64
|
+
getScalarDataLength(): number;
|
|
65
|
+
getConstructor(): new (length: number) => PixelDataTypedArray;
|
|
66
|
+
readonly sizeInBytes: number;
|
|
67
|
+
readonly bytePerVoxel: number;
|
|
68
|
+
getSliceData: (args: {
|
|
69
|
+
sliceIndex: number;
|
|
70
|
+
slicePlane: number;
|
|
71
|
+
}) => PixelDataTypedArray;
|
|
72
|
+
getMiddleSliceData: () => PixelDataTypedArray;
|
|
73
|
+
getArrayOfModifiedSlices(): number[];
|
|
74
|
+
resetModifiedSlices(): void;
|
|
75
|
+
addPoint(point: Point3 | number): void;
|
|
76
|
+
getPoints(): Point3[];
|
|
77
|
+
getMinMax(): {
|
|
78
|
+
min: T;
|
|
79
|
+
max: T;
|
|
80
|
+
};
|
|
81
|
+
clear(): void;
|
|
82
|
+
}
|
|
83
|
+
export interface IVolumeVoxelManager<T> extends IVoxelManager<T> {
|
|
84
|
+
getCompleteScalarDataArray: () => ArrayLike<number>;
|
|
85
|
+
setCompleteScalarDataArray: (scalarData: ArrayLike<number>) => void;
|
|
86
|
+
invalidateCache: () => void;
|
|
87
|
+
getRange: () => [number, number];
|
|
88
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type ImageQualityStatus from '../enums/ImageQualityStatus.js';
|
|
2
|
+
import type Point3 from './Point3.js';
|
|
3
|
+
import type { VoxelDataSource, VoxelReduction } from './VoxelQualityRegistry.js';
|
|
4
|
+
export type ViewportFidelityCause = 'deviceTextureLimit' | 'memoryBudget' | 'performanceTarget' | 'incompleteLoad' | 'missingFrames' | 'lossyDecode';
|
|
5
|
+
export type ViewportFidelityShownState = 'hidden' | 'done' | 'loading' | 'lod' | 'lossy';
|
|
6
|
+
export type ViewportFidelityState = {
|
|
7
|
+
dataResolution?: {
|
|
8
|
+
spacing: Point3;
|
|
9
|
+
dimensions: Point3;
|
|
10
|
+
};
|
|
11
|
+
displayResolution?: {
|
|
12
|
+
spacing: Point3;
|
|
13
|
+
};
|
|
14
|
+
reductionKind?: VoxelReduction;
|
|
15
|
+
reductionSource?: VoxelDataSource;
|
|
16
|
+
magnitude?: Point3;
|
|
17
|
+
cause?: ViewportFidelityCause;
|
|
18
|
+
transient?: boolean;
|
|
19
|
+
progressive?: {
|
|
20
|
+
status: ImageQualityStatus;
|
|
21
|
+
lowest?: ImageQualityStatus;
|
|
22
|
+
missing?: number;
|
|
23
|
+
voxels?: number;
|
|
24
|
+
loadedFraction?: number;
|
|
25
|
+
};
|
|
26
|
+
shownState?: ViewportFidelityShownState;
|
|
27
|
+
lossy?: boolean;
|
|
28
|
+
};
|
|
29
|
+
export interface IViewportFidelity {
|
|
30
|
+
canReportFidelity(): boolean;
|
|
31
|
+
getFidelityState(): ViewportFidelityState;
|
|
32
|
+
notifyFidelityStateChanged(): void;
|
|
33
|
+
}
|
|
File without changes
|
|
@@ -5,8 +5,10 @@ import type Mat3 from './Mat3.js';
|
|
|
5
5
|
import type { PixelDataTypedArray, PixelDataTypedArrayString } from './PixelDataTypedArray.js';
|
|
6
6
|
import type RGB from './RGB.js';
|
|
7
7
|
import type { IVoxelManager } from './IVoxelManager.js';
|
|
8
|
+
import type { VoxelStatistic } from './VoxelStatisticRegistry.js';
|
|
8
9
|
interface VolumeProps {
|
|
9
10
|
volumeId: string;
|
|
11
|
+
reductionStatistic?: VoxelStatistic;
|
|
10
12
|
metadata: Metadata;
|
|
11
13
|
dimensions: Point3;
|
|
12
14
|
spacing: Point3;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type Mat3 from './Mat3.js';
|
|
2
|
+
import type Point3 from './Point3.js';
|
|
3
|
+
import type { VoxelStatistic } from './VoxelStatisticRegistry.js';
|
|
4
|
+
export type VoxelGrid = {
|
|
5
|
+
origin: Point3;
|
|
6
|
+
direction: Mat3;
|
|
7
|
+
spacing: Point3;
|
|
8
|
+
dimensions: Point3;
|
|
9
|
+
};
|
|
10
|
+
export type VoxelRepresentationId = {
|
|
11
|
+
grid: VoxelGrid;
|
|
12
|
+
statistic: VoxelStatistic;
|
|
13
|
+
};
|
|
14
|
+
export type VoxelGridReduction = {
|
|
15
|
+
factors: Point3;
|
|
16
|
+
sourceOffset?: Point3;
|
|
17
|
+
sourceDimensions?: Point3;
|
|
18
|
+
targetOffset?: Point3;
|
|
19
|
+
};
|
|
20
|
+
export type VoxelGridLimits = {
|
|
21
|
+
maxEdge?: number;
|
|
22
|
+
maxVoxelCount?: number;
|
|
23
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type ImageQualityStatus from '../enums/ImageQualityStatus.js';
|
|
2
|
+
import type BoundsIJK from './BoundsIJK.js';
|
|
3
|
+
import type Point3 from './Point3.js';
|
|
4
|
+
import type { VoxelGrid } from './VoxelGrid.js';
|
|
5
|
+
import type { VoxelDataSource, VoxelReduction } from './VoxelQualityRegistry.js';
|
|
6
|
+
export type DeliveredRegion = {
|
|
7
|
+
bounds: BoundsIJK;
|
|
8
|
+
quality: ImageQualityStatus;
|
|
9
|
+
};
|
|
10
|
+
export interface VoxelReductionDefinition {
|
|
11
|
+
reduction: VoxelReduction;
|
|
12
|
+
aliases: boolean;
|
|
13
|
+
description?: string;
|
|
14
|
+
}
|
|
15
|
+
export type VoxelQualityRecord = {
|
|
16
|
+
grid: VoxelGrid;
|
|
17
|
+
reduction: VoxelReduction;
|
|
18
|
+
source: VoxelDataSource;
|
|
19
|
+
lowest: ImageQualityStatus;
|
|
20
|
+
highest: ImageQualityStatus;
|
|
21
|
+
voxels: number;
|
|
22
|
+
missing: number;
|
|
23
|
+
deliveries: number;
|
|
24
|
+
exact: boolean;
|
|
25
|
+
status: ImageQualityStatus;
|
|
26
|
+
};
|
|
27
|
+
export type VoxelQualityRequirement = {
|
|
28
|
+
displaySpacing?: Point3;
|
|
29
|
+
missingAllowed?: number;
|
|
30
|
+
minStatus?: ImageQualityStatus;
|
|
31
|
+
};
|
|
32
|
+
export type VoxelQualityCause = 'resolution' | 'aliasing' | 'missingData' | 'quality';
|
|
33
|
+
export type VoxelQualityVerdict = {
|
|
34
|
+
lossless: boolean;
|
|
35
|
+
causes: VoxelQualityCause[];
|
|
36
|
+
magnitude: number;
|
|
37
|
+
record: VoxelQualityRecord;
|
|
38
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export interface CoreVoxelReductionRegistry {
|
|
2
|
+
none: 'none';
|
|
3
|
+
boxAverage: 'boxAverage';
|
|
4
|
+
boxForegroundMajority: 'boxForegroundMajority';
|
|
5
|
+
decimation: 'decimation';
|
|
6
|
+
}
|
|
7
|
+
export interface CoreVoxelReductionConstants {
|
|
8
|
+
readonly None: 'none';
|
|
9
|
+
readonly BoxAverage: 'boxAverage';
|
|
10
|
+
readonly BoxForegroundMajority: 'boxForegroundMajority';
|
|
11
|
+
readonly Decimation: 'decimation';
|
|
12
|
+
}
|
|
13
|
+
export interface VoxelReductionRegistry extends CoreVoxelReductionRegistry {
|
|
14
|
+
}
|
|
15
|
+
export interface VoxelReductionConstants extends CoreVoxelReductionConstants {
|
|
16
|
+
}
|
|
17
|
+
export type VoxelReduction = VoxelReductionRegistry[keyof VoxelReductionRegistry];
|
|
18
|
+
export interface CoreVoxelDataSourceRegistry {
|
|
19
|
+
serverLevel: 'serverLevel';
|
|
20
|
+
clientDerived: 'clientDerived';
|
|
21
|
+
decoderSubResolution: 'decoderSubResolution';
|
|
22
|
+
directLoad: 'directLoad';
|
|
23
|
+
}
|
|
24
|
+
export interface CoreVoxelDataSourceConstants {
|
|
25
|
+
readonly ServerLevel: 'serverLevel';
|
|
26
|
+
readonly ClientDerived: 'clientDerived';
|
|
27
|
+
readonly DecoderSubResolution: 'decoderSubResolution';
|
|
28
|
+
readonly DirectLoad: 'directLoad';
|
|
29
|
+
}
|
|
30
|
+
export interface VoxelDataSourceRegistry extends CoreVoxelDataSourceRegistry {
|
|
31
|
+
}
|
|
32
|
+
export interface VoxelDataSourceConstants extends CoreVoxelDataSourceConstants {
|
|
33
|
+
}
|
|
34
|
+
export type VoxelDataSource = VoxelDataSourceRegistry[keyof VoxelDataSourceRegistry];
|
|
File without changes
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type Point3 from './Point3.js';
|
|
2
|
+
import type { VoxelGridReduction } from './VoxelGrid.js';
|
|
3
|
+
import type { VoxelReduction } from './VoxelQualityRegistry.js';
|
|
4
|
+
import type { VoxelStatistic } from './VoxelStatisticRegistry.js';
|
|
5
|
+
export interface VoxelStatisticAccumulator {
|
|
6
|
+
reset: () => void;
|
|
7
|
+
add: (value: number, weight?: number) => void;
|
|
8
|
+
getValue: () => number;
|
|
9
|
+
}
|
|
10
|
+
export type VoxelStatisticSliceReducer = <T extends number | number[] = number>(source: {
|
|
11
|
+
dimensions: Point3;
|
|
12
|
+
getAtIJK: (i: number, j: number, k: number) => T;
|
|
13
|
+
}, reduction: VoxelGridReduction, target: {
|
|
14
|
+
setAtIJK: (i: number, j: number, k: number, value: T) => unknown;
|
|
15
|
+
}, options: {
|
|
16
|
+
round: boolean;
|
|
17
|
+
}) => number | undefined;
|
|
18
|
+
export type VoxelStatisticPlaneFill = (frames: ArrayLike<number>[], sourceSize: [number, number], targetSize: [number, number], factors: [number, number], values: {
|
|
19
|
+
[index: number]: number;
|
|
20
|
+
}, frameWeights?: number[]) => void;
|
|
21
|
+
export interface VoxelStatisticDefinition {
|
|
22
|
+
statistic: VoxelStatistic;
|
|
23
|
+
defaultSelection?: boolean;
|
|
24
|
+
description?: string;
|
|
25
|
+
createAccumulator: () => VoxelStatisticAccumulator;
|
|
26
|
+
reduceBySlices?: VoxelStatisticSliceReducer;
|
|
27
|
+
fillPlane?: VoxelStatisticPlaneFill;
|
|
28
|
+
boxReduction?: VoxelReduction;
|
|
29
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface CoreVoxelStatisticRegistry {
|
|
2
|
+
average: 'average';
|
|
3
|
+
foregroundMajority: 'foregroundMajority';
|
|
4
|
+
}
|
|
5
|
+
export interface CoreVoxelStatisticConstants {
|
|
6
|
+
readonly Average: 'average';
|
|
7
|
+
readonly ForegroundMajority: 'foregroundMajority';
|
|
8
|
+
}
|
|
9
|
+
export interface VoxelStatisticRegistry extends CoreVoxelStatisticRegistry {
|
|
10
|
+
}
|
|
11
|
+
export interface VoxelStatisticConstants extends CoreVoxelStatisticConstants {
|
|
12
|
+
}
|
|
13
|
+
export type VoxelStatistic = VoxelStatisticRegistry[keyof VoxelStatisticRegistry];
|
|
File without changes
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type IBaseStreamingImageVolume from './IBaseStreamingImageVolume.js';
|
|
2
2
|
import type Cornerstone3DConfig from './Cornerstone3DConfig.js';
|
|
3
|
+
import type { LossyDownsampling } from './Cornerstone3DConfig.js';
|
|
3
4
|
import type ICamera from './ICamera.js';
|
|
4
5
|
import type IEnabledElement from './IEnabledElement.js';
|
|
5
6
|
import type ICache from './ICache.js';
|
|
@@ -101,7 +102,9 @@ import type { VolumeProps } from './VolumeProps.js';
|
|
|
101
102
|
import type { BoundsLPS } from './BoundsLPS.js';
|
|
102
103
|
import type { IPointsManager, PolyDataPointConfiguration } from './IPointsManager.js';
|
|
103
104
|
import type IImageFrame from './IImageFrame.js';
|
|
104
|
-
import type { IVoxelManager } from './IVoxelManager.js';
|
|
105
|
+
import type { IVolumeVoxelManager, IVoxelManager, VoxelManagerForEachCallbackArguments, VoxelManagerForEachOptions } from './IVoxelManager.js';
|
|
106
|
+
import type { VoxelGrid, VoxelGridLimits, VoxelGridReduction, VoxelRepresentationId } from './VoxelGrid.js';
|
|
107
|
+
import type { VoxelStatisticAccumulator, VoxelStatisticDefinition, VoxelStatisticSliceReducer, VoxelStatisticPlaneFill } from './VoxelStatistic.js';
|
|
105
108
|
import type { IRLEVoxelMap, RLERun } from './IRLEVoxelMap.js';
|
|
106
109
|
import type ImageLoadRequests from './ImageLoadRequests.js';
|
|
107
110
|
import type { IBaseVolumeViewport } from './IBaseVolumeViewport.js';
|
|
@@ -114,7 +117,11 @@ import type { ViewportDataReference } from '../RenderingEngine/GenericViewport/i
|
|
|
114
117
|
import type { ResetCameraOptions, SetAspectRatioOptions } from './ICamera.js';
|
|
115
118
|
import type { ViewportType, ViewportTypeConstants, ViewportTypeRegistry } from './ViewportTypeRegistry.js';
|
|
116
119
|
import type { EffectiveRenderBackend, RenderBackendConstants, RenderBackendRegistry } from './RenderBackendRegistry.js';
|
|
120
|
+
import type { VoxelStatistic, VoxelStatisticConstants, VoxelStatisticRegistry } from './VoxelStatisticRegistry.js';
|
|
121
|
+
import type { VoxelDataSource, VoxelDataSourceConstants, VoxelDataSourceRegistry, VoxelReduction, VoxelReductionConstants, VoxelReductionRegistry } from './VoxelQualityRegistry.js';
|
|
122
|
+
import type { DeliveredRegion, VoxelQualityCause, VoxelQualityRecord, VoxelQualityRequirement, VoxelQualityVerdict, VoxelReductionDefinition } from './VoxelQuality.js';
|
|
123
|
+
import type { IViewportFidelity, ViewportFidelityCause, ViewportFidelityState, ViewportFidelityShownState } from './ViewportFidelity.js';
|
|
117
124
|
export type * from './MetadataModuleTypes.js';
|
|
118
125
|
export type * from './InstanceTypes.js';
|
|
119
|
-
export type { Cornerstone3DConfig, IBaseStreamingImageVolume, ICamera, ResetCameraOptions, SetAspectRatioOptions, IStackViewport, IVideoViewport, IECGViewport, IWSIViewport, IVolumeViewport, IEnabledElement, ICache, IVolume, IViewportId, IImageVolume, ImageVolumeProps, IDynamicImageVolume, IRenderingEngine, ScalingParameters, ScalingDescriptor, PTScaling, IPointsManager, PolyDataPointConfiguration, Scaling, IStreamingImageVolume, IImage, IImageData, IImageCalibration, CPUIImageData, CPUImageData, EventTypes, ImageLoaderFn, VolumeLoaderFn, IRegisterImageLoader, IStreamingVolumeProperties, IViewport, IGenericViewport, ViewportContentMode, ViewReference, DataSetOptions as ImageSetOptions, ViewPresentation, ViewPresentationSelector, ReferenceCompatibleOptions, ViewReferenceSpecifier, RenderingEngineResizeOptions, StackViewportProperties, VolumeViewportProperties, ViewportProperties, PublicViewportInput, VolumeActor, Actor, ActorEntry, ActorMapperProxy, ImageActor, ICanvasActor, IImageLoadObject, IVolumeLoadObject, IVolumeInput, VolumeInputCallback, IStackInput, StackInputCallback, ViewportPreset, Metadata, OrientationVectors, AABB2, AABB3, Point2, Point3, PointsXYZ, Point4, Mat3, Plane, ViewportInputOptions, VideoViewportProperties, WSIViewportProperties, VOIRange, VOI, DisplayArea, FlipDirection, ICachedImage, ICachedVolume, CPUFallbackEnabledElement, CPUFallbackViewport, CPUFallbackTransform, CPUFallbackColormapData, CPUFallbackViewportDisplayedArea, CPUFallbackColormapsData, CPUFallbackColormap, TransformMatrix2D, CPUFallbackLookupTable, CPUFallbackLUT, CPUFallbackRenderingTools, CustomEventType, ActorSliceRange, ImageSliceData, IGeometry, IGeometryLoadObject, ICachedGeometry, PublicContourSetData, ContourSetData, ContourData, IContourSet, IContour, PublicSurfaceData, SurfaceData, ISurface, PublicMeshData, MeshData, IMesh, RGB, ColormapPublic, ColormapRegistration, PixelDataTypedArray, PixelDataTypedArrayString, ImagePixelModule, ImagePlaneModule, AffineMatrix, ImageLoadListener, InternalVideoCamera, VideoViewportInput, InternalECGCamera, ECGViewportInput, ECGChannel, ECGWaveformData, ECGViewportProperties, BoundsIJK, BoundsLPS, Color, ColorLUT, VolumeProps, IImageFrame, LocalVolumeOptions, IVoxelManager, IRLEVoxelMap, RLERun, ViewportInput, ImageLoadRequests, IBaseVolumeViewport, GeometryLoaderFn, ScrollOptions, JumpToSliceOptions, Memo, HistoryMemo, VoxelManager, RLEVoxelMap, RenderingEngineModeType, VtkOffscreenMultiRenderWindow, ViewportDataReference, ViewportType, ViewportTypeRegistry, ViewportTypeConstants, EffectiveRenderBackend, RenderBackendRegistry, RenderBackendConstants, };
|
|
126
|
+
export type { Cornerstone3DConfig, LossyDownsampling, IBaseStreamingImageVolume, ICamera, ResetCameraOptions, SetAspectRatioOptions, IStackViewport, IVideoViewport, IECGViewport, IWSIViewport, IVolumeViewport, IEnabledElement, ICache, IVolume, IViewportId, IImageVolume, ImageVolumeProps, IDynamicImageVolume, IRenderingEngine, ScalingParameters, ScalingDescriptor, PTScaling, IPointsManager, PolyDataPointConfiguration, Scaling, IStreamingImageVolume, IImage, IImageData, IImageCalibration, CPUIImageData, CPUImageData, EventTypes, ImageLoaderFn, VolumeLoaderFn, IRegisterImageLoader, IStreamingVolumeProperties, IViewport, IGenericViewport, ViewportContentMode, ViewReference, DataSetOptions as ImageSetOptions, ViewPresentation, ViewPresentationSelector, ReferenceCompatibleOptions, ViewReferenceSpecifier, RenderingEngineResizeOptions, StackViewportProperties, VolumeViewportProperties, ViewportProperties, PublicViewportInput, VolumeActor, Actor, ActorEntry, ActorMapperProxy, ImageActor, ICanvasActor, IImageLoadObject, IVolumeLoadObject, IVolumeInput, VolumeInputCallback, IStackInput, StackInputCallback, ViewportPreset, Metadata, OrientationVectors, AABB2, AABB3, Point2, Point3, PointsXYZ, Point4, Mat3, Plane, ViewportInputOptions, VideoViewportProperties, WSIViewportProperties, VOIRange, VOI, DisplayArea, FlipDirection, ICachedImage, ICachedVolume, CPUFallbackEnabledElement, CPUFallbackViewport, CPUFallbackTransform, CPUFallbackColormapData, CPUFallbackViewportDisplayedArea, CPUFallbackColormapsData, CPUFallbackColormap, TransformMatrix2D, CPUFallbackLookupTable, CPUFallbackLUT, CPUFallbackRenderingTools, CustomEventType, ActorSliceRange, ImageSliceData, IGeometry, IGeometryLoadObject, ICachedGeometry, PublicContourSetData, ContourSetData, ContourData, IContourSet, IContour, PublicSurfaceData, SurfaceData, ISurface, PublicMeshData, MeshData, IMesh, RGB, ColormapPublic, ColormapRegistration, PixelDataTypedArray, PixelDataTypedArrayString, ImagePixelModule, ImagePlaneModule, AffineMatrix, ImageLoadListener, InternalVideoCamera, VideoViewportInput, InternalECGCamera, ECGViewportInput, ECGChannel, ECGWaveformData, ECGViewportProperties, BoundsIJK, BoundsLPS, Color, ColorLUT, VolumeProps, IImageFrame, LocalVolumeOptions, IVoxelManager, IVolumeVoxelManager, VoxelManagerForEachCallbackArguments, VoxelManagerForEachOptions, VoxelGrid, VoxelGridLimits, VoxelGridReduction, VoxelRepresentationId, VoxelStatistic, VoxelStatisticAccumulator, VoxelStatisticDefinition, VoxelStatisticSliceReducer, VoxelStatisticPlaneFill, IRLEVoxelMap, RLERun, ViewportInput, ImageLoadRequests, IBaseVolumeViewport, GeometryLoaderFn, ScrollOptions, JumpToSliceOptions, Memo, HistoryMemo, VoxelManager, RLEVoxelMap, RenderingEngineModeType, VtkOffscreenMultiRenderWindow, ViewportDataReference, ViewportType, ViewportTypeRegistry, ViewportTypeConstants, EffectiveRenderBackend, RenderBackendRegistry, RenderBackendConstants, VoxelStatisticRegistry, VoxelStatisticConstants, VoxelReduction, VoxelReductionRegistry, VoxelReductionConstants, VoxelReductionDefinition, VoxelDataSource, VoxelDataSourceRegistry, VoxelDataSourceConstants, DeliveredRegion, VoxelQualityRecord, VoxelQualityRequirement, VoxelQualityVerdict, VoxelQualityCause, IViewportFidelity, ViewportFidelityCause, ViewportFidelityState, ViewportFidelityShownState, };
|
|
120
127
|
export { ActorRenderMode };
|