@cornerstonejs/core 0.36.3 → 0.36.4
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/cjs/utilities/getSliceRange.js +2 -1
- package/dist/cjs/utilities/getSliceRange.js.map +1 -1
- package/dist/esm/utilities/getSliceRange.js +2 -1
- package/dist/esm/utilities/getSliceRange.js.map +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/package.json +4 -3
- package/src/RenderingEngine/BaseVolumeViewport.ts +847 -0
- package/src/RenderingEngine/RenderingEngine.ts +1364 -0
- package/src/RenderingEngine/StackViewport.ts +2690 -0
- package/src/RenderingEngine/Viewport.ts +1244 -0
- package/src/RenderingEngine/VolumeViewport.ts +420 -0
- package/src/RenderingEngine/VolumeViewport3D.ts +42 -0
- package/src/RenderingEngine/getRenderingEngine.ts +34 -0
- package/src/RenderingEngine/helpers/addVolumesToViewports.ts +52 -0
- package/src/RenderingEngine/helpers/cpuFallback/colors/colormap.ts +343 -0
- package/src/RenderingEngine/helpers/cpuFallback/colors/index.ts +4 -0
- package/src/RenderingEngine/helpers/cpuFallback/colors/lookupTable.ts +469 -0
- package/src/RenderingEngine/helpers/cpuFallback/drawImageSync.ts +58 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/calculateTransform.ts +136 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/canvasToPixel.ts +25 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/computeAutoVoi.ts +47 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/correctShift.ts +38 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/createViewport.ts +64 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/doesImageNeedToBeRendered.ts +36 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/fitToWindow.ts +22 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/generateColorLUT.ts +60 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/generateLut.ts +83 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/getDefaultViewport.ts +88 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/getImageFitScale.ts +52 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/getImageSize.ts +55 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/getLut.ts +53 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/getModalityLut.ts +55 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/getTransform.ts +17 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/getVOILut.ts +74 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/initializeRenderCanvas.ts +37 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/lutMatches.ts +21 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/now.ts +13 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/pixelToCanvas.ts +22 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/renderColorImage.ts +193 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/renderGrayscaleImage.ts +166 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/renderPseudoColorImage.ts +203 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/resetCamera.ts +32 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/resize.ts +109 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/saveLastRendered.ts +36 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/setDefaultViewport.ts +17 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/setToPixelCoordinateSystem.ts +32 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/storedColorPixelDataToCanvasImageData.ts +58 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageData.ts +76 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageDataColorLUT.ts +60 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageDataPET.ts +50 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageDataPseudocolorLUT.ts +66 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageDataPseudocolorLUTPET.ts +68 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageDataRGBA.ts +81 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/storedRGBAPixelDataToCanvasImageData.ts +56 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/transform.ts +126 -0
- package/src/RenderingEngine/helpers/cpuFallback/rendering/validator.ts +31 -0
- package/src/RenderingEngine/helpers/createVolumeActor.ts +103 -0
- package/src/RenderingEngine/helpers/createVolumeMapper.ts +37 -0
- package/src/RenderingEngine/helpers/getOrCreateCanvas.ts +58 -0
- package/src/RenderingEngine/helpers/index.ts +15 -0
- package/src/RenderingEngine/helpers/isRgbaSourceRgbDest.ts +1 -0
- package/src/RenderingEngine/helpers/setDefaultVolumeVOI.ts +227 -0
- package/src/RenderingEngine/helpers/setVolumesForViewports.ts +52 -0
- package/src/RenderingEngine/helpers/viewportTypeToViewportClass.ts +14 -0
- package/src/RenderingEngine/helpers/viewportTypeUsesCustomRenderingPipeline.ts +7 -0
- package/src/RenderingEngine/helpers/volumeNewImageEventDispatcher.ts +75 -0
- package/src/RenderingEngine/index.ts +23 -0
- package/src/RenderingEngine/renderingEngineCache.ts +43 -0
- package/src/RenderingEngine/vtkClasses/index.js +11 -0
- package/src/RenderingEngine/vtkClasses/vtkOffscreenMultiRenderWindow.js +149 -0
- package/src/RenderingEngine/vtkClasses/vtkSharedVolumeMapper.js +52 -0
- package/src/RenderingEngine/vtkClasses/vtkSlabCamera.d.ts +781 -0
- package/src/RenderingEngine/vtkClasses/vtkSlabCamera.js +155 -0
- package/src/RenderingEngine/vtkClasses/vtkStreamingOpenGLRenderWindow.js +47 -0
- package/src/RenderingEngine/vtkClasses/vtkStreamingOpenGLTexture.js +272 -0
- package/src/RenderingEngine/vtkClasses/vtkStreamingOpenGLViewNodeFactory.js +159 -0
- package/src/RenderingEngine/vtkClasses/vtkStreamingOpenGLVolumeMapper.js +319 -0
- package/src/Settings.ts +294 -0
- package/src/cache/cache.ts +854 -0
- package/src/cache/classes/Contour.ts +70 -0
- package/src/cache/classes/ContourSet.ts +151 -0
- package/src/cache/classes/ImageVolume.ts +155 -0
- package/src/cache/index.ts +5 -0
- package/src/constants/cpuColormaps.ts +1537 -0
- package/src/constants/epsilon.ts +3 -0
- package/src/constants/index.ts +13 -0
- package/src/constants/mprCameraValues.ts +20 -0
- package/src/constants/rendering.ts +8 -0
- package/src/constants/viewportPresets.ts +357 -0
- package/src/enums/BlendModes.ts +23 -0
- package/src/enums/ContourType.ts +6 -0
- package/src/enums/Events.ts +196 -0
- package/src/enums/GeometryType.ts +5 -0
- package/src/enums/InterpolationType.ts +13 -0
- package/src/enums/OrientationAxis.ts +8 -0
- package/src/enums/RequestType.ts +13 -0
- package/src/enums/SharedArrayBufferModes.ts +11 -0
- package/src/enums/VOILUTFunctionType.ts +10 -0
- package/src/enums/ViewportType.ts +21 -0
- package/src/enums/index.ts +23 -0
- package/src/eventTarget.ts +67 -0
- package/src/getEnabledElement.ts +105 -0
- package/src/global.ts +8 -0
- package/src/index.ts +123 -0
- package/src/init.ts +247 -0
- package/src/loaders/geometryLoader.ts +108 -0
- package/src/loaders/imageLoader.ts +298 -0
- package/src/loaders/volumeLoader.ts +477 -0
- package/src/metaData.ts +84 -0
- package/src/requestPool/imageLoadPoolManager.ts +43 -0
- package/src/requestPool/imageRetrievalPoolManager.ts +25 -0
- package/src/requestPool/requestPoolManager.ts +329 -0
- package/src/types/ActorSliceRange.ts +17 -0
- package/src/types/CPUFallbackColormap.ts +23 -0
- package/src/types/CPUFallbackColormapData.ts +12 -0
- package/src/types/CPUFallbackColormapsData.ts +7 -0
- package/src/types/CPUFallbackEnabledElement.ts +71 -0
- package/src/types/CPUFallbackLUT.ts +5 -0
- package/src/types/CPUFallbackLookupTable.ts +17 -0
- package/src/types/CPUFallbackRenderingTools.ts +25 -0
- package/src/types/CPUFallbackTransform.ts +16 -0
- package/src/types/CPUFallbackViewport.ts +29 -0
- package/src/types/CPUFallbackViewportDisplayedArea.ts +15 -0
- package/src/types/CPUIImageData.ts +47 -0
- package/src/types/ContourData.ts +19 -0
- package/src/types/Cornerstone3DConfig.ts +31 -0
- package/src/types/CustomEventType.ts +14 -0
- package/src/types/EventTypes.ts +403 -0
- package/src/types/FlipDirection.ts +9 -0
- package/src/types/IActor.ts +23 -0
- package/src/types/ICache.ts +28 -0
- package/src/types/ICachedGeometry.ts +13 -0
- package/src/types/ICachedImage.ts +13 -0
- package/src/types/ICachedVolume.ts +12 -0
- package/src/types/ICamera.ts +36 -0
- package/src/types/IContour.ts +18 -0
- package/src/types/IContourSet.ts +56 -0
- package/src/types/IDynamicImageVolume.ts +18 -0
- package/src/types/IEnabledElement.ts +21 -0
- package/src/types/IGeometry.ts +12 -0
- package/src/types/IImage.ts +113 -0
- package/src/types/IImageData.ts +45 -0
- package/src/types/IImageVolume.ts +78 -0
- package/src/types/ILoadObject.ts +36 -0
- package/src/types/IRegisterImageLoader.ts +10 -0
- package/src/types/IRenderingEngine.ts +28 -0
- package/src/types/IStackViewport.ts +138 -0
- package/src/types/IStreamingImageVolume.ts +13 -0
- package/src/types/IStreamingVolumeProperties.ts +14 -0
- package/src/types/IViewport.ts +149 -0
- package/src/types/IViewportId.ts +9 -0
- package/src/types/IVolume.ts +45 -0
- package/src/types/IVolumeInput.ts +36 -0
- package/src/types/IVolumeViewport.ts +141 -0
- package/src/types/ImageLoaderFn.ts +16 -0
- package/src/types/ImageSliceData.ts +6 -0
- package/src/types/Mat3.ts +16 -0
- package/src/types/Metadata.ts +39 -0
- package/src/types/OrientationVectors.ts +36 -0
- package/src/types/Plane.ts +6 -0
- package/src/types/Point2.ts +6 -0
- package/src/types/Point3.ts +6 -0
- package/src/types/Point4.ts +6 -0
- package/src/types/ScalingParameters.ts +27 -0
- package/src/types/StackViewportProperties.ts +25 -0
- package/src/types/TransformMatrix2D.ts +4 -0
- package/src/types/ViewportInputOptions.ts +21 -0
- package/src/types/ViewportPreset.ts +14 -0
- package/src/types/VolumeLoaderFn.ts +18 -0
- package/src/types/VolumeViewportProperties.ts +14 -0
- package/src/types/index.ts +157 -0
- package/src/types/voi.ts +15 -0
- package/src/utilities/actorCheck.ts +24 -0
- package/src/utilities/applyPreset.ts +132 -0
- package/src/utilities/calculateViewportsSpatialRegistration.ts +74 -0
- package/src/utilities/calibratedPixelSpacingMetadataProvider.ts +38 -0
- package/src/utilities/createFloat32SharedArray.ts +45 -0
- package/src/utilities/createInt16SharedArray.ts +43 -0
- package/src/utilities/createLinearRGBTransferFunction.ts +22 -0
- package/src/utilities/createSigmoidRGBTransferFunction.ts +63 -0
- package/src/utilities/createUInt16SharedArray.ts +43 -0
- package/src/utilities/createUint8SharedArray.ts +45 -0
- package/src/utilities/deepFreeze.ts +19 -0
- package/src/utilities/deepMerge.ts +81 -0
- package/src/utilities/getClosestImageId.ts +80 -0
- package/src/utilities/getClosestStackImageIndexForPoint.ts +116 -0
- package/src/utilities/getImageSliceDataForVolumeViewport.ts +61 -0
- package/src/utilities/getMinMax.ts +31 -0
- package/src/utilities/getRuntimeId.ts +54 -0
- package/src/utilities/getScalarDataType.ts +31 -0
- package/src/utilities/getScalingParameters.ts +35 -0
- package/src/utilities/getSliceRange.ts +86 -0
- package/src/utilities/getSpacingInNormalDirection.ts +44 -0
- package/src/utilities/getTargetVolumeAndSpacingInNormalDir.ts +126 -0
- package/src/utilities/getViewportImageCornersInWorld.ts +102 -0
- package/src/utilities/getViewportsWithImageURI.ts +46 -0
- package/src/utilities/getViewportsWithVolumeId.ts +38 -0
- package/src/utilities/getVoiFromSigmoidRGBTransferFunction.ts +23 -0
- package/src/utilities/getVolumeActorCorners.ts +24 -0
- package/src/utilities/getVolumeSliceRangeInfo.ts +52 -0
- package/src/utilities/getVolumeViewportScrollInfo.ts +32 -0
- package/src/utilities/getVolumeViewportsContainingSameVolumes.ts +58 -0
- package/src/utilities/hasNaNValues.ts +12 -0
- package/src/utilities/imageIdToURI.ts +10 -0
- package/src/utilities/imageToWorldCoords.ts +54 -0
- package/src/utilities/index.ts +100 -0
- package/src/utilities/indexWithinDimensions.ts +27 -0
- package/src/utilities/invertRgbTransferFunction.ts +36 -0
- package/src/utilities/isEqual.ts +27 -0
- package/src/utilities/isOpposite.ts +23 -0
- package/src/utilities/isTypedArray.ts +20 -0
- package/src/utilities/loadImageToCanvas.ts +80 -0
- package/src/utilities/planar.ts +91 -0
- package/src/utilities/renderToCanvas.ts +32 -0
- package/src/utilities/scaleRgbTransferFunction.ts +37 -0
- package/src/utilities/snapFocalPointToSlice.ts +78 -0
- package/src/utilities/spatialRegistrationMetadataProvider.ts +50 -0
- package/src/utilities/transformWorldToIndex.ts +16 -0
- package/src/utilities/triggerEvent.ts +38 -0
- package/src/utilities/uuidv4.ts +13 -0
- package/src/utilities/windowLevel.ts +39 -0
- package/src/utilities/worldToImageCoords.ts +64 -0
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
import type { mat4 } from 'gl-matrix';
|
|
2
|
+
import type { vtkImageData } from '@kitware/vtk.js/Common/DataModel/ImageData';
|
|
3
|
+
import type CustomEventType from '../types/CustomEventType';
|
|
4
|
+
import type ICachedImage from './ICachedImage';
|
|
5
|
+
import type ICachedVolume from './ICachedVolume';
|
|
6
|
+
import type ICamera from './ICamera';
|
|
7
|
+
import type IImage from './IImage';
|
|
8
|
+
import type IImageVolume from './IImageVolume';
|
|
9
|
+
import type { VOIRange } from './voi';
|
|
10
|
+
import type VOILUTFunctionType from '../enums/VOILUTFunctionType';
|
|
11
|
+
/**
|
|
12
|
+
* CAMERA_MODIFIED Event's data
|
|
13
|
+
*/
|
|
14
|
+
type CameraModifiedEventDetail = {
|
|
15
|
+
/** Previous camera properties */
|
|
16
|
+
previousCamera: ICamera;
|
|
17
|
+
/** Current camera properties */
|
|
18
|
+
camera: ICamera;
|
|
19
|
+
/** Viewport HTML element in the DOM */
|
|
20
|
+
element: HTMLDivElement;
|
|
21
|
+
/** Viewport Unique ID in the renderingEngine */
|
|
22
|
+
viewportId: string;
|
|
23
|
+
/** Unique ID for the renderingEngine */
|
|
24
|
+
renderingEngineId: string;
|
|
25
|
+
/** Rotation Optional */
|
|
26
|
+
rotation?: number;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* VOI_MODIFIED Event's data
|
|
31
|
+
*/
|
|
32
|
+
type VoiModifiedEventDetail = {
|
|
33
|
+
/** Viewport Unique ID in the renderingEngine */
|
|
34
|
+
viewportId: string;
|
|
35
|
+
/** new VOI range */
|
|
36
|
+
range: VOIRange;
|
|
37
|
+
/** Unique ID for the volume in the cache */
|
|
38
|
+
volumeId?: string;
|
|
39
|
+
/** VOILUTFunction */
|
|
40
|
+
VOILUTFunction?: VOILUTFunctionType;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* ELEMENT_DISABLED Event's data
|
|
45
|
+
*/
|
|
46
|
+
type ElementDisabledEventDetail = {
|
|
47
|
+
/** Viewport HTML element in the DOM */
|
|
48
|
+
element: HTMLDivElement;
|
|
49
|
+
/** Viewport Unique ID in the renderingEngine */
|
|
50
|
+
viewportId: string;
|
|
51
|
+
/** Unique ID for the renderingEngine */
|
|
52
|
+
renderingEngineId: string;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* ELEMENT_Enabled Event's data
|
|
57
|
+
*/
|
|
58
|
+
type ElementEnabledEventDetail = {
|
|
59
|
+
/** Viewport HTML element in the DOM */
|
|
60
|
+
element: HTMLDivElement;
|
|
61
|
+
/** Viewport Unique ID in the renderingEngine */
|
|
62
|
+
viewportId: string;
|
|
63
|
+
/** Unique ID for the renderingEngine */
|
|
64
|
+
renderingEngineId: string;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* IMAGE_RENDERED Event's data
|
|
69
|
+
*/
|
|
70
|
+
type ImageRenderedEventDetail = {
|
|
71
|
+
/** Viewport HTML element in the DOM */
|
|
72
|
+
element: HTMLDivElement;
|
|
73
|
+
/** Viewport Unique ID in the renderingEngine */
|
|
74
|
+
viewportId: string;
|
|
75
|
+
/** Unique ID for the renderingEngine */
|
|
76
|
+
renderingEngineId: string;
|
|
77
|
+
/** Whether to suppress the event */
|
|
78
|
+
suppressEvents?: boolean;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* IMAGE_VOLUME_MODIFIED Event's data
|
|
82
|
+
*/
|
|
83
|
+
type ImageVolumeModifiedEventDetail = {
|
|
84
|
+
/** the modified volume */
|
|
85
|
+
imageVolume: IImageVolume;
|
|
86
|
+
/** FrameOfReferenceUID where the volume belongs to */
|
|
87
|
+
FrameOfReferenceUID: string;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* IMAGE_LOADED Event's data
|
|
92
|
+
*/
|
|
93
|
+
type ImageLoadedEventDetail = {
|
|
94
|
+
/** the loaded image */
|
|
95
|
+
image: IImage;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* IMAGE_LOADED_FAILED Event's data
|
|
100
|
+
*/
|
|
101
|
+
type ImageLoadedFailedEventDetail = {
|
|
102
|
+
/** the imageId for the image */
|
|
103
|
+
imageId: string;
|
|
104
|
+
error: unknown;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* VOLUME_LOADED Event's data
|
|
109
|
+
*/
|
|
110
|
+
type VolumeLoadedEventDetail = {
|
|
111
|
+
/** the loaded volume */
|
|
112
|
+
volume: IImageVolume;
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* VOLUME_LOADED_FAILED Event's data
|
|
117
|
+
*/
|
|
118
|
+
type VolumeLoadedFailedEventDetail = {
|
|
119
|
+
/** the volumeId for the volume */
|
|
120
|
+
volumeId: string;
|
|
121
|
+
error: unknown;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* IMAGE_CACHE_IMAGE_REMOVED Event's data
|
|
126
|
+
*/
|
|
127
|
+
type ImageCacheImageRemovedEventDetail = {
|
|
128
|
+
/** the removed image id */
|
|
129
|
+
imageId: string;
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* IMAGE_CACHE_IMAGE_ADDED Event's data
|
|
134
|
+
*/
|
|
135
|
+
type ImageCacheImageAddedEventDetail = {
|
|
136
|
+
/** the added image */
|
|
137
|
+
image: ICachedImage;
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* VOLUME_CACHE_VOLUME_REMOVED Event's data
|
|
142
|
+
*/
|
|
143
|
+
type VolumeCacheVolumeRemovedEventDetail = {
|
|
144
|
+
/** the removed volume id */
|
|
145
|
+
volumeId: string;
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* VOLUME_CACHE_VOLUME_ADDED Event's data
|
|
150
|
+
*/
|
|
151
|
+
type VolumeCacheVolumeAddedEventDetail = {
|
|
152
|
+
/** the added volume */
|
|
153
|
+
volume: ICachedVolume;
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* PRE_STACK_NEW_IMAGE Event's data
|
|
158
|
+
*/
|
|
159
|
+
type PreStackNewImageEventDetail = {
|
|
160
|
+
/** the image imageId */
|
|
161
|
+
imageId: string;
|
|
162
|
+
/** the index of imageId in the stack */
|
|
163
|
+
imageIdIndex: number;
|
|
164
|
+
/** unique id for the viewport */
|
|
165
|
+
viewportId: string;
|
|
166
|
+
/** unique id for the renderingEngine */
|
|
167
|
+
renderingEngineId: string;
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* STACK_NEW_IMAGE Event's data
|
|
172
|
+
*/
|
|
173
|
+
type StackNewImageEventDetail = {
|
|
174
|
+
/** the new image set on the stack viewport */
|
|
175
|
+
image: IImage;
|
|
176
|
+
/** the image imageId */
|
|
177
|
+
imageId: string;
|
|
178
|
+
/** the index of imageId in the stack */
|
|
179
|
+
imageIdIndex: number;
|
|
180
|
+
/** unique id for the viewport */
|
|
181
|
+
viewportId: string;
|
|
182
|
+
/** unique id for the renderingEngine */
|
|
183
|
+
renderingEngineId: string;
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* VOLUME_NEW_IMAGE Event's data
|
|
188
|
+
*/
|
|
189
|
+
type VolumeNewImageEventDetail = {
|
|
190
|
+
/** image index */
|
|
191
|
+
imageIndex: number;
|
|
192
|
+
/** number of slices */
|
|
193
|
+
numberOfSlices: number;
|
|
194
|
+
/** unique id for the viewport */
|
|
195
|
+
viewportId: string;
|
|
196
|
+
/** unique id for the renderingEngine */
|
|
197
|
+
renderingEngineId: string;
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* IMAGE_SPACING_CALIBRATED Event's data
|
|
202
|
+
*/
|
|
203
|
+
type ImageSpacingCalibratedEventDetail = {
|
|
204
|
+
element: HTMLDivElement;
|
|
205
|
+
viewportId: string;
|
|
206
|
+
renderingEngineId: string;
|
|
207
|
+
imageId: string;
|
|
208
|
+
rowScale: number;
|
|
209
|
+
columnScale: number;
|
|
210
|
+
imageData: vtkImageData;
|
|
211
|
+
worldToIndex: mat4;
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* IMAGE_LOAD_PROGRESS Event's data. Note this is only for one image load and NOT volume load.
|
|
216
|
+
*/
|
|
217
|
+
type ImageLoadProgressEventDetail = {
|
|
218
|
+
/** url we are loading from */
|
|
219
|
+
url: string;
|
|
220
|
+
/** loading image image id */
|
|
221
|
+
imageId: string;
|
|
222
|
+
/** the bytes browser receive */
|
|
223
|
+
loaded: number;
|
|
224
|
+
/** the total bytes settled by the header */
|
|
225
|
+
total: number;
|
|
226
|
+
/** loaded divided by total * 100 - shows the percentage of the image loaded */
|
|
227
|
+
percent: number;
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* The STACK_VIEWPORT_NEW_STACK event's data, when a new stack is set on a StackViewport
|
|
232
|
+
*/
|
|
233
|
+
type StackViewportNewStackEventDetail = {
|
|
234
|
+
imageIds: string[];
|
|
235
|
+
viewportId: string;
|
|
236
|
+
element: HTMLDivElement;
|
|
237
|
+
currentImageIdIndex: number;
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Stack Scroll event detail
|
|
242
|
+
*/
|
|
243
|
+
type StackViewportScrollEventDetail = {
|
|
244
|
+
/** the new imageId index in the stack that we just scroll to */
|
|
245
|
+
newImageIdIndex: number;
|
|
246
|
+
/** the new imageId in the stack that we just scroll to */
|
|
247
|
+
imageId: string;
|
|
248
|
+
/** direction of the scroll */
|
|
249
|
+
direction: number;
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* CameraModified Event type
|
|
254
|
+
*/
|
|
255
|
+
type CameraModifiedEvent = CustomEventType<CameraModifiedEventDetail>;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* VOI_MODIFIED Event type
|
|
259
|
+
*/
|
|
260
|
+
type VoiModifiedEvent = CustomEventType<VoiModifiedEventDetail>;
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* ELEMENT_DISABLED Event type
|
|
264
|
+
*/
|
|
265
|
+
type ElementDisabledEvent = CustomEventType<ElementDisabledEventDetail>;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* ELEMENT_ENABLED Event type
|
|
269
|
+
*/
|
|
270
|
+
type ElementEnabledEvent = CustomEventType<ElementEnabledEventDetail>;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* IMAGE_RENDERED Event type
|
|
274
|
+
*/
|
|
275
|
+
type ImageRenderedEvent = CustomEventType<ElementEnabledEventDetail>;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* IMAGE_VOLUME_MODIFIED Event type
|
|
279
|
+
*/
|
|
280
|
+
type ImageVolumeModifiedEvent = CustomEventType<ImageVolumeModifiedEventDetail>;
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* IMAGE_LOADED Event type
|
|
284
|
+
*/
|
|
285
|
+
type ImageLoadedEvent = CustomEventType<ImageLoadedEventDetail>;
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* IMAGE_LOADED_FAILED Event type
|
|
289
|
+
*/
|
|
290
|
+
type ImageLoadedFailedEvent = CustomEventType<ImageLoadedFailedEventDetail>;
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* VOLUME_LOADED Event type
|
|
294
|
+
*/
|
|
295
|
+
type VolumeLoadedEvent = CustomEventType<VolumeLoadedEventDetail>;
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* VOLUME_LOADED_FAILED Event type
|
|
299
|
+
*/
|
|
300
|
+
type VolumeLoadedFailedEvent = CustomEventType<VolumeLoadedFailedEventDetail>;
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* IMAGE_CACHE_IMAGE_ADDED Event type
|
|
304
|
+
*/
|
|
305
|
+
type ImageCacheImageAddedEvent =
|
|
306
|
+
CustomEventType<ImageCacheImageAddedEventDetail>;
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* IMAGE_CACHE_IMAGE_REMOVED Event type
|
|
310
|
+
*/
|
|
311
|
+
type ImageCacheImageRemovedEvent =
|
|
312
|
+
CustomEventType<ImageCacheImageRemovedEventDetail>;
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* VOLUME_CACHE_VOLUME_ADDED Event type
|
|
316
|
+
*/
|
|
317
|
+
type VolumeCacheVolumeAddedEvent =
|
|
318
|
+
CustomEventType<VolumeCacheVolumeAddedEventDetail>;
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* VOLUME_CACHE_VOLUME_REMOVED Event type
|
|
322
|
+
*/
|
|
323
|
+
type VolumeCacheVolumeRemovedEvent =
|
|
324
|
+
CustomEventType<VolumeCacheVolumeRemovedEventDetail>;
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* START_NEW_IMAGE
|
|
328
|
+
*/
|
|
329
|
+
type StackNewImageEvent = CustomEventType<StackNewImageEventDetail>;
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* VOLUME_NEW_IMAGE
|
|
333
|
+
*/
|
|
334
|
+
type VolumeNewImageEvent = CustomEventType<VolumeNewImageEventDetail>;
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* START_NEW_IMAGE
|
|
338
|
+
*/
|
|
339
|
+
type PreStackNewImageEvent = CustomEventType<PreStackNewImageEventDetail>;
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* IMAGE_SPACING_CALIBRATED
|
|
343
|
+
*/
|
|
344
|
+
type ImageSpacingCalibratedEvent =
|
|
345
|
+
CustomEventType<ImageSpacingCalibratedEventDetail>;
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* IMAGE_LOAD_PROGRESS
|
|
349
|
+
*/
|
|
350
|
+
type ImageLoadProgressEvent = CustomEventType<ImageLoadProgressEventDetail>;
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* STACK_VIEWPORT_NEW_STACK
|
|
354
|
+
*/
|
|
355
|
+
type StackViewportNewStackEvent =
|
|
356
|
+
CustomEventType<StackViewportNewStackEventDetail>;
|
|
357
|
+
|
|
358
|
+
type StackViewportScrollEvent = CustomEventType<StackViewportScrollEventDetail>;
|
|
359
|
+
|
|
360
|
+
export type {
|
|
361
|
+
CameraModifiedEventDetail,
|
|
362
|
+
CameraModifiedEvent,
|
|
363
|
+
VoiModifiedEvent,
|
|
364
|
+
VoiModifiedEventDetail,
|
|
365
|
+
ElementDisabledEvent,
|
|
366
|
+
ElementDisabledEventDetail,
|
|
367
|
+
ElementEnabledEvent,
|
|
368
|
+
ElementEnabledEventDetail,
|
|
369
|
+
ImageRenderedEventDetail,
|
|
370
|
+
ImageRenderedEvent,
|
|
371
|
+
ImageVolumeModifiedEvent,
|
|
372
|
+
ImageVolumeModifiedEventDetail,
|
|
373
|
+
ImageLoadedEvent,
|
|
374
|
+
ImageLoadedEventDetail,
|
|
375
|
+
ImageLoadedFailedEventDetail,
|
|
376
|
+
ImageLoadedFailedEvent,
|
|
377
|
+
VolumeLoadedEvent,
|
|
378
|
+
VolumeLoadedEventDetail,
|
|
379
|
+
VolumeLoadedFailedEvent,
|
|
380
|
+
VolumeLoadedFailedEventDetail,
|
|
381
|
+
ImageCacheImageAddedEvent,
|
|
382
|
+
ImageCacheImageAddedEventDetail,
|
|
383
|
+
ImageCacheImageRemovedEvent,
|
|
384
|
+
ImageCacheImageRemovedEventDetail,
|
|
385
|
+
VolumeCacheVolumeAddedEvent,
|
|
386
|
+
VolumeCacheVolumeAddedEventDetail,
|
|
387
|
+
VolumeCacheVolumeRemovedEvent,
|
|
388
|
+
VolumeCacheVolumeRemovedEventDetail,
|
|
389
|
+
StackNewImageEvent,
|
|
390
|
+
StackNewImageEventDetail,
|
|
391
|
+
PreStackNewImageEvent,
|
|
392
|
+
PreStackNewImageEventDetail,
|
|
393
|
+
ImageSpacingCalibratedEvent,
|
|
394
|
+
ImageSpacingCalibratedEventDetail,
|
|
395
|
+
ImageLoadProgressEvent,
|
|
396
|
+
ImageLoadProgressEventDetail,
|
|
397
|
+
VolumeNewImageEvent,
|
|
398
|
+
VolumeNewImageEventDetail,
|
|
399
|
+
StackViewportNewStackEvent,
|
|
400
|
+
StackViewportNewStackEventDetail,
|
|
401
|
+
StackViewportScrollEvent,
|
|
402
|
+
StackViewportScrollEventDetail,
|
|
403
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type vtkActor from '@kitware/vtk.js/Rendering/Core/Actor';
|
|
2
|
+
import vtkImageSlice from '@kitware/vtk.js/Rendering/Core/ImageSlice';
|
|
3
|
+
import type vtkVolume from '@kitware/vtk.js/Rendering/Core/Volume';
|
|
4
|
+
|
|
5
|
+
export type Actor = vtkActor;
|
|
6
|
+
export type VolumeActor = vtkVolume;
|
|
7
|
+
export type ImageActor = vtkImageSlice;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Cornerstone Actor Entry including actor uid, actual Actor, and
|
|
11
|
+
* slabThickness for the actor. ActorEntry is the object that
|
|
12
|
+
* is retrieved from viewport when calling viewport.getActor(s)
|
|
13
|
+
*/
|
|
14
|
+
export type ActorEntry = {
|
|
15
|
+
/** actor UID */
|
|
16
|
+
uid: string;
|
|
17
|
+
/** actual actor object */
|
|
18
|
+
actor: Actor | VolumeActor | ImageActor;
|
|
19
|
+
/** the id of the reference volume from which this actor is derived or created*/
|
|
20
|
+
referenceId?: string;
|
|
21
|
+
/** slab thickness for the actor */
|
|
22
|
+
slabThickness?: number;
|
|
23
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { IImageLoadObject, IVolumeLoadObject } from './ILoadObject';
|
|
2
|
+
|
|
3
|
+
interface ICache {
|
|
4
|
+
/** Set the maximum cache size */
|
|
5
|
+
setMaxCacheSize: (maxCacheSize: number) => void;
|
|
6
|
+
/** Get the maximum cache size */
|
|
7
|
+
getMaxCacheSize: () => number;
|
|
8
|
+
/** Get the current cache size */
|
|
9
|
+
getCacheSize: () => number;
|
|
10
|
+
/** Stores the imageLoad Object inside the cache */
|
|
11
|
+
putImageLoadObject: (
|
|
12
|
+
imageId: string,
|
|
13
|
+
imageLoadObject: IImageLoadObject
|
|
14
|
+
) => Promise<any>;
|
|
15
|
+
/** Retrieves the imageLoad Object from the cache */
|
|
16
|
+
getImageLoadObject: (imageId: string) => IImageLoadObject | void;
|
|
17
|
+
/** Stores the volumeLoad Object inside the cache */
|
|
18
|
+
putVolumeLoadObject: (
|
|
19
|
+
volumeId: string,
|
|
20
|
+
volumeLoadObject: IVolumeLoadObject
|
|
21
|
+
) => Promise<any>;
|
|
22
|
+
/** Retrieves the volumeLoad Object from the cache */
|
|
23
|
+
getVolumeLoadObject: (volumeId: string) => IVolumeLoadObject | void;
|
|
24
|
+
/** Purge cache both image and volume */
|
|
25
|
+
purgeCache: () => void;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export default ICache;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import IGeometry from './IGeometry';
|
|
2
|
+
import { IGeometryLoadObject } from './ILoadObject';
|
|
3
|
+
|
|
4
|
+
interface ICachedGeometry {
|
|
5
|
+
geometryId: string;
|
|
6
|
+
geometryLoadObject: IGeometryLoadObject;
|
|
7
|
+
loaded: boolean;
|
|
8
|
+
timeStamp: number;
|
|
9
|
+
sizeInBytes: number;
|
|
10
|
+
geometry?: IGeometry;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default ICachedGeometry;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IImage, IImageLoadObject } from '../types';
|
|
2
|
+
|
|
3
|
+
interface ICachedImage {
|
|
4
|
+
image?: IImage;
|
|
5
|
+
imageId: string;
|
|
6
|
+
imageLoadObject: IImageLoadObject;
|
|
7
|
+
loaded: boolean;
|
|
8
|
+
sharedCacheKey?: string;
|
|
9
|
+
timeStamp: number;
|
|
10
|
+
sizeInBytes: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default ICachedImage;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IImageVolume, IVolumeLoadObject } from '../types';
|
|
2
|
+
|
|
3
|
+
interface ICachedVolume {
|
|
4
|
+
volume?: IImageVolume;
|
|
5
|
+
volumeId: string;
|
|
6
|
+
volumeLoadObject: IVolumeLoadObject;
|
|
7
|
+
loaded: boolean;
|
|
8
|
+
timeStamp: number;
|
|
9
|
+
sizeInBytes: number;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default ICachedVolume;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import Point3 from './Point3';
|
|
2
|
+
import Point2 from './Point2';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Camera Interface. See {@link https://kitware.github.io/vtk-examples/site/VTKBook/03Chapter3/#35-cameras} if you
|
|
6
|
+
* want to know more about the camera.
|
|
7
|
+
*/
|
|
8
|
+
interface ICamera {
|
|
9
|
+
/** Camera Focal point */
|
|
10
|
+
focalPoint?: Point3;
|
|
11
|
+
/** Camera Parallel Projection flag - whether camera is using parallel projection */
|
|
12
|
+
parallelProjection?: boolean;
|
|
13
|
+
/** Camera parallel scale - used for parallel projection zoom, smaller values zoom in */
|
|
14
|
+
parallelScale?: number;
|
|
15
|
+
/**
|
|
16
|
+
* Scale factor for the camera, it is the ratio of how much an image pixel takes
|
|
17
|
+
* up one screen pixel
|
|
18
|
+
*/
|
|
19
|
+
scale?: number;
|
|
20
|
+
/** Camera position */
|
|
21
|
+
position?: Point3;
|
|
22
|
+
/** Camera view angle - 90 degrees is orthographic */
|
|
23
|
+
viewAngle?: number;
|
|
24
|
+
/** Camera viewPlaneNormal - negative of the direction the camera is pointing or directionOfProjection*/
|
|
25
|
+
viewPlaneNormal?: Point3;
|
|
26
|
+
/** Camera viewUp - the direction of viewUP in camera */
|
|
27
|
+
viewUp?: Point3;
|
|
28
|
+
/** flip Horizontal */
|
|
29
|
+
flipHorizontal?: boolean;
|
|
30
|
+
/** flip Vertical */
|
|
31
|
+
flipVertical?: boolean;
|
|
32
|
+
/** clipping range */
|
|
33
|
+
clippingRange?: Point2;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export default ICamera;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Point3 } from '.';
|
|
2
|
+
import { ContourType } from '../enums';
|
|
3
|
+
|
|
4
|
+
export interface IContour {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly sizeInBytes: number;
|
|
7
|
+
points: Point3[];
|
|
8
|
+
color: any;
|
|
9
|
+
_getSizeInBytes(): number;
|
|
10
|
+
/**
|
|
11
|
+
* It returns the value of the points property of the data object
|
|
12
|
+
* @returns The points property of the data object.
|
|
13
|
+
*/
|
|
14
|
+
getPoints(): Point3[];
|
|
15
|
+
getColor(): Point3;
|
|
16
|
+
getType(): ContourType;
|
|
17
|
+
getFlatPointsArray(): number[];
|
|
18
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ContourData, IContour, Point3 } from './';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* This class represents a set of contours in 3d space.
|
|
5
|
+
* Usually contours are grouped together in a contour set to represent a meaningful shape.
|
|
6
|
+
*/
|
|
7
|
+
export interface IContourSet {
|
|
8
|
+
readonly id: string;
|
|
9
|
+
readonly sizeInBytes: number;
|
|
10
|
+
readonly frameOfReferenceUID: string;
|
|
11
|
+
contours: IContour[];
|
|
12
|
+
_createEachContour(data: ContourData[]): void;
|
|
13
|
+
getSizeInBytes(): number;
|
|
14
|
+
getColor(): any;
|
|
15
|
+
/**
|
|
16
|
+
* This function returns the contours of the image
|
|
17
|
+
* @returns The contours of the image.
|
|
18
|
+
*/
|
|
19
|
+
getContours(): IContour[];
|
|
20
|
+
/**
|
|
21
|
+
* It returns an array of all the points in the glyph
|
|
22
|
+
* @returns An array of points.
|
|
23
|
+
*/
|
|
24
|
+
getFlatPointsArray(): Point3[];
|
|
25
|
+
/**
|
|
26
|
+
* This function returns the number of contours in the current shape.
|
|
27
|
+
* @returns The number of contours in the glyph.
|
|
28
|
+
*/
|
|
29
|
+
getNumberOfContours(): number;
|
|
30
|
+
/**
|
|
31
|
+
* It loops through each contour in the `contours` array, and adds the number of
|
|
32
|
+
* points in each contour to the `numberOfPoints` variable
|
|
33
|
+
* @returns The number of points in the contours.
|
|
34
|
+
*/
|
|
35
|
+
getTotalNumberOfPoints(): number;
|
|
36
|
+
/**
|
|
37
|
+
* It returns an array of the number of points in each contour.
|
|
38
|
+
* @returns An array of numbers.
|
|
39
|
+
*/
|
|
40
|
+
getNumberOfPointsArray(): number[];
|
|
41
|
+
/**
|
|
42
|
+
* It returns the points in a contour.
|
|
43
|
+
* @param contourIndex - The index of the contour you want to get the
|
|
44
|
+
* points from.
|
|
45
|
+
* @returns An array of Point3 objects.
|
|
46
|
+
*/
|
|
47
|
+
getPointsInContour(contourIndex: number): Point3[];
|
|
48
|
+
/**
|
|
49
|
+
* "This function returns the number of points in a contour."
|
|
50
|
+
*
|
|
51
|
+
* @param contourIndex - The index of the contour you want to get the
|
|
52
|
+
* number of points from.
|
|
53
|
+
* @returns The number of points in the contour.
|
|
54
|
+
*/
|
|
55
|
+
getNumberOfPointsInAContour(contourIndex: number): number;
|
|
56
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IImageVolume, VolumeScalarData } from '../types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Cornerstone ImageVolume interface. Todo: we should define new IVolume class
|
|
5
|
+
* with appropriate typings for the other types of volume that don't have images (nrrd, nifti)
|
|
6
|
+
*/
|
|
7
|
+
interface IDynamicImageVolume extends IImageVolume {
|
|
8
|
+
/** Returns the active time point index */
|
|
9
|
+
get timePointIndex(): number;
|
|
10
|
+
/** Set the active time point index which also updates the active scalar data */
|
|
11
|
+
set timePointIndex(newTimePointIndex: number);
|
|
12
|
+
/** Returns the number of time points */
|
|
13
|
+
get numTimePoints(): number;
|
|
14
|
+
/** return scalar data arrays (one per timepoint) */
|
|
15
|
+
getScalarDataArrays(): VolumeScalarData[];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export default IDynamicImageVolume;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { IRenderingEngine } from '../types';
|
|
2
|
+
import type IStackViewport from './IStackViewport';
|
|
3
|
+
import type IVolumeViewport from './IVolumeViewport';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Cornerstone Enabled Element interface
|
|
7
|
+
*/
|
|
8
|
+
interface IEnabledElement {
|
|
9
|
+
/** Cornerstone Viewport instance - can be Stack or Volume Viewport as of now */
|
|
10
|
+
viewport: IStackViewport | IVolumeViewport;
|
|
11
|
+
/** Cornerstone Rendering Engine instance */
|
|
12
|
+
renderingEngine: IRenderingEngine;
|
|
13
|
+
/** Unique ID of the viewport in the renderingEngine */
|
|
14
|
+
viewportId: string;
|
|
15
|
+
/** Unique ID of the renderingEngine */
|
|
16
|
+
renderingEngineId: string;
|
|
17
|
+
/** FrameOfReference the enabledElement is rendering inside */
|
|
18
|
+
FrameOfReferenceUID: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default IEnabledElement;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ContourSet } from '../cache/classes/ContourSet';
|
|
2
|
+
import { GeometryType } from '../enums';
|
|
3
|
+
|
|
4
|
+
// interface IGeometry can be array of IContourSet
|
|
5
|
+
interface IGeometry {
|
|
6
|
+
id: string;
|
|
7
|
+
type: GeometryType;
|
|
8
|
+
data: ContourSet; // | Array<IClosedSurface> , etc
|
|
9
|
+
sizeInBytes: number;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default IGeometry;
|