@cornerstonejs/core 2.0.0-beta.7 → 2.0.0
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/BaseVolumeViewport.d.ts +86 -0
- package/dist/esm/RenderingEngine/BaseVolumeViewport.js +129 -98
- package/dist/esm/RenderingEngine/CanvasActor/CanvasMapper.d.ts +6 -0
- package/dist/esm/RenderingEngine/CanvasActor/CanvasMapper.js +0 -1
- package/dist/esm/RenderingEngine/CanvasActor/CanvasProperties.d.ts +15 -0
- package/dist/esm/RenderingEngine/CanvasActor/CanvasProperties.js +0 -1
- package/dist/esm/RenderingEngine/CanvasActor/index.d.ts +22 -0
- package/dist/esm/RenderingEngine/CanvasActor/index.js +2 -2
- package/dist/esm/RenderingEngine/RenderingEngine.d.ts +57 -0
- package/dist/esm/RenderingEngine/RenderingEngine.js +29 -29
- package/dist/esm/RenderingEngine/StackViewport.d.ts +222 -0
- package/dist/esm/RenderingEngine/StackViewport.js +252 -168
- package/dist/esm/RenderingEngine/VideoViewport.d.ts +122 -0
- package/dist/esm/RenderingEngine/VideoViewport.js +105 -44
- package/dist/esm/RenderingEngine/Viewport.d.ts +136 -0
- package/dist/esm/RenderingEngine/Viewport.js +55 -31
- package/dist/esm/RenderingEngine/VolumeViewport.d.ts +50 -0
- package/dist/esm/RenderingEngine/VolumeViewport.js +141 -20
- package/dist/esm/RenderingEngine/VolumeViewport3D.d.ts +24 -0
- package/dist/esm/RenderingEngine/VolumeViewport3D.js +71 -7
- package/dist/esm/RenderingEngine/WSIViewport.d.ts +65 -0
- package/dist/esm/RenderingEngine/WSIViewport.js +458 -0
- package/dist/esm/RenderingEngine/getRenderingEngine.d.ts +4 -0
- package/dist/esm/RenderingEngine/getRenderingEngine.js +0 -1
- package/dist/esm/RenderingEngine/helpers/addImageSlicesToViewports.d.ts +3 -0
- package/dist/esm/RenderingEngine/helpers/addImageSlicesToViewports.js +3 -4
- package/dist/esm/RenderingEngine/helpers/addVolumesToViewports.d.ts +3 -0
- package/dist/esm/RenderingEngine/helpers/addVolumesToViewports.js +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/colors/colormap.d.ts +3 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/colors/colormap.js +1 -2
- package/dist/esm/RenderingEngine/helpers/cpuFallback/colors/index.d.ts +3 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/colors/index.js +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/colors/lookupTable.d.ts +33 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/colors/lookupTable.js +15 -6
- package/dist/esm/RenderingEngine/helpers/cpuFallback/drawImageSync.d.ts +2 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/drawImageSync.js +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/calculateTransform.d.ts +2 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/calculateTransform.js +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/canvasToPixel.d.ts +2 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/canvasToPixel.js +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/computeAutoVoi.d.ts +2 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/computeAutoVoi.js +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/correctShift.d.ts +7 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/correctShift.js +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/createViewport.d.ts +2 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/createViewport.js +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/doesImageNeedToBeRendered.d.ts +2 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/doesImageNeedToBeRendered.js +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/fitToWindow.d.ts +2 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/fitToWindow.js +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/generateColorLUT.d.ts +2 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/generateColorLUT.js +1 -2
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/generateLut.d.ts +2 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/generateLut.js +2 -3
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/getDefaultViewport.d.ts +2 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/getDefaultViewport.js +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/getImageFitScale.d.ts +6 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/getImageFitScale.js +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/getImageSize.d.ts +5 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/getImageSize.js +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/getLut.d.ts +2 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/getLut.js +1 -2
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/getModalityLut.d.ts +1 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/getModalityLut.js +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/getTransform.d.ts +2 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/getTransform.js +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/getVOILut.d.ts +1 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/getVOILut.js +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/initializeRenderCanvas.d.ts +2 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/initializeRenderCanvas.js +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/lutMatches.d.ts +2 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/lutMatches.js +1 -2
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/now.d.ts +1 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/now.js +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/pixelToCanvas.d.ts +2 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/pixelToCanvas.js +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/renderColorImage.d.ts +2 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/renderColorImage.js +3 -5
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/renderGrayscaleImage.d.ts +2 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/renderGrayscaleImage.js +2 -4
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/renderPseudoColorImage.d.ts +2 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/renderPseudoColorImage.js +3 -4
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/resetCamera.d.ts +2 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/resetCamera.js +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/resize.d.ts +2 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/resize.js +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/saveLastRendered.d.ts +2 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/saveLastRendered.js +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/setDefaultViewport.d.ts +6 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/setDefaultViewport.js +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/setToPixelCoordinateSystem.d.ts +2 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/setToPixelCoordinateSystem.js +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/storedColorPixelDataToCanvasImageData.d.ts +2 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/storedColorPixelDataToCanvasImageData.js +1 -2
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageData.d.ts +2 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageData.js +1 -2
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageDataColorLUT.d.ts +3 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageDataColorLUT.js +1 -2
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageDataPET.d.ts +2 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageDataPET.js +1 -2
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageDataPseudocolorLUT.d.ts +3 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageDataPseudocolorLUT.js +1 -2
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageDataPseudocolorLUTPET.d.ts +3 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageDataPseudocolorLUTPET.js +1 -2
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageDataRGBA.d.ts +2 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageDataRGBA.js +1 -2
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/storedRGBAPixelDataToCanvasImageData.d.ts +2 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/storedRGBAPixelDataToCanvasImageData.js +1 -2
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/transform.d.ts +14 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/transform.js +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/validator.d.ts +2 -0
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/validator.js +0 -1
- package/dist/esm/RenderingEngine/helpers/createVolumeActor.d.ts +12 -0
- package/dist/esm/RenderingEngine/helpers/createVolumeActor.js +6 -8
- package/dist/esm/RenderingEngine/helpers/createVolumeMapper.d.ts +4 -0
- package/dist/esm/RenderingEngine/helpers/createVolumeMapper.js +0 -1
- package/dist/esm/RenderingEngine/helpers/getOrCreateCanvas.d.ts +3 -0
- package/dist/esm/RenderingEngine/helpers/getOrCreateCanvas.js +5 -5
- package/dist/esm/RenderingEngine/helpers/index.d.ts +8 -0
- package/dist/esm/RenderingEngine/helpers/index.js +0 -1
- package/dist/esm/RenderingEngine/helpers/isRgbaSourceRgbDest.d.ts +2 -0
- package/dist/esm/RenderingEngine/helpers/isRgbaSourceRgbDest.js +0 -1
- package/dist/esm/RenderingEngine/helpers/setDefaultVolumeVOI.d.ts +3 -0
- package/dist/esm/RenderingEngine/helpers/setDefaultVolumeVOI.js +23 -49
- package/dist/esm/RenderingEngine/helpers/setVolumesForViewports.d.ts +3 -0
- package/dist/esm/RenderingEngine/helpers/setVolumesForViewports.js +0 -1
- package/dist/esm/RenderingEngine/helpers/viewportTypeToViewportClass.d.ts +8 -0
- package/dist/esm/RenderingEngine/helpers/viewportTypeToViewportClass.js +2 -1
- package/dist/esm/RenderingEngine/helpers/viewportTypeUsesCustomRenderingPipeline.d.ts +1 -0
- package/dist/esm/RenderingEngine/helpers/viewportTypeUsesCustomRenderingPipeline.js +0 -1
- package/dist/esm/RenderingEngine/helpers/volumeNewImageEventDispatcher.d.ts +4 -0
- package/dist/esm/RenderingEngine/helpers/volumeNewImageEventDispatcher.js +4 -5
- package/dist/esm/RenderingEngine/index.d.ts +8 -0
- package/dist/esm/RenderingEngine/index.js +0 -1
- package/dist/esm/RenderingEngine/renderingEngineCache.d.ts +8 -0
- package/dist/esm/RenderingEngine/renderingEngineCache.js +0 -1
- package/dist/esm/RenderingEngine/vtkClasses/index.d.ts +5 -0
- package/dist/esm/RenderingEngine/vtkClasses/index.js +0 -1
- package/dist/esm/RenderingEngine/vtkClasses/vtkOffscreenMultiRenderWindow.d.ts +7 -0
- package/dist/esm/RenderingEngine/vtkClasses/vtkOffscreenMultiRenderWindow.js +0 -1
- package/dist/esm/RenderingEngine/vtkClasses/vtkSharedVolumeMapper.d.ts +7 -0
- package/dist/esm/RenderingEngine/vtkClasses/vtkSharedVolumeMapper.js +0 -1
- package/dist/esm/RenderingEngine/vtkClasses/vtkSlabCamera.d.ts +142 -0
- package/dist/esm/RenderingEngine/vtkClasses/vtkSlabCamera.js +0 -1
- package/dist/esm/RenderingEngine/vtkClasses/vtkStreamingOpenGLRenderWindow.d.ts +7 -0
- package/dist/esm/RenderingEngine/vtkClasses/vtkStreamingOpenGLRenderWindow.js +0 -1
- package/dist/esm/RenderingEngine/vtkClasses/vtkStreamingOpenGLTexture.d.ts +7 -0
- package/dist/esm/RenderingEngine/vtkClasses/vtkStreamingOpenGLTexture.js +94 -79
- package/dist/esm/RenderingEngine/vtkClasses/vtkStreamingOpenGLViewNodeFactory.d.ts +8 -0
- package/dist/esm/RenderingEngine/vtkClasses/vtkStreamingOpenGLViewNodeFactory.js +1 -2
- package/dist/esm/RenderingEngine/vtkClasses/vtkStreamingOpenGLVolumeMapper.d.ts +7 -0
- package/dist/esm/RenderingEngine/vtkClasses/vtkStreamingOpenGLVolumeMapper.js +87 -46
- package/dist/esm/Settings.d.ts +15 -0
- package/dist/esm/Settings.js +0 -1
- package/dist/esm/cache/cache.d.ts +56 -0
- package/dist/esm/cache/cache.js +344 -146
- package/dist/esm/cache/classes/BaseStreamingImageVolume.d.ts +85 -0
- package/dist/esm/cache/classes/BaseStreamingImageVolume.js +343 -0
- package/dist/esm/cache/classes/Contour.d.ts +28 -0
- package/dist/esm/cache/classes/Contour.js +28 -16
- package/dist/esm/cache/classes/ContourSet.d.ts +34 -0
- package/dist/esm/cache/classes/ContourSet.js +45 -44
- package/dist/esm/cache/classes/ImageVolume.d.ts +61 -0
- package/dist/esm/cache/classes/ImageVolume.js +49 -264
- package/dist/esm/cache/classes/StreamingDynamicImageVolume.d.ts +56 -0
- package/dist/esm/cache/classes/StreamingDynamicImageVolume.js +105 -0
- package/dist/esm/cache/classes/StreamingImageVolume.d.ts +8 -0
- package/dist/esm/cache/classes/StreamingImageVolume.js +21 -0
- package/dist/esm/cache/classes/Surface.d.ts +26 -0
- package/dist/esm/cache/classes/Surface.js +45 -20
- package/dist/esm/cache/index.d.ts +6 -0
- package/dist/esm/cache/index.js +4 -4
- package/dist/esm/constants/backgroundColors.d.ts +4 -0
- package/dist/esm/constants/backgroundColors.js +0 -1
- package/dist/esm/constants/cpuColormaps.d.ts +3 -0
- package/dist/esm/constants/cpuColormaps.js +0 -1
- package/dist/esm/constants/epsilon.d.ts +2 -0
- package/dist/esm/constants/epsilon.js +0 -1
- package/dist/esm/constants/index.d.ts +7 -0
- package/dist/esm/constants/index.js +0 -1
- package/dist/esm/constants/microscopyViewportCss.d.ts +2 -0
- package/dist/esm/constants/microscopyViewportCss.js +368 -0
- package/dist/esm/constants/mprCameraValues.d.ts +2 -0
- package/dist/esm/constants/mprCameraValues.js +3 -1
- package/dist/esm/constants/rendering.d.ts +5 -0
- package/dist/esm/constants/rendering.js +0 -1
- package/dist/esm/constants/viewportPresets.d.ts +3 -0
- package/dist/esm/constants/viewportPresets.js +0 -1
- package/dist/esm/enums/BlendModes.d.ts +7 -0
- package/dist/esm/enums/BlendModes.js +4 -5
- package/dist/esm/enums/CalibrationTypes.d.ts +10 -0
- package/dist/esm/enums/CalibrationTypes.js +0 -1
- package/dist/esm/enums/ContourType.d.ts +5 -0
- package/dist/esm/enums/ContourType.js +0 -1
- package/dist/esm/enums/DynamicOperatorType.d.ts +6 -0
- package/dist/esm/enums/DynamicOperatorType.js +0 -1
- package/dist/esm/enums/Events.d.ts +44 -0
- package/dist/esm/enums/Events.js +8 -3
- package/dist/esm/enums/GenerateImageType.d.ts +5 -0
- package/dist/esm/enums/GenerateImageType.js +6 -0
- package/dist/esm/enums/GeometryType.d.ts +5 -0
- package/dist/esm/enums/GeometryType.js +2 -3
- package/dist/esm/enums/ImageQualityStatus.d.ts +8 -0
- package/dist/esm/enums/ImageQualityStatus.js +0 -1
- package/dist/esm/enums/InterpolationType.d.ts +6 -0
- package/dist/esm/enums/InterpolationType.js +0 -1
- package/dist/esm/enums/MetadataModules.d.ts +24 -0
- package/dist/esm/enums/MetadataModules.js +1 -1
- package/dist/esm/enums/OrientationAxis.d.ts +7 -0
- package/dist/esm/enums/OrientationAxis.js +0 -1
- package/dist/esm/enums/RequestType.d.ts +7 -0
- package/dist/esm/enums/RequestType.js +0 -1
- package/dist/esm/enums/VOILUTFunctionType.d.ts +5 -0
- package/dist/esm/enums/VOILUTFunctionType.js +0 -1
- package/dist/esm/enums/VideoEnums.d.ts +5 -0
- package/dist/esm/enums/VideoEnums.js +0 -1
- package/dist/esm/enums/ViewportStatus.d.ts +8 -0
- package/dist/esm/enums/ViewportStatus.js +0 -1
- package/dist/esm/enums/ViewportType.d.ts +9 -0
- package/dist/esm/enums/ViewportType.js +1 -1
- package/dist/esm/enums/index.d.ts +17 -0
- package/dist/esm/enums/index.js +2 -3
- package/dist/esm/eventTarget.d.ts +14 -0
- package/dist/esm/eventTarget.js +2 -4
- package/dist/esm/getEnabledElement.d.ts +5 -0
- package/dist/esm/getEnabledElement.js +0 -1
- package/dist/esm/global.d.ts +6 -0
- package/dist/esm/global.js +0 -1
- package/dist/esm/index.d.ts +38 -0
- package/dist/esm/index.js +10 -5
- package/dist/esm/init.d.ts +14 -0
- package/dist/esm/init.js +29 -92
- package/dist/esm/loaders/ProgressiveRetrieveImages.d.ts +37 -0
- package/dist/esm/loaders/ProgressiveRetrieveImages.js +12 -11
- package/dist/esm/loaders/configuration/interleavedRetrieve.d.ts +3 -0
- package/dist/esm/loaders/configuration/interleavedRetrieve.js +0 -1
- package/dist/esm/loaders/configuration/sequentialRetrieve.d.ts +3 -0
- package/dist/esm/loaders/configuration/sequentialRetrieve.js +0 -1
- package/dist/esm/loaders/configuration/singleRetrieve.d.ts +3 -0
- package/dist/esm/loaders/configuration/singleRetrieve.js +0 -4
- package/dist/esm/loaders/cornerstoneStreamingDynamicImageVolumeLoader.d.ts +10 -0
- package/dist/esm/loaders/cornerstoneStreamingDynamicImageVolumeLoader.js +59 -0
- package/dist/esm/loaders/cornerstoneStreamingImageVolumeLoader.d.ts +12 -0
- package/dist/esm/loaders/cornerstoneStreamingImageVolumeLoader.js +73 -0
- package/dist/esm/loaders/fillNearbyFrames.d.ts +2 -0
- package/dist/esm/loaders/fillNearbyFrames.js +7 -17
- package/dist/esm/loaders/geometryLoader.d.ts +15 -0
- package/dist/esm/loaders/geometryLoader.js +66 -9
- package/dist/esm/loaders/imageLoader.d.ts +44 -0
- package/dist/esm/loaders/imageLoader.js +205 -107
- package/dist/esm/loaders/index.d.ts +6 -0
- package/dist/esm/loaders/index.js +7 -0
- package/dist/esm/loaders/utils/contourSet/createContourSet.d.ts +2 -0
- package/dist/esm/loaders/utils/contourSet/createContourSet.js +1 -2
- package/dist/esm/loaders/utils/contourSet/validateContourSet.d.ts +2 -0
- package/dist/esm/loaders/utils/contourSet/validateContourSet.js +0 -1
- package/dist/esm/loaders/utils/surface/createSurface.d.ts +2 -0
- package/dist/esm/loaders/utils/surface/createSurface.js +9 -11
- package/dist/esm/loaders/utils/surface/validateSurface.d.ts +2 -0
- package/dist/esm/loaders/utils/surface/validateSurface.js +12 -5
- package/dist/esm/loaders/volumeLoader.d.ts +40 -0
- package/dist/esm/loaders/volumeLoader.js +112 -196
- package/dist/esm/metaData.d.ts +5 -0
- package/dist/esm/metaData.js +0 -1
- package/dist/esm/requestPool/imageLoadPoolManager.d.ts +3 -0
- package/dist/esm/requestPool/imageLoadPoolManager.js +0 -1
- package/dist/esm/requestPool/imageRetrievalPoolManager.d.ts +3 -0
- package/dist/esm/requestPool/imageRetrievalPoolManager.js +0 -1
- package/dist/esm/requestPool/requestPoolManager.d.ts +42 -0
- package/dist/esm/requestPool/requestPoolManager.js +17 -18
- package/dist/esm/types/AABB2.d.ts +7 -0
- package/dist/esm/types/AABB2.js +0 -2
- package/dist/esm/types/AABB3.d.ts +9 -0
- package/dist/esm/types/AABB3.js +0 -2
- package/dist/esm/types/ActorSliceRange.d.ts +11 -0
- package/dist/esm/types/ActorSliceRange.js +0 -2
- package/dist/esm/types/AffineMatrix.d.ts +27 -0
- package/dist/esm/types/AffineMatrix.js +0 -2
- package/dist/esm/types/BoundsIJK.d.ts +3 -0
- package/dist/esm/types/BoundsIJK.js +0 -2
- package/dist/esm/types/BoundsLPS.d.ts +3 -0
- package/dist/esm/types/BoundsLPS.js +0 -2
- package/dist/esm/types/CPUFallbackColormap.d.ts +20 -0
- package/dist/esm/types/CPUFallbackColormap.js +0 -2
- package/dist/esm/types/CPUFallbackColormapData.d.ts +10 -0
- package/dist/esm/types/CPUFallbackColormapData.js +0 -2
- package/dist/esm/types/CPUFallbackColormapsData.d.ts +3 -0
- package/dist/esm/types/CPUFallbackColormapsData.js +0 -2
- package/dist/esm/types/CPUFallbackEnabledElement.d.ts +2 -0
- package/dist/esm/types/CPUFallbackEnabledElement.js +0 -2
- package/dist/esm/types/CPUFallbackLUT.d.ts +5 -0
- package/dist/esm/types/CPUFallbackLUT.js +0 -2
- package/dist/esm/types/CPUFallbackLookupTable.d.ts +15 -0
- package/dist/esm/types/CPUFallbackLookupTable.js +0 -2
- package/dist/esm/types/CPUFallbackRenderingTools.d.ts +23 -0
- package/dist/esm/types/CPUFallbackRenderingTools.js +0 -2
- package/dist/esm/types/CPUFallbackTransform.d.ts +14 -0
- package/dist/esm/types/CPUFallbackTransform.js +0 -2
- package/dist/esm/types/CPUFallbackViewport.d.ts +27 -0
- package/dist/esm/types/CPUFallbackViewport.js +0 -2
- package/dist/esm/types/CPUFallbackViewportDisplayedArea.d.ts +14 -0
- package/dist/esm/types/CPUFallbackViewportDisplayedArea.js +0 -2
- package/dist/esm/types/CPUIImageData.d.ts +46 -0
- package/dist/esm/types/CPUIImageData.js +0 -2
- package/dist/esm/types/Color.d.ts +2 -0
- package/dist/esm/types/Color.js +0 -2
- package/dist/esm/types/Colormap.d.ts +15 -0
- package/dist/esm/types/Colormap.js +0 -2
- package/dist/esm/types/ContourData.d.ts +17 -0
- package/dist/esm/types/ContourData.js +0 -2
- package/dist/esm/types/Cornerstone3DConfig.d.ts +13 -0
- package/dist/esm/types/Cornerstone3DConfig.js +0 -2
- package/dist/esm/types/CustomEventType.d.ts +5 -0
- package/dist/esm/types/CustomEventType.js +0 -2
- package/dist/esm/types/EventTypes.d.ts +187 -0
- package/dist/esm/types/EventTypes.js +0 -2
- package/dist/esm/types/FlipDirection.d.ts +5 -0
- package/dist/esm/types/FlipDirection.js +0 -2
- package/dist/esm/types/GeometryLoaderFn.d.ts +7 -0
- package/dist/esm/types/GeometryLoaderFn.js +0 -0
- package/dist/esm/types/IActor.d.ts +16 -0
- package/dist/esm/types/IActor.js +0 -2
- package/dist/esm/types/IBaseVolumeViewport.d.ts +2 -0
- package/dist/esm/types/IBaseVolumeViewport.js +0 -0
- package/dist/esm/types/ICache.d.ts +12 -0
- package/dist/esm/types/ICache.js +0 -2
- package/dist/esm/types/ICachedGeometry.d.ts +11 -0
- package/dist/esm/types/ICachedGeometry.js +0 -2
- package/dist/esm/types/ICachedImage.d.ts +12 -0
- package/dist/esm/types/ICachedImage.js +0 -2
- package/dist/esm/types/ICachedVolume.d.ts +11 -0
- package/dist/esm/types/ICachedVolume.js +0 -2
- package/dist/esm/types/ICamera.d.ts +17 -0
- package/dist/esm/types/ICamera.js +0 -2
- package/dist/esm/types/IContour.d.ts +2 -0
- package/dist/esm/types/IContour.js +0 -2
- package/dist/esm/types/IContourSet.d.ts +2 -0
- package/dist/esm/types/IContourSet.js +0 -2
- package/dist/esm/types/IDynamicImageVolume.d.ts +8 -0
- package/dist/esm/types/IDynamicImageVolume.js +0 -2
- package/dist/esm/types/IEnabledElement.d.ts +11 -0
- package/dist/esm/types/IEnabledElement.js +0 -2
- package/dist/esm/types/IGeometry.d.ts +10 -0
- package/dist/esm/types/IGeometry.js +0 -2
- package/dist/esm/types/IImage.d.ts +123 -0
- package/dist/esm/types/IImage.js +0 -2
- package/dist/esm/types/IImageCalibration.d.ts +11 -0
- package/dist/esm/types/IImageCalibration.js +0 -2
- package/dist/esm/types/IImageData.d.ts +35 -0
- package/dist/esm/types/IImageData.js +0 -2
- package/dist/esm/types/IImageFrame.d.ts +42 -0
- package/dist/esm/types/IImageFrame.js +0 -0
- package/dist/esm/types/IImageVolume.d.ts +3 -0
- package/dist/esm/types/IImageVolume.js +0 -2
- package/dist/esm/types/ILoadObject.d.ts +18 -0
- package/dist/esm/types/ILoadObject.js +0 -2
- package/dist/esm/types/IPointsManager.d.ts +7 -0
- package/dist/esm/types/IPointsManager.js +0 -0
- package/dist/esm/types/IRLEVoxelMap.d.ts +7 -0
- package/dist/esm/types/IRLEVoxelMap.js +0 -0
- package/dist/esm/types/IRegisterImageLoader.d.ts +5 -0
- package/dist/esm/types/IRegisterImageLoader.js +0 -2
- package/dist/esm/types/IRenderingEngine.d.ts +3 -0
- package/dist/esm/types/IRenderingEngine.js +0 -2
- package/dist/esm/types/IRetrieveConfiguration.d.ts +38 -0
- package/dist/esm/types/IRetrieveConfiguration.js +0 -2
- package/dist/esm/types/IStackInput.d.ts +13 -0
- package/dist/esm/types/IStackInput.js +0 -2
- package/dist/esm/types/IStackViewport.d.ts +2 -0
- package/dist/esm/types/IStackViewport.js +0 -2
- package/dist/esm/types/IStreamingImageVolume.d.ts +6 -0
- package/dist/esm/types/IStreamingImageVolume.js +0 -2
- package/dist/esm/types/IStreamingVolumeProperties.d.ts +12 -0
- package/dist/esm/types/IStreamingVolumeProperties.js +0 -2
- package/dist/esm/types/ISurface.d.ts +2 -0
- package/dist/esm/types/ISurface.js +0 -2
- package/dist/esm/types/ITransferFunctionNode.d.ts +9 -0
- package/dist/esm/types/ITransferFunctionNode.js +0 -0
- package/dist/esm/types/IVideoViewport.d.ts +2 -0
- package/dist/esm/types/IVideoViewport.js +0 -2
- package/dist/esm/types/IViewport.d.ts +85 -0
- package/dist/esm/types/IViewport.js +0 -2
- package/dist/esm/types/IViewportId.d.ts +4 -0
- package/dist/esm/types/IViewportId.js +0 -2
- package/dist/esm/types/IVolume.d.ts +3 -0
- package/dist/esm/types/IVolume.js +0 -2
- package/dist/esm/types/IVolumeInput.d.ts +16 -0
- package/dist/esm/types/IVolumeInput.js +0 -2
- package/dist/esm/types/IVolumeViewport.d.ts +3 -0
- package/dist/esm/types/IVolumeViewport.js +0 -2
- package/dist/esm/types/IVoxelManager.d.ts +2 -0
- package/dist/esm/types/IVoxelManager.js +0 -0
- package/dist/esm/types/IWSIViewport.d.ts +3 -0
- package/dist/esm/types/IWSIViewport.js +0 -0
- package/dist/esm/types/ImageLoadListener.d.ts +5 -0
- package/dist/esm/types/ImageLoadListener.js +0 -2
- package/dist/esm/types/ImageLoadRequests.d.ts +24 -0
- package/dist/esm/types/ImageLoadRequests.js +0 -0
- package/dist/esm/types/ImageLoaderFn.d.ts +6 -0
- package/dist/esm/types/ImageLoaderFn.js +0 -2
- package/dist/esm/types/ImagePixelModule.d.ts +13 -0
- package/dist/esm/types/ImagePixelModule.js +0 -2
- package/dist/esm/types/ImagePlaneModule.d.ts +16 -0
- package/dist/esm/types/ImagePlaneModule.js +0 -2
- package/dist/esm/types/ImageSliceData.d.ts +5 -0
- package/dist/esm/types/ImageSliceData.js +0 -2
- package/dist/esm/types/ImageVolumeProps.d.ts +6 -0
- package/dist/esm/types/ImageVolumeProps.js +0 -2
- package/dist/esm/types/JumpToSliceOptions.d.ts +6 -0
- package/dist/esm/types/JumpToSliceOptions.js +0 -0
- package/dist/esm/types/Mat3.d.ts +2 -0
- package/dist/esm/types/Mat3.js +0 -2
- package/dist/esm/types/Metadata.d.ts +19 -0
- package/dist/esm/types/Metadata.js +0 -2
- package/dist/esm/types/MetadataModuleTypes.d.ts +66 -0
- package/dist/esm/types/MetadataModuleTypes.js +0 -0
- package/dist/esm/types/OrientationVectors.d.ts +6 -0
- package/dist/esm/types/OrientationVectors.js +0 -2
- package/dist/esm/types/PixelDataTypedArray.d.ts +2 -0
- package/dist/esm/types/PixelDataTypedArray.js +0 -2
- package/dist/esm/types/Plane.d.ts +2 -0
- package/dist/esm/types/Plane.js +0 -2
- package/dist/esm/types/Point2.d.ts +2 -0
- package/dist/esm/types/Point2.js +0 -2
- package/dist/esm/types/Point3.d.ts +7 -0
- package/dist/esm/types/Point3.js +0 -2
- package/dist/esm/types/Point4.d.ts +2 -0
- package/dist/esm/types/Point4.js +0 -2
- package/dist/esm/types/RGB.d.ts +2 -0
- package/dist/esm/types/RGB.js +0 -2
- package/dist/esm/types/ScalingParameters.d.ts +19 -0
- package/dist/esm/types/ScalingParameters.js +0 -2
- package/dist/esm/types/ScrollOptions.d.ts +8 -0
- package/dist/esm/types/ScrollOptions.js +0 -0
- package/dist/esm/types/StackViewportProperties.d.ts +8 -0
- package/dist/esm/types/StackViewportProperties.js +0 -2
- package/dist/esm/types/SurfaceData.d.ts +11 -0
- package/dist/esm/types/SurfaceData.js +0 -2
- package/dist/esm/types/TransformMatrix2D.d.ts +2 -0
- package/dist/esm/types/TransformMatrix2D.js +0 -2
- package/dist/esm/types/VideoViewportProperties.d.ts +10 -0
- package/dist/esm/types/VideoViewportProperties.js +0 -2
- package/dist/esm/types/VideoViewportTypes.d.ts +18 -0
- package/dist/esm/types/VideoViewportTypes.js +0 -2
- package/dist/esm/types/ViewportInputOptions.d.ts +12 -0
- package/dist/esm/types/ViewportInputOptions.js +0 -2
- package/dist/esm/types/ViewportPreset.d.ts +13 -0
- package/dist/esm/types/ViewportPreset.js +0 -2
- package/dist/esm/types/ViewportProperties.d.ts +11 -0
- package/dist/esm/types/ViewportProperties.js +0 -2
- package/dist/esm/types/VolumeLoaderFn.d.ts +7 -0
- package/dist/esm/types/VolumeLoaderFn.js +0 -2
- package/dist/esm/types/VolumeProps.d.ts +32 -0
- package/dist/esm/types/VolumeProps.js +0 -2
- package/dist/esm/types/VolumeViewportProperties.d.ts +8 -0
- package/dist/esm/types/VolumeViewportProperties.js +0 -2
- package/dist/esm/types/WSIViewportProperties.d.ts +3 -0
- package/dist/esm/types/WSIViewportProperties.js +0 -0
- package/dist/esm/types/displayArea.d.ts +13 -0
- package/dist/esm/types/displayArea.js +0 -2
- package/dist/esm/types/index.d.ts +99 -0
- package/dist/esm/types/index.js +0 -2
- package/dist/esm/types/voi.d.ts +9 -0
- package/dist/esm/types/voi.js +0 -2
- package/dist/esm/utilities/PointsManager.d.ts +31 -0
- package/dist/esm/utilities/PointsManager.js +0 -1
- package/dist/esm/utilities/ProgressiveIterator.d.ts +24 -0
- package/dist/esm/utilities/ProgressiveIterator.js +3 -2
- package/dist/esm/utilities/RLEVoxelMap.d.ts +21 -0
- package/dist/esm/utilities/RLEVoxelMap.js +9 -10
- package/dist/esm/utilities/VoxelManager.d.ts +109 -0
- package/dist/esm/utilities/VoxelManager.js +499 -66
- package/dist/esm/utilities/actorCheck.d.ts +5 -0
- package/dist/esm/utilities/actorCheck.js +0 -1
- package/dist/esm/utilities/applyPreset.d.ts +3 -0
- package/dist/esm/utilities/applyPreset.js +0 -1
- package/dist/esm/utilities/autoLoad.d.ts +2 -0
- package/dist/esm/utilities/autoLoad.js +28 -0
- package/dist/esm/utilities/calculateViewportsSpatialRegistration.d.ts +3 -0
- package/dist/esm/utilities/calculateViewportsSpatialRegistration.js +5 -6
- package/dist/esm/utilities/calibratedPixelSpacingMetadataProvider.d.ts +6 -0
- package/dist/esm/utilities/calibratedPixelSpacingMetadataProvider.js +0 -1
- package/dist/esm/utilities/clamp.d.ts +2 -0
- package/dist/esm/utilities/clamp.js +0 -1
- package/dist/esm/utilities/clip.d.ts +9 -0
- package/dist/esm/utilities/clip.js +8 -0
- package/dist/esm/utilities/color.d.ts +7 -0
- package/dist/esm/utilities/color.js +0 -1
- package/dist/esm/utilities/colormap.d.ts +6 -0
- package/dist/esm/utilities/colormap.js +0 -1
- package/dist/esm/utilities/convertStackToVolumeViewport.d.ts +12 -0
- package/dist/esm/utilities/convertStackToVolumeViewport.js +12 -14
- package/dist/esm/utilities/convertToGrayscale.d.ts +1 -0
- package/dist/esm/utilities/convertToGrayscale.js +0 -1
- package/dist/esm/utilities/convertVolumeToStackViewport.d.ts +9 -0
- package/dist/esm/utilities/convertVolumeToStackViewport.js +7 -35
- package/dist/esm/utilities/createLinearRGBTransferFunction.d.ts +3 -0
- package/dist/esm/utilities/createLinearRGBTransferFunction.js +1 -4
- package/dist/esm/utilities/createSigmoidRGBTransferFunction.d.ts +3 -0
- package/dist/esm/utilities/createSigmoidRGBTransferFunction.js +8 -8
- package/dist/esm/utilities/decimate.d.ts +1 -0
- package/dist/esm/utilities/decimate.js +0 -1
- package/dist/esm/utilities/deepClone.d.ts +1 -0
- package/dist/esm/utilities/deepClone.js +23 -0
- package/dist/esm/utilities/deepEqual.d.ts +1 -0
- package/dist/esm/utilities/deepEqual.js +15 -0
- package/dist/esm/utilities/deepFreeze.d.ts +2 -0
- package/dist/esm/utilities/deepFreeze.js +0 -1
- package/dist/esm/utilities/deepMerge.d.ts +2 -0
- package/dist/esm/utilities/deepMerge.js +0 -1
- package/dist/esm/utilities/eventListener/MultiTargetEventListenerManager.d.ts +7 -0
- package/dist/esm/utilities/eventListener/MultiTargetEventListenerManager.js +0 -1
- package/dist/esm/utilities/eventListener/TargetEventListeners.d.ts +15 -0
- package/dist/esm/utilities/eventListener/TargetEventListeners.js +4 -3
- package/dist/esm/utilities/eventListener/index.js +0 -1
- package/dist/esm/utilities/generateVolumePropsFromImageIds.d.ts +3 -0
- package/dist/esm/utilities/generateVolumePropsFromImageIds.js +34 -82
- package/dist/esm/utilities/genericMetadataProvider.d.ts +13 -0
- package/dist/esm/utilities/genericMetadataProvider.js +7 -2
- package/dist/esm/utilities/getBufferConfiguration.d.ts +9 -0
- package/dist/esm/utilities/getBufferConfiguration.js +17 -29
- package/dist/esm/utilities/getClosestImageId.d.ts +7 -0
- package/dist/esm/utilities/getClosestImageId.js +3 -7
- package/dist/esm/utilities/getClosestStackImageIndexForPoint.d.ts +6 -0
- package/dist/esm/utilities/getClosestStackImageIndexForPoint.js +2 -3
- package/dist/esm/utilities/getCurrentVolumeViewportSlice.d.ts +9 -0
- package/dist/esm/utilities/getCurrentVolumeViewportSlice.js +8 -59
- package/dist/esm/utilities/getDynamicVolumeInfo.d.ts +6 -0
- package/dist/esm/utilities/getDynamicVolumeInfo.js +7 -0
- package/dist/esm/utilities/getImageLegacy.d.ts +3 -0
- package/dist/esm/utilities/getImageLegacy.js +1 -2
- package/dist/esm/utilities/getImageSliceDataForVolumeViewport.d.ts +3 -0
- package/dist/esm/utilities/getImageSliceDataForVolumeViewport.js +2 -2
- package/dist/esm/utilities/getMinMax.d.ts +5 -0
- package/dist/esm/utilities/getMinMax.js +0 -1
- package/dist/esm/utilities/getRandomSampleFromArray.d.ts +1 -0
- package/dist/esm/utilities/getRandomSampleFromArray.js +0 -1
- package/dist/esm/utilities/getRuntimeId.d.ts +1 -0
- package/dist/esm/utilities/getRuntimeId.js +0 -1
- package/dist/esm/utilities/getScalingParameters.d.ts +2 -0
- package/dist/esm/utilities/getScalingParameters.js +4 -5
- package/dist/esm/utilities/getSliceRange.d.ts +2 -0
- package/dist/esm/utilities/getSliceRange.js +0 -1
- package/dist/esm/utilities/getSpacingInNormalDirection.d.ts +6 -0
- package/dist/esm/utilities/getSpacingInNormalDirection.js +0 -1
- package/dist/esm/utilities/getTargetVolumeAndSpacingInNormalDir.d.ts +6 -0
- package/dist/esm/utilities/getTargetVolumeAndSpacingInNormalDir.js +3 -4
- package/dist/esm/utilities/getViewportImageCornersInWorld.d.ts +2 -0
- package/dist/esm/utilities/getViewportImageCornersInWorld.js +0 -1
- package/dist/esm/utilities/getViewportImageIds.d.ts +3 -0
- package/dist/esm/utilities/getViewportImageIds.js +2 -5
- package/dist/esm/utilities/getViewportModality.d.ts +7 -0
- package/dist/esm/utilities/getViewportModality.js +9 -7
- package/dist/esm/utilities/getViewportsWithImageURI.d.ts +4 -0
- package/dist/esm/utilities/getViewportsWithImageURI.js +2 -10
- package/dist/esm/utilities/getViewportsWithVolumeId.d.ts +3 -0
- package/dist/esm/utilities/getViewportsWithVolumeId.js +3 -10
- package/dist/esm/utilities/getViewportsWithVolumeURI.d.ts +3 -0
- package/dist/esm/utilities/getViewportsWithVolumeURI.js +14 -0
- package/dist/esm/utilities/getVoiFromSigmoidRGBTransferFunction.d.ts +2 -0
- package/dist/esm/utilities/getVoiFromSigmoidRGBTransferFunction.js +0 -1
- package/dist/esm/utilities/getVolumeActorCorners.d.ts +2 -0
- package/dist/esm/utilities/getVolumeActorCorners.js +0 -1
- package/dist/esm/utilities/getVolumeId.d.ts +1 -0
- package/dist/esm/utilities/getVolumeId.js +2 -3
- package/dist/esm/utilities/getVolumeSliceRangeInfo.d.ts +7 -0
- package/dist/esm/utilities/getVolumeSliceRangeInfo.js +0 -1
- package/dist/esm/utilities/getVolumeViewportScrollInfo.d.ts +11 -0
- package/dist/esm/utilities/getVolumeViewportScrollInfo.js +0 -1
- package/dist/esm/utilities/getVolumeViewportsContainingSameVolumes.d.ts +3 -0
- package/dist/esm/utilities/getVolumeViewportsContainingSameVolumes.js +0 -1
- package/dist/esm/utilities/hasFloatScalingParameters.d.ts +2 -0
- package/dist/esm/utilities/hasFloatScalingParameters.js +0 -1
- package/dist/esm/utilities/hasNaNValues.d.ts +1 -0
- package/dist/esm/utilities/hasNaNValues.js +0 -1
- package/dist/esm/utilities/imageIdToURI.d.ts +1 -0
- package/dist/esm/utilities/imageIdToURI.js +0 -1
- package/dist/esm/utilities/imageRetrieveMetadataProvider.d.ts +7 -0
- package/dist/esm/utilities/imageRetrieveMetadataProvider.js +0 -1
- package/dist/esm/utilities/imageToWorldCoords.d.ts +2 -0
- package/dist/esm/utilities/imageToWorldCoords.js +2 -3
- package/dist/esm/utilities/index.d.ts +87 -0
- package/dist/esm/utilities/index.js +14 -9
- package/dist/esm/utilities/indexWithinDimensions.d.ts +2 -0
- package/dist/esm/utilities/indexWithinDimensions.js +0 -1
- package/dist/esm/utilities/invertRgbTransferFunction.d.ts +2 -0
- package/dist/esm/utilities/invertRgbTransferFunction.js +0 -1
- package/dist/esm/utilities/isEqual.d.ts +4 -0
- package/dist/esm/utilities/isEqual.js +6 -2
- package/dist/esm/utilities/isOpposite.d.ts +2 -0
- package/dist/esm/utilities/isOpposite.js +0 -1
- package/dist/esm/utilities/isPTPrescaledWithSUV.d.ts +3 -0
- package/dist/esm/utilities/isPTPrescaledWithSUV.js +1 -2
- package/dist/esm/utilities/isValidVolume.d.ts +2 -0
- package/dist/esm/utilities/isValidVolume.js +1 -2
- package/dist/esm/utilities/isVideoTransferSyntax.d.ts +2 -0
- package/dist/esm/utilities/isVideoTransferSyntax.js +0 -1
- package/dist/esm/utilities/jumpToSlice.d.ts +3 -0
- package/dist/esm/utilities/jumpToSlice.js +35 -0
- package/dist/esm/utilities/loadImageToCanvas.d.ts +31 -0
- package/dist/esm/utilities/loadImageToCanvas.js +1 -9
- package/dist/esm/utilities/makeVolumeMetadata.d.ts +2 -0
- package/dist/esm/utilities/makeVolumeMetadata.js +5 -6
- package/dist/esm/utilities/planar.d.ts +7 -0
- package/dist/esm/utilities/planar.js +0 -1
- package/dist/esm/utilities/pointInShapeCallback.d.ts +24 -0
- package/dist/esm/utilities/pointInShapeCallback.js +92 -0
- package/dist/esm/utilities/renderToCanvasCPU.d.ts +3 -0
- package/dist/esm/utilities/renderToCanvasCPU.js +0 -1
- package/dist/esm/utilities/renderToCanvasGPU.d.ts +5 -0
- package/dist/esm/utilities/renderToCanvasGPU.js +1 -2
- package/dist/esm/utilities/roundNumber.d.ts +4 -0
- package/dist/esm/utilities/roundNumber.js +0 -1
- package/dist/esm/utilities/scaleArray.d.ts +2 -0
- package/dist/esm/utilities/scaleArray.js +15 -0
- package/dist/esm/utilities/scaleRgbTransferFunction.d.ts +2 -0
- package/dist/esm/utilities/scaleRgbTransferFunction.js +0 -1
- package/dist/esm/utilities/scroll.d.ts +4 -0
- package/dist/esm/utilities/scroll.js +66 -0
- package/dist/esm/utilities/snapFocalPointToSlice.d.ts +5 -0
- package/dist/esm/utilities/snapFocalPointToSlice.js +0 -1
- package/dist/esm/utilities/sortImageIdsAndGetSpacing.d.ts +9 -0
- package/dist/esm/utilities/sortImageIdsAndGetSpacing.js +2 -2
- package/dist/esm/utilities/spatialRegistrationMetadataProvider.d.ts +6 -0
- package/dist/esm/utilities/spatialRegistrationMetadataProvider.js +0 -1
- package/dist/esm/utilities/splitImageIdsBy4DTags.d.ts +5 -0
- package/dist/esm/utilities/splitImageIdsBy4DTags.js +161 -0
- package/dist/esm/utilities/transferFunctionUtils.d.ts +3 -0
- package/dist/esm/utilities/transferFunctionUtils.js +0 -1
- package/dist/esm/utilities/transformCanvasToIJK.d.ts +2 -0
- package/dist/esm/utilities/transformCanvasToIJK.js +0 -1
- package/dist/esm/utilities/transformIJKToCanvas.d.ts +2 -0
- package/dist/esm/utilities/transformIJKToCanvas.js +0 -1
- package/dist/esm/utilities/transformIndexToWorld.d.ts +2 -0
- package/dist/esm/utilities/transformIndexToWorld.js +0 -1
- package/dist/esm/utilities/transformWorldToIndex.d.ts +2 -0
- package/dist/esm/utilities/transformWorldToIndex.js +0 -1
- package/dist/esm/utilities/triggerEvent.d.ts +1 -0
- package/dist/esm/utilities/triggerEvent.js +1 -2
- package/dist/esm/utilities/updateVTKImageDataWithCornerstoneImage.d.ts +4 -0
- package/dist/esm/utilities/updateVTKImageDataWithCornerstoneImage.js +1 -2
- package/dist/esm/utilities/uuidv4.d.ts +1 -0
- package/dist/esm/utilities/uuidv4.js +5 -2
- package/dist/esm/utilities/windowLevel.d.ts +9 -0
- package/dist/esm/utilities/windowLevel.js +0 -1
- package/dist/esm/utilities/worldToImageCoords.d.ts +3 -0
- package/dist/esm/utilities/worldToImageCoords.js +2 -3
- package/dist/esm/webWorkerManager/webWorkerManager.d.ts +28 -0
- package/dist/esm/webWorkerManager/webWorkerManager.js +0 -1
- package/package.json +57 -24
- package/dist/esm/RenderingEngine/BaseVolumeViewport.js.map +0 -1
- package/dist/esm/RenderingEngine/CanvasActor/CanvasMapper.js.map +0 -1
- package/dist/esm/RenderingEngine/CanvasActor/CanvasProperties.js.map +0 -1
- package/dist/esm/RenderingEngine/CanvasActor/index.js.map +0 -1
- package/dist/esm/RenderingEngine/RenderingEngine.js.map +0 -1
- package/dist/esm/RenderingEngine/StackViewport.js.map +0 -1
- package/dist/esm/RenderingEngine/VideoViewport.js.map +0 -1
- package/dist/esm/RenderingEngine/Viewport.js.map +0 -1
- package/dist/esm/RenderingEngine/VolumeViewport.js.map +0 -1
- package/dist/esm/RenderingEngine/VolumeViewport3D.js.map +0 -1
- package/dist/esm/RenderingEngine/getRenderingEngine.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/addImageSlicesToViewports.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/addVolumesToViewports.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/colors/colormap.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/colors/index.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/colors/lookupTable.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/drawImageSync.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/calculateTransform.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/canvasToPixel.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/computeAutoVoi.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/correctShift.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/createViewport.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/doesImageNeedToBeRendered.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/fitToWindow.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/generateColorLUT.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/generateLut.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/getDefaultViewport.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/getImageFitScale.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/getImageSize.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/getLut.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/getModalityLut.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/getTransform.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/getVOILut.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/initializeRenderCanvas.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/lutMatches.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/now.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/pixelToCanvas.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/renderColorImage.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/renderGrayscaleImage.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/renderPseudoColorImage.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/resetCamera.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/resize.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/saveLastRendered.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/setDefaultViewport.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/setToPixelCoordinateSystem.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/storedColorPixelDataToCanvasImageData.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageData.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageDataColorLUT.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageDataPET.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageDataPseudocolorLUT.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageDataPseudocolorLUTPET.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageDataRGBA.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/storedRGBAPixelDataToCanvasImageData.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/transform.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/validator.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/createVolumeActor.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/createVolumeMapper.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/getOrCreateCanvas.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/index.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/isRgbaSourceRgbDest.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/setDefaultVolumeVOI.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/setVolumesForViewports.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/viewportTypeToViewportClass.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/viewportTypeUsesCustomRenderingPipeline.js.map +0 -1
- package/dist/esm/RenderingEngine/helpers/volumeNewImageEventDispatcher.js.map +0 -1
- package/dist/esm/RenderingEngine/index.js.map +0 -1
- package/dist/esm/RenderingEngine/renderingEngineCache.js.map +0 -1
- package/dist/esm/RenderingEngine/vtkClasses/index.js.map +0 -1
- package/dist/esm/RenderingEngine/vtkClasses/vtkOffscreenMultiRenderWindow.js.map +0 -1
- package/dist/esm/RenderingEngine/vtkClasses/vtkSharedVolumeMapper.js.map +0 -1
- package/dist/esm/RenderingEngine/vtkClasses/vtkSlabCamera.js.map +0 -1
- package/dist/esm/RenderingEngine/vtkClasses/vtkStreamingOpenGLRenderWindow.js.map +0 -1
- package/dist/esm/RenderingEngine/vtkClasses/vtkStreamingOpenGLTexture.js.map +0 -1
- package/dist/esm/RenderingEngine/vtkClasses/vtkStreamingOpenGLViewNodeFactory.js.map +0 -1
- package/dist/esm/RenderingEngine/vtkClasses/vtkStreamingOpenGLVolumeMapper.js.map +0 -1
- package/dist/esm/Settings.js.map +0 -1
- package/dist/esm/cache/cache.js.map +0 -1
- package/dist/esm/cache/classes/Contour.js.map +0 -1
- package/dist/esm/cache/classes/ContourSet.js.map +0 -1
- package/dist/esm/cache/classes/ImageVolume.js.map +0 -1
- package/dist/esm/cache/classes/Surface.js.map +0 -1
- package/dist/esm/cache/index.js.map +0 -1
- package/dist/esm/constants/backgroundColors.js.map +0 -1
- package/dist/esm/constants/cpuColormaps.js.map +0 -1
- package/dist/esm/constants/epsilon.js.map +0 -1
- package/dist/esm/constants/index.js.map +0 -1
- package/dist/esm/constants/mprCameraValues.js.map +0 -1
- package/dist/esm/constants/rendering.js.map +0 -1
- package/dist/esm/constants/viewportPresets.js.map +0 -1
- package/dist/esm/enums/BlendModes.js.map +0 -1
- package/dist/esm/enums/CalibrationTypes.js.map +0 -1
- package/dist/esm/enums/ContourType.js.map +0 -1
- package/dist/esm/enums/DynamicOperatorType.js.map +0 -1
- package/dist/esm/enums/Events.js.map +0 -1
- package/dist/esm/enums/GeometryType.js.map +0 -1
- package/dist/esm/enums/ImageQualityStatus.js.map +0 -1
- package/dist/esm/enums/InterpolationType.js.map +0 -1
- package/dist/esm/enums/MetadataModules.js.map +0 -1
- package/dist/esm/enums/OrientationAxis.js.map +0 -1
- package/dist/esm/enums/RequestType.js.map +0 -1
- package/dist/esm/enums/SharedArrayBufferModes.js +0 -8
- package/dist/esm/enums/SharedArrayBufferModes.js.map +0 -1
- package/dist/esm/enums/VOILUTFunctionType.js.map +0 -1
- package/dist/esm/enums/VideoEnums.js.map +0 -1
- package/dist/esm/enums/ViewportStatus.js.map +0 -1
- package/dist/esm/enums/ViewportType.js.map +0 -1
- package/dist/esm/enums/index.js.map +0 -1
- package/dist/esm/eventTarget.js.map +0 -1
- package/dist/esm/getEnabledElement.js.map +0 -1
- package/dist/esm/global.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/init.js.map +0 -1
- package/dist/esm/loaders/ProgressiveRetrieveImages.js.map +0 -1
- package/dist/esm/loaders/configuration/interleavedRetrieve.js.map +0 -1
- package/dist/esm/loaders/configuration/sequentialRetrieve.js.map +0 -1
- package/dist/esm/loaders/configuration/singleRetrieve.js.map +0 -1
- package/dist/esm/loaders/fillNearbyFrames.js.map +0 -1
- package/dist/esm/loaders/geometryLoader.js.map +0 -1
- package/dist/esm/loaders/imageLoader.js.map +0 -1
- package/dist/esm/loaders/utils/contourSet/createContourSet.js.map +0 -1
- package/dist/esm/loaders/utils/contourSet/validateContourSet.js.map +0 -1
- package/dist/esm/loaders/utils/surface/createSurface.js.map +0 -1
- package/dist/esm/loaders/utils/surface/validateSurface.js.map +0 -1
- package/dist/esm/loaders/volumeLoader.js.map +0 -1
- package/dist/esm/metaData.js.map +0 -1
- package/dist/esm/requestPool/imageLoadPoolManager.js.map +0 -1
- package/dist/esm/requestPool/imageRetrievalPoolManager.js.map +0 -1
- package/dist/esm/requestPool/requestPoolManager.js.map +0 -1
- package/dist/esm/types/AABB2.js.map +0 -1
- package/dist/esm/types/AABB3.js.map +0 -1
- package/dist/esm/types/ActorSliceRange.js.map +0 -1
- package/dist/esm/types/AffineMatrix.js.map +0 -1
- package/dist/esm/types/BoundsIJK.js.map +0 -1
- package/dist/esm/types/BoundsLPS.js.map +0 -1
- package/dist/esm/types/CPUFallbackColormap.js.map +0 -1
- package/dist/esm/types/CPUFallbackColormapData.js.map +0 -1
- package/dist/esm/types/CPUFallbackColormapsData.js.map +0 -1
- package/dist/esm/types/CPUFallbackEnabledElement.js.map +0 -1
- package/dist/esm/types/CPUFallbackLUT.js.map +0 -1
- package/dist/esm/types/CPUFallbackLookupTable.js.map +0 -1
- package/dist/esm/types/CPUFallbackRenderingTools.js.map +0 -1
- package/dist/esm/types/CPUFallbackTransform.js.map +0 -1
- package/dist/esm/types/CPUFallbackViewport.js.map +0 -1
- package/dist/esm/types/CPUFallbackViewportDisplayedArea.js.map +0 -1
- package/dist/esm/types/CPUIImageData.js.map +0 -1
- package/dist/esm/types/Color.js.map +0 -1
- package/dist/esm/types/Colormap.js.map +0 -1
- package/dist/esm/types/ContourData.js.map +0 -1
- package/dist/esm/types/Cornerstone3DConfig.js.map +0 -1
- package/dist/esm/types/CustomEventType.js.map +0 -1
- package/dist/esm/types/EventTypes.js.map +0 -1
- package/dist/esm/types/FlipDirection.js.map +0 -1
- package/dist/esm/types/IActor.js.map +0 -1
- package/dist/esm/types/ICache.js.map +0 -1
- package/dist/esm/types/ICachedGeometry.js.map +0 -1
- package/dist/esm/types/ICachedImage.js.map +0 -1
- package/dist/esm/types/ICachedVolume.js.map +0 -1
- package/dist/esm/types/ICamera.js.map +0 -1
- package/dist/esm/types/IContour.js.map +0 -1
- package/dist/esm/types/IContourSet.js.map +0 -1
- package/dist/esm/types/IDynamicImageVolume.js.map +0 -1
- package/dist/esm/types/IEnabledElement.js.map +0 -1
- package/dist/esm/types/IGeometry.js.map +0 -1
- package/dist/esm/types/IImage.js.map +0 -1
- package/dist/esm/types/IImageCalibration.js.map +0 -1
- package/dist/esm/types/IImageData.js.map +0 -1
- package/dist/esm/types/IImageVolume.js.map +0 -1
- package/dist/esm/types/ILoadObject.js.map +0 -1
- package/dist/esm/types/IRegisterImageLoader.js.map +0 -1
- package/dist/esm/types/IRenderingEngine.js.map +0 -1
- package/dist/esm/types/IRetrieveConfiguration.js.map +0 -1
- package/dist/esm/types/IStackInput.js.map +0 -1
- package/dist/esm/types/IStackViewport.js.map +0 -1
- package/dist/esm/types/IStreamingImageVolume.js.map +0 -1
- package/dist/esm/types/IStreamingVolumeProperties.js.map +0 -1
- package/dist/esm/types/ISurface.js.map +0 -1
- package/dist/esm/types/IVideoViewport.js.map +0 -1
- package/dist/esm/types/IViewport.js.map +0 -1
- package/dist/esm/types/IViewportId.js.map +0 -1
- package/dist/esm/types/IVolume.js.map +0 -1
- package/dist/esm/types/IVolumeInput.js.map +0 -1
- package/dist/esm/types/IVolumeViewport.js.map +0 -1
- package/dist/esm/types/ImageLoadListener.js.map +0 -1
- package/dist/esm/types/ImageLoaderFn.js.map +0 -1
- package/dist/esm/types/ImagePixelModule.js.map +0 -1
- package/dist/esm/types/ImagePlaneModule.js.map +0 -1
- package/dist/esm/types/ImageSliceData.js.map +0 -1
- package/dist/esm/types/ImageVolumeProps.js.map +0 -1
- package/dist/esm/types/Mat3.js.map +0 -1
- package/dist/esm/types/Metadata.js.map +0 -1
- package/dist/esm/types/OrientationVectors.js.map +0 -1
- package/dist/esm/types/PixelDataTypedArray.js.map +0 -1
- package/dist/esm/types/Plane.js.map +0 -1
- package/dist/esm/types/Point2.js.map +0 -1
- package/dist/esm/types/Point3.js.map +0 -1
- package/dist/esm/types/Point4.js.map +0 -1
- package/dist/esm/types/RGB.js.map +0 -1
- package/dist/esm/types/ScalingParameters.js.map +0 -1
- package/dist/esm/types/StackViewportProperties.js.map +0 -1
- package/dist/esm/types/SurfaceData.js.map +0 -1
- package/dist/esm/types/TransformMatrix2D.js.map +0 -1
- package/dist/esm/types/VideoViewportProperties.js.map +0 -1
- package/dist/esm/types/VideoViewportTypes.js.map +0 -1
- package/dist/esm/types/ViewportInputOptions.js.map +0 -1
- package/dist/esm/types/ViewportPreset.js.map +0 -1
- package/dist/esm/types/ViewportProperties.js.map +0 -1
- package/dist/esm/types/VolumeLoaderFn.js.map +0 -1
- package/dist/esm/types/VolumeProps.js.map +0 -1
- package/dist/esm/types/VolumeViewportProperties.js.map +0 -1
- package/dist/esm/types/displayArea.js.map +0 -1
- package/dist/esm/types/index.js.map +0 -1
- package/dist/esm/types/voi.js.map +0 -1
- package/dist/esm/utilities/PointsManager.js.map +0 -1
- package/dist/esm/utilities/ProgressiveIterator.js.map +0 -1
- package/dist/esm/utilities/RLEVoxelMap.js.map +0 -1
- package/dist/esm/utilities/VoxelManager.js.map +0 -1
- package/dist/esm/utilities/actorCheck.js.map +0 -1
- package/dist/esm/utilities/applyPreset.js.map +0 -1
- package/dist/esm/utilities/cacheUtils.js +0 -79
- package/dist/esm/utilities/cacheUtils.js.map +0 -1
- package/dist/esm/utilities/calculateViewportsSpatialRegistration.js.map +0 -1
- package/dist/esm/utilities/calibratedPixelSpacingMetadataProvider.js.map +0 -1
- package/dist/esm/utilities/clamp.js.map +0 -1
- package/dist/esm/utilities/color.js.map +0 -1
- package/dist/esm/utilities/colormap.js.map +0 -1
- package/dist/esm/utilities/convertStackToVolumeViewport.js.map +0 -1
- package/dist/esm/utilities/convertToGrayscale.js.map +0 -1
- package/dist/esm/utilities/convertVolumeToStackViewport.js.map +0 -1
- package/dist/esm/utilities/createFloat32SharedArray.js +0 -28
- package/dist/esm/utilities/createFloat32SharedArray.js.map +0 -1
- package/dist/esm/utilities/createInt16SharedArray.js +0 -12
- package/dist/esm/utilities/createInt16SharedArray.js.map +0 -1
- package/dist/esm/utilities/createLinearRGBTransferFunction.js.map +0 -1
- package/dist/esm/utilities/createSigmoidRGBTransferFunction.js.map +0 -1
- package/dist/esm/utilities/createUInt16SharedArray.js +0 -12
- package/dist/esm/utilities/createUInt16SharedArray.js.map +0 -1
- package/dist/esm/utilities/createUint8SharedArray.js +0 -13
- package/dist/esm/utilities/createUint8SharedArray.js.map +0 -1
- package/dist/esm/utilities/decimate.js.map +0 -1
- package/dist/esm/utilities/deepFreeze.js.map +0 -1
- package/dist/esm/utilities/deepMerge.js.map +0 -1
- package/dist/esm/utilities/eventListener/MultiTargetEventListenerManager.js.map +0 -1
- package/dist/esm/utilities/eventListener/TargetEventListeners.js.map +0 -1
- package/dist/esm/utilities/eventListener/index.js.map +0 -1
- package/dist/esm/utilities/generateVolumePropsFromImageIds.js.map +0 -1
- package/dist/esm/utilities/genericMetadataProvider.js.map +0 -1
- package/dist/esm/utilities/getBufferConfiguration.js.map +0 -1
- package/dist/esm/utilities/getClosestImageId.js.map +0 -1
- package/dist/esm/utilities/getClosestStackImageIndexForPoint.js.map +0 -1
- package/dist/esm/utilities/getCurrentVolumeViewportSlice.js.map +0 -1
- package/dist/esm/utilities/getImageLegacy.js.map +0 -1
- package/dist/esm/utilities/getImageSliceDataForVolumeViewport.js.map +0 -1
- package/dist/esm/utilities/getMinMax.js.map +0 -1
- package/dist/esm/utilities/getRandomSampleFromArray.js.map +0 -1
- package/dist/esm/utilities/getRuntimeId.js.map +0 -1
- package/dist/esm/utilities/getScalarDataType.js +0 -20
- package/dist/esm/utilities/getScalarDataType.js.map +0 -1
- package/dist/esm/utilities/getScalingParameters.js.map +0 -1
- package/dist/esm/utilities/getSliceRange.js.map +0 -1
- package/dist/esm/utilities/getSpacingInNormalDirection.js.map +0 -1
- package/dist/esm/utilities/getTargetVolumeAndSpacingInNormalDir.js.map +0 -1
- package/dist/esm/utilities/getViewportImageCornersInWorld.js.map +0 -1
- package/dist/esm/utilities/getViewportImageIds.js.map +0 -1
- package/dist/esm/utilities/getViewportModality.js.map +0 -1
- package/dist/esm/utilities/getViewportsWithImageURI.js.map +0 -1
- package/dist/esm/utilities/getViewportsWithVolumeId.js.map +0 -1
- package/dist/esm/utilities/getVoiFromSigmoidRGBTransferFunction.js.map +0 -1
- package/dist/esm/utilities/getVolumeActorCorners.js.map +0 -1
- package/dist/esm/utilities/getVolumeId.js.map +0 -1
- package/dist/esm/utilities/getVolumeSliceRangeInfo.js.map +0 -1
- package/dist/esm/utilities/getVolumeViewportScrollInfo.js.map +0 -1
- package/dist/esm/utilities/getVolumeViewportsContainingSameVolumes.js.map +0 -1
- package/dist/esm/utilities/hasFloatScalingParameters.js.map +0 -1
- package/dist/esm/utilities/hasNaNValues.js.map +0 -1
- package/dist/esm/utilities/imageIdToURI.js.map +0 -1
- package/dist/esm/utilities/imageRetrieveMetadataProvider.js.map +0 -1
- package/dist/esm/utilities/imageToWorldCoords.js.map +0 -1
- package/dist/esm/utilities/index.js.map +0 -1
- package/dist/esm/utilities/indexWithinDimensions.js.map +0 -1
- package/dist/esm/utilities/invertRgbTransferFunction.js.map +0 -1
- package/dist/esm/utilities/isEqual.js.map +0 -1
- package/dist/esm/utilities/isOpposite.js.map +0 -1
- package/dist/esm/utilities/isPTPrescaledWithSUV.js.map +0 -1
- package/dist/esm/utilities/isTypedArray.js +0 -12
- package/dist/esm/utilities/isTypedArray.js.map +0 -1
- package/dist/esm/utilities/isValidVolume.js.map +0 -1
- package/dist/esm/utilities/isVideoTransferSyntax.js.map +0 -1
- package/dist/esm/utilities/loadImageToCanvas.js.map +0 -1
- package/dist/esm/utilities/makeVolumeMetadata.js.map +0 -1
- package/dist/esm/utilities/planar.js.map +0 -1
- package/dist/esm/utilities/renderToCanvasCPU.js.map +0 -1
- package/dist/esm/utilities/renderToCanvasGPU.js.map +0 -1
- package/dist/esm/utilities/roundNumber.js.map +0 -1
- package/dist/esm/utilities/scaleRgbTransferFunction.js.map +0 -1
- package/dist/esm/utilities/snapFocalPointToSlice.js.map +0 -1
- package/dist/esm/utilities/sortImageIdsAndGetSpacing.js.map +0 -1
- package/dist/esm/utilities/spatialRegistrationMetadataProvider.js.map +0 -1
- package/dist/esm/utilities/transferFunctionUtils.js.map +0 -1
- package/dist/esm/utilities/transformCanvasToIJK.js.map +0 -1
- package/dist/esm/utilities/transformIJKToCanvas.js.map +0 -1
- package/dist/esm/utilities/transformIndexToWorld.js.map +0 -1
- package/dist/esm/utilities/transformWorldToIndex.js.map +0 -1
- package/dist/esm/utilities/triggerEvent.js.map +0 -1
- package/dist/esm/utilities/updateVTKImageDataWithCornerstoneImage.js.map +0 -1
- package/dist/esm/utilities/uuidv4.js.map +0 -1
- package/dist/esm/utilities/windowLevel.js.map +0 -1
- package/dist/esm/utilities/worldToImageCoords.js.map +0 -1
- package/dist/esm/webWorkerManager/webWorkerManager.js.map +0 -1
- package/dist/types/RenderingEngine/BaseVolumeViewport.d.ts +0 -72
- package/dist/types/RenderingEngine/BaseVolumeViewport.d.ts.map +0 -1
- package/dist/types/RenderingEngine/CanvasActor/CanvasMapper.d.ts +0 -7
- package/dist/types/RenderingEngine/CanvasActor/CanvasMapper.d.ts.map +0 -1
- package/dist/types/RenderingEngine/CanvasActor/CanvasProperties.d.ts +0 -16
- package/dist/types/RenderingEngine/CanvasActor/CanvasProperties.d.ts.map +0 -1
- package/dist/types/RenderingEngine/CanvasActor/index.d.ts +0 -24
- package/dist/types/RenderingEngine/CanvasActor/index.d.ts.map +0 -1
- package/dist/types/RenderingEngine/RenderingEngine.d.ts +0 -61
- package/dist/types/RenderingEngine/RenderingEngine.d.ts.map +0 -1
- package/dist/types/RenderingEngine/StackViewport.d.ts +0 -210
- package/dist/types/RenderingEngine/StackViewport.d.ts.map +0 -1
- package/dist/types/RenderingEngine/VideoViewport.d.ts +0 -132
- package/dist/types/RenderingEngine/VideoViewport.d.ts.map +0 -1
- package/dist/types/RenderingEngine/Viewport.d.ts +0 -118
- package/dist/types/RenderingEngine/Viewport.d.ts.map +0 -1
- package/dist/types/RenderingEngine/VolumeViewport.d.ts +0 -37
- package/dist/types/RenderingEngine/VolumeViewport.d.ts.map +0 -1
- package/dist/types/RenderingEngine/VolumeViewport3D.d.ts +0 -16
- package/dist/types/RenderingEngine/VolumeViewport3D.d.ts.map +0 -1
- package/dist/types/RenderingEngine/getRenderingEngine.d.ts +0 -5
- package/dist/types/RenderingEngine/getRenderingEngine.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/addImageSlicesToViewports.d.ts +0 -4
- package/dist/types/RenderingEngine/helpers/addImageSlicesToViewports.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/addVolumesToViewports.d.ts +0 -4
- package/dist/types/RenderingEngine/helpers/addVolumesToViewports.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/colors/colormap.d.ts +0 -4
- package/dist/types/RenderingEngine/helpers/cpuFallback/colors/colormap.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/colors/index.d.ts +0 -4
- package/dist/types/RenderingEngine/helpers/cpuFallback/colors/index.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/colors/lookupTable.d.ts +0 -34
- package/dist/types/RenderingEngine/helpers/cpuFallback/colors/lookupTable.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/drawImageSync.d.ts +0 -3
- package/dist/types/RenderingEngine/helpers/cpuFallback/drawImageSync.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/calculateTransform.d.ts +0 -3
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/calculateTransform.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/canvasToPixel.d.ts +0 -3
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/canvasToPixel.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/computeAutoVoi.d.ts +0 -3
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/computeAutoVoi.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/correctShift.d.ts +0 -8
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/correctShift.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/createViewport.d.ts +0 -3
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/createViewport.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/doesImageNeedToBeRendered.d.ts +0 -3
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/doesImageNeedToBeRendered.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/fitToWindow.d.ts +0 -3
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/fitToWindow.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/generateColorLUT.d.ts +0 -3
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/generateColorLUT.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/generateLut.d.ts +0 -3
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/generateLut.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/getDefaultViewport.d.ts +0 -3
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/getDefaultViewport.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/getImageFitScale.d.ts +0 -7
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/getImageFitScale.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/getImageSize.d.ts +0 -6
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/getImageSize.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/getLut.d.ts +0 -3
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/getLut.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/getModalityLut.d.ts +0 -2
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/getModalityLut.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/getTransform.d.ts +0 -3
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/getTransform.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/getVOILut.d.ts +0 -2
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/getVOILut.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/initializeRenderCanvas.d.ts +0 -3
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/initializeRenderCanvas.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/lutMatches.d.ts +0 -2
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/lutMatches.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/now.d.ts +0 -2
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/now.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/pixelToCanvas.d.ts +0 -3
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/pixelToCanvas.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/renderColorImage.d.ts +0 -3
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/renderColorImage.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/renderGrayscaleImage.d.ts +0 -3
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/renderGrayscaleImage.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/renderPseudoColorImage.d.ts +0 -3
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/renderPseudoColorImage.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/resetCamera.d.ts +0 -3
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/resetCamera.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/resize.d.ts +0 -3
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/resize.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/saveLastRendered.d.ts +0 -3
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/saveLastRendered.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/setDefaultViewport.d.ts +0 -7
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/setDefaultViewport.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/setToPixelCoordinateSystem.d.ts +0 -3
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/setToPixelCoordinateSystem.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/storedColorPixelDataToCanvasImageData.d.ts +0 -3
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/storedColorPixelDataToCanvasImageData.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageData.d.ts +0 -3
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageData.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageDataColorLUT.d.ts +0 -4
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageDataColorLUT.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageDataPET.d.ts +0 -3
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageDataPET.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageDataPseudocolorLUT.d.ts +0 -4
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageDataPseudocolorLUT.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageDataPseudocolorLUTPET.d.ts +0 -4
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageDataPseudocolorLUTPET.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageDataRGBA.d.ts +0 -3
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageDataRGBA.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/storedRGBAPixelDataToCanvasImageData.d.ts +0 -3
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/storedRGBAPixelDataToCanvasImageData.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/transform.d.ts +0 -15
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/transform.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/validator.d.ts +0 -3
- package/dist/types/RenderingEngine/helpers/cpuFallback/rendering/validator.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/createVolumeActor.d.ts +0 -13
- package/dist/types/RenderingEngine/helpers/createVolumeActor.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/createVolumeMapper.d.ts +0 -2
- package/dist/types/RenderingEngine/helpers/createVolumeMapper.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/getOrCreateCanvas.d.ts +0 -4
- package/dist/types/RenderingEngine/helpers/getOrCreateCanvas.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/index.d.ts +0 -9
- package/dist/types/RenderingEngine/helpers/index.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/isRgbaSourceRgbDest.d.ts +0 -3
- package/dist/types/RenderingEngine/helpers/isRgbaSourceRgbDest.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/setDefaultVolumeVOI.d.ts +0 -4
- package/dist/types/RenderingEngine/helpers/setDefaultVolumeVOI.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/setVolumesForViewports.d.ts +0 -4
- package/dist/types/RenderingEngine/helpers/setVolumesForViewports.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/viewportTypeToViewportClass.d.ts +0 -13
- package/dist/types/RenderingEngine/helpers/viewportTypeToViewportClass.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/viewportTypeUsesCustomRenderingPipeline.d.ts +0 -2
- package/dist/types/RenderingEngine/helpers/viewportTypeUsesCustomRenderingPipeline.d.ts.map +0 -1
- package/dist/types/RenderingEngine/helpers/volumeNewImageEventDispatcher.d.ts +0 -5
- package/dist/types/RenderingEngine/helpers/volumeNewImageEventDispatcher.d.ts.map +0 -1
- package/dist/types/RenderingEngine/index.d.ts +0 -9
- package/dist/types/RenderingEngine/index.d.ts.map +0 -1
- package/dist/types/RenderingEngine/renderingEngineCache.d.ts +0 -9
- package/dist/types/RenderingEngine/renderingEngineCache.d.ts.map +0 -1
- package/dist/types/RenderingEngine/vtkClasses/index.d.ts +0 -6
- package/dist/types/RenderingEngine/vtkClasses/index.d.ts.map +0 -1
- package/dist/types/RenderingEngine/vtkClasses/vtkOffscreenMultiRenderWindow.d.ts +0 -8
- package/dist/types/RenderingEngine/vtkClasses/vtkOffscreenMultiRenderWindow.d.ts.map +0 -1
- package/dist/types/RenderingEngine/vtkClasses/vtkSharedVolumeMapper.d.ts +0 -8
- package/dist/types/RenderingEngine/vtkClasses/vtkSharedVolumeMapper.d.ts.map +0 -1
- package/dist/types/RenderingEngine/vtkClasses/vtkSlabCamera.d.ts +0 -141
- package/dist/types/RenderingEngine/vtkClasses/vtkSlabCamera.d.ts.map +0 -1
- package/dist/types/RenderingEngine/vtkClasses/vtkStreamingOpenGLRenderWindow.d.ts +0 -8
- package/dist/types/RenderingEngine/vtkClasses/vtkStreamingOpenGLRenderWindow.d.ts.map +0 -1
- package/dist/types/RenderingEngine/vtkClasses/vtkStreamingOpenGLTexture.d.ts +0 -8
- package/dist/types/RenderingEngine/vtkClasses/vtkStreamingOpenGLTexture.d.ts.map +0 -1
- package/dist/types/RenderingEngine/vtkClasses/vtkStreamingOpenGLViewNodeFactory.d.ts +0 -9
- package/dist/types/RenderingEngine/vtkClasses/vtkStreamingOpenGLViewNodeFactory.d.ts.map +0 -1
- package/dist/types/RenderingEngine/vtkClasses/vtkStreamingOpenGLVolumeMapper.d.ts +0 -8
- package/dist/types/RenderingEngine/vtkClasses/vtkStreamingOpenGLVolumeMapper.d.ts.map +0 -1
- package/dist/types/Settings.d.ts +0 -16
- package/dist/types/Settings.d.ts.map +0 -1
- package/dist/types/cache/cache.d.ts +0 -49
- package/dist/types/cache/cache.d.ts.map +0 -1
- package/dist/types/cache/classes/Contour.d.ts +0 -24
- package/dist/types/cache/classes/Contour.d.ts.map +0 -1
- package/dist/types/cache/classes/ContourSet.d.ts +0 -37
- package/dist/types/cache/classes/ContourSet.d.ts.map +0 -1
- package/dist/types/cache/classes/ImageVolume.d.ts +0 -63
- package/dist/types/cache/classes/ImageVolume.d.ts.map +0 -1
- package/dist/types/cache/classes/Surface.d.ts +0 -26
- package/dist/types/cache/classes/Surface.d.ts.map +0 -1
- package/dist/types/cache/index.d.ts +0 -6
- package/dist/types/cache/index.d.ts.map +0 -1
- package/dist/types/constants/backgroundColors.d.ts +0 -5
- package/dist/types/constants/backgroundColors.d.ts.map +0 -1
- package/dist/types/constants/cpuColormaps.d.ts +0 -4
- package/dist/types/constants/cpuColormaps.d.ts.map +0 -1
- package/dist/types/constants/epsilon.d.ts +0 -3
- package/dist/types/constants/epsilon.d.ts.map +0 -1
- package/dist/types/constants/index.d.ts +0 -8
- package/dist/types/constants/index.d.ts.map +0 -1
- package/dist/types/constants/mprCameraValues.d.ts +0 -3
- package/dist/types/constants/mprCameraValues.d.ts.map +0 -1
- package/dist/types/constants/rendering.d.ts +0 -6
- package/dist/types/constants/rendering.d.ts.map +0 -1
- package/dist/types/constants/viewportPresets.d.ts +0 -4
- package/dist/types/constants/viewportPresets.d.ts.map +0 -1
- package/dist/types/enums/BlendModes.d.ts +0 -8
- package/dist/types/enums/BlendModes.d.ts.map +0 -1
- package/dist/types/enums/CalibrationTypes.d.ts +0 -11
- package/dist/types/enums/CalibrationTypes.d.ts.map +0 -1
- package/dist/types/enums/ContourType.d.ts +0 -6
- package/dist/types/enums/ContourType.d.ts.map +0 -1
- package/dist/types/enums/DynamicOperatorType.d.ts +0 -7
- package/dist/types/enums/DynamicOperatorType.d.ts.map +0 -1
- package/dist/types/enums/Events.d.ts +0 -39
- package/dist/types/enums/Events.d.ts.map +0 -1
- package/dist/types/enums/GeometryType.d.ts +0 -6
- package/dist/types/enums/GeometryType.d.ts.map +0 -1
- package/dist/types/enums/ImageQualityStatus.d.ts +0 -9
- package/dist/types/enums/ImageQualityStatus.d.ts.map +0 -1
- package/dist/types/enums/InterpolationType.d.ts +0 -7
- package/dist/types/enums/InterpolationType.d.ts.map +0 -1
- package/dist/types/enums/MetadataModules.d.ts +0 -24
- package/dist/types/enums/MetadataModules.d.ts.map +0 -1
- package/dist/types/enums/OrientationAxis.d.ts +0 -8
- package/dist/types/enums/OrientationAxis.d.ts.map +0 -1
- package/dist/types/enums/RequestType.d.ts +0 -8
- package/dist/types/enums/RequestType.d.ts.map +0 -1
- package/dist/types/enums/SharedArrayBufferModes.d.ts +0 -7
- package/dist/types/enums/SharedArrayBufferModes.d.ts.map +0 -1
- package/dist/types/enums/VOILUTFunctionType.d.ts +0 -6
- package/dist/types/enums/VOILUTFunctionType.d.ts.map +0 -1
- package/dist/types/enums/VideoEnums.d.ts +0 -6
- package/dist/types/enums/VideoEnums.d.ts.map +0 -1
- package/dist/types/enums/ViewportStatus.d.ts +0 -9
- package/dist/types/enums/ViewportStatus.d.ts.map +0 -1
- package/dist/types/enums/ViewportType.d.ts +0 -9
- package/dist/types/enums/ViewportType.d.ts.map +0 -1
- package/dist/types/enums/index.d.ts +0 -18
- package/dist/types/enums/index.d.ts.map +0 -1
- package/dist/types/eventTarget.d.ts +0 -15
- package/dist/types/eventTarget.d.ts.map +0 -1
- package/dist/types/getEnabledElement.d.ts +0 -6
- package/dist/types/getEnabledElement.d.ts.map +0 -1
- package/dist/types/global.d.ts +0 -8
- package/dist/types/global.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -33
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/init.d.ts +0 -17
- package/dist/types/init.d.ts.map +0 -1
- package/dist/types/loaders/ProgressiveRetrieveImages.d.ts +0 -36
- package/dist/types/loaders/ProgressiveRetrieveImages.d.ts.map +0 -1
- package/dist/types/loaders/configuration/interleavedRetrieve.d.ts +0 -4
- package/dist/types/loaders/configuration/interleavedRetrieve.d.ts.map +0 -1
- package/dist/types/loaders/configuration/sequentialRetrieve.d.ts +0 -4
- package/dist/types/loaders/configuration/sequentialRetrieve.d.ts.map +0 -1
- package/dist/types/loaders/configuration/singleRetrieve.d.ts +0 -4
- package/dist/types/loaders/configuration/singleRetrieve.d.ts.map +0 -1
- package/dist/types/loaders/fillNearbyFrames.d.ts +0 -4
- package/dist/types/loaders/fillNearbyFrames.d.ts.map +0 -1
- package/dist/types/loaders/geometryLoader.d.ts +0 -10
- package/dist/types/loaders/geometryLoader.d.ts.map +0 -1
- package/dist/types/loaders/imageLoader.d.ts +0 -44
- package/dist/types/loaders/imageLoader.d.ts.map +0 -1
- package/dist/types/loaders/utils/contourSet/createContourSet.d.ts +0 -3
- package/dist/types/loaders/utils/contourSet/createContourSet.d.ts.map +0 -1
- package/dist/types/loaders/utils/contourSet/validateContourSet.d.ts +0 -3
- package/dist/types/loaders/utils/contourSet/validateContourSet.d.ts.map +0 -1
- package/dist/types/loaders/utils/surface/createSurface.d.ts +0 -3
- package/dist/types/loaders/utils/surface/createSurface.d.ts.map +0 -1
- package/dist/types/loaders/utils/surface/validateSurface.d.ts +0 -3
- package/dist/types/loaders/utils/surface/validateSurface.d.ts.map +0 -1
- package/dist/types/loaders/volumeLoader.d.ts +0 -43
- package/dist/types/loaders/volumeLoader.d.ts.map +0 -1
- package/dist/types/metaData.d.ts +0 -8
- package/dist/types/metaData.d.ts.map +0 -1
- package/dist/types/requestPool/imageLoadPoolManager.d.ts +0 -4
- package/dist/types/requestPool/imageLoadPoolManager.d.ts.map +0 -1
- package/dist/types/requestPool/imageRetrievalPoolManager.d.ts +0 -4
- package/dist/types/requestPool/imageRetrievalPoolManager.d.ts.map +0 -1
- package/dist/types/requestPool/requestPoolManager.d.ts +0 -45
- package/dist/types/requestPool/requestPoolManager.d.ts.map +0 -1
- package/dist/types/types/AABB2.d.ts +0 -8
- package/dist/types/types/AABB2.d.ts.map +0 -1
- package/dist/types/types/AABB3.d.ts +0 -10
- package/dist/types/types/AABB3.d.ts.map +0 -1
- package/dist/types/types/ActorSliceRange.d.ts +0 -12
- package/dist/types/types/ActorSliceRange.d.ts.map +0 -1
- package/dist/types/types/AffineMatrix.d.ts +0 -28
- package/dist/types/types/AffineMatrix.d.ts.map +0 -1
- package/dist/types/types/BoundsIJK.d.ts +0 -4
- package/dist/types/types/BoundsIJK.d.ts.map +0 -1
- package/dist/types/types/BoundsLPS.d.ts +0 -4
- package/dist/types/types/BoundsLPS.d.ts.map +0 -1
- package/dist/types/types/CPUFallbackColormap.d.ts +0 -21
- package/dist/types/types/CPUFallbackColormap.d.ts.map +0 -1
- package/dist/types/types/CPUFallbackColormapData.d.ts +0 -11
- package/dist/types/types/CPUFallbackColormapData.d.ts.map +0 -1
- package/dist/types/types/CPUFallbackColormapsData.d.ts +0 -6
- package/dist/types/types/CPUFallbackColormapsData.d.ts.map +0 -1
- package/dist/types/types/CPUFallbackEnabledElement.d.ts +0 -38
- package/dist/types/types/CPUFallbackEnabledElement.d.ts.map +0 -1
- package/dist/types/types/CPUFallbackLUT.d.ts +0 -5
- package/dist/types/types/CPUFallbackLUT.d.ts.map +0 -1
- package/dist/types/types/CPUFallbackLookupTable.d.ts +0 -16
- package/dist/types/types/CPUFallbackLookupTable.d.ts.map +0 -1
- package/dist/types/types/CPUFallbackRenderingTools.d.ts +0 -24
- package/dist/types/types/CPUFallbackRenderingTools.d.ts.map +0 -1
- package/dist/types/types/CPUFallbackTransform.d.ts +0 -15
- package/dist/types/types/CPUFallbackTransform.d.ts.map +0 -1
- package/dist/types/types/CPUFallbackViewport.d.ts +0 -28
- package/dist/types/types/CPUFallbackViewport.d.ts.map +0 -1
- package/dist/types/types/CPUFallbackViewportDisplayedArea.d.ts +0 -15
- package/dist/types/types/CPUFallbackViewportDisplayedArea.d.ts.map +0 -1
- package/dist/types/types/CPUIImageData.d.ts +0 -38
- package/dist/types/types/CPUIImageData.d.ts.map +0 -1
- package/dist/types/types/Color.d.ts +0 -3
- package/dist/types/types/Color.d.ts.map +0 -1
- package/dist/types/types/Colormap.d.ts +0 -16
- package/dist/types/types/Colormap.d.ts.map +0 -1
- package/dist/types/types/ContourData.d.ts +0 -18
- package/dist/types/types/ContourData.d.ts.map +0 -1
- package/dist/types/types/Cornerstone3DConfig.d.ts +0 -15
- package/dist/types/types/Cornerstone3DConfig.d.ts.map +0 -1
- package/dist/types/types/CustomEventType.d.ts +0 -6
- package/dist/types/types/CustomEventType.d.ts.map +0 -1
- package/dist/types/types/EventTypes.d.ts +0 -173
- package/dist/types/types/EventTypes.d.ts.map +0 -1
- package/dist/types/types/FlipDirection.d.ts +0 -6
- package/dist/types/types/FlipDirection.d.ts.map +0 -1
- package/dist/types/types/IActor.d.ts +0 -21
- package/dist/types/types/IActor.d.ts.map +0 -1
- package/dist/types/types/ICache.d.ts +0 -13
- package/dist/types/types/ICache.d.ts.map +0 -1
- package/dist/types/types/ICachedGeometry.d.ts +0 -12
- package/dist/types/types/ICachedGeometry.d.ts.map +0 -1
- package/dist/types/types/ICachedImage.d.ts +0 -12
- package/dist/types/types/ICachedImage.d.ts.map +0 -1
- package/dist/types/types/ICachedVolume.d.ts +0 -11
- package/dist/types/types/ICachedVolume.d.ts.map +0 -1
- package/dist/types/types/ICamera.d.ts +0 -17
- package/dist/types/types/ICamera.d.ts.map +0 -1
- package/dist/types/types/IContour.d.ts +0 -14
- package/dist/types/types/IContour.d.ts.map +0 -1
- package/dist/types/types/IContourSet.d.ts +0 -20
- package/dist/types/types/IContourSet.d.ts.map +0 -1
- package/dist/types/types/IDynamicImageVolume.d.ts +0 -9
- package/dist/types/types/IDynamicImageVolume.d.ts.map +0 -1
- package/dist/types/types/IEnabledElement.d.ts +0 -12
- package/dist/types/types/IEnabledElement.d.ts.map +0 -1
- package/dist/types/types/IGeometry.d.ts +0 -11
- package/dist/types/types/IGeometry.d.ts.map +0 -1
- package/dist/types/types/IImage.d.ts +0 -86
- package/dist/types/types/IImage.d.ts.map +0 -1
- package/dist/types/types/IImageCalibration.d.ts +0 -12
- package/dist/types/types/IImageCalibration.d.ts.map +0 -1
- package/dist/types/types/IImageData.d.ts +0 -28
- package/dist/types/types/IImageData.d.ts.map +0 -1
- package/dist/types/types/IImageVolume.d.ts +0 -44
- package/dist/types/types/IImageVolume.d.ts.map +0 -1
- package/dist/types/types/ILoadObject.d.ts +0 -19
- package/dist/types/types/ILoadObject.d.ts.map +0 -1
- package/dist/types/types/IRegisterImageLoader.d.ts +0 -6
- package/dist/types/types/IRegisterImageLoader.d.ts.map +0 -1
- package/dist/types/types/IRenderingEngine.d.ts +0 -28
- package/dist/types/types/IRenderingEngine.d.ts.map +0 -1
- package/dist/types/types/IRetrieveConfiguration.d.ts +0 -39
- package/dist/types/types/IRetrieveConfiguration.d.ts.map +0 -1
- package/dist/types/types/IStackInput.d.ts +0 -13
- package/dist/types/types/IStackInput.d.ts.map +0 -1
- package/dist/types/types/IStackViewport.d.ts +0 -3
- package/dist/types/types/IStackViewport.d.ts.map +0 -1
- package/dist/types/types/IStreamingImageVolume.d.ts +0 -7
- package/dist/types/types/IStreamingImageVolume.d.ts.map +0 -1
- package/dist/types/types/IStreamingVolumeProperties.d.ts +0 -13
- package/dist/types/types/IStreamingVolumeProperties.d.ts.map +0 -1
- package/dist/types/types/ISurface.d.ts +0 -14
- package/dist/types/types/ISurface.d.ts.map +0 -1
- package/dist/types/types/IVideoViewport.d.ts +0 -20
- package/dist/types/types/IVideoViewport.d.ts.map +0 -1
- package/dist/types/types/IViewport.d.ts +0 -144
- package/dist/types/types/IViewport.d.ts.map +0 -1
- package/dist/types/types/IViewportId.d.ts +0 -5
- package/dist/types/types/IViewportId.d.ts.map +0 -1
- package/dist/types/types/IVolume.d.ts +0 -4
- package/dist/types/types/IVolume.d.ts.map +0 -1
- package/dist/types/types/IVolumeInput.d.ts +0 -16
- package/dist/types/types/IVolumeInput.d.ts.map +0 -1
- package/dist/types/types/IVolumeViewport.d.ts +0 -39
- package/dist/types/types/IVolumeViewport.d.ts.map +0 -1
- package/dist/types/types/ImageLoadListener.d.ts +0 -6
- package/dist/types/types/ImageLoadListener.d.ts.map +0 -1
- package/dist/types/types/ImageLoaderFn.d.ts +0 -7
- package/dist/types/types/ImageLoaderFn.d.ts.map +0 -1
- package/dist/types/types/ImagePixelModule.d.ts +0 -14
- package/dist/types/types/ImagePixelModule.d.ts.map +0 -1
- package/dist/types/types/ImagePlaneModule.d.ts +0 -17
- package/dist/types/types/ImagePlaneModule.d.ts.map +0 -1
- package/dist/types/types/ImageSliceData.d.ts +0 -6
- package/dist/types/types/ImageSliceData.d.ts.map +0 -1
- package/dist/types/types/ImageVolumeProps.d.ts +0 -7
- package/dist/types/types/ImageVolumeProps.d.ts.map +0 -1
- package/dist/types/types/Mat3.d.ts +0 -3
- package/dist/types/types/Mat3.d.ts.map +0 -1
- package/dist/types/types/Metadata.d.ts +0 -20
- package/dist/types/types/Metadata.d.ts.map +0 -1
- package/dist/types/types/OrientationVectors.d.ts +0 -7
- package/dist/types/types/OrientationVectors.d.ts.map +0 -1
- package/dist/types/types/PixelDataTypedArray.d.ts +0 -3
- package/dist/types/types/PixelDataTypedArray.d.ts.map +0 -1
- package/dist/types/types/Plane.d.ts +0 -3
- package/dist/types/types/Plane.d.ts.map +0 -1
- package/dist/types/types/Point2.d.ts +0 -3
- package/dist/types/types/Point2.d.ts.map +0 -1
- package/dist/types/types/Point3.d.ts +0 -8
- package/dist/types/types/Point3.d.ts.map +0 -1
- package/dist/types/types/Point4.d.ts +0 -3
- package/dist/types/types/Point4.d.ts.map +0 -1
- package/dist/types/types/RGB.d.ts +0 -3
- package/dist/types/types/RGB.d.ts.map +0 -1
- package/dist/types/types/ScalingParameters.d.ts +0 -20
- package/dist/types/types/ScalingParameters.d.ts.map +0 -1
- package/dist/types/types/StackViewportProperties.d.ts +0 -10
- package/dist/types/types/StackViewportProperties.d.ts.map +0 -1
- package/dist/types/types/SurfaceData.d.ts +0 -13
- package/dist/types/types/SurfaceData.d.ts.map +0 -1
- package/dist/types/types/TransformMatrix2D.d.ts +0 -3
- package/dist/types/types/TransformMatrix2D.d.ts.map +0 -1
- package/dist/types/types/VideoViewportProperties.d.ts +0 -11
- package/dist/types/types/VideoViewportProperties.d.ts.map +0 -1
- package/dist/types/types/VideoViewportTypes.d.ts +0 -19
- package/dist/types/types/VideoViewportTypes.d.ts.map +0 -1
- package/dist/types/types/ViewportInputOptions.d.ts +0 -13
- package/dist/types/types/ViewportInputOptions.d.ts.map +0 -1
- package/dist/types/types/ViewportPreset.d.ts +0 -14
- package/dist/types/types/ViewportPreset.d.ts.map +0 -1
- package/dist/types/types/ViewportProperties.d.ts +0 -12
- package/dist/types/types/ViewportProperties.d.ts.map +0 -1
- package/dist/types/types/VolumeLoaderFn.d.ts +0 -7
- package/dist/types/types/VolumeLoaderFn.d.ts.map +0 -1
- package/dist/types/types/VolumeProps.d.ts +0 -28
- package/dist/types/types/VolumeProps.d.ts.map +0 -1
- package/dist/types/types/VolumeViewportProperties.d.ts +0 -9
- package/dist/types/types/VolumeViewportProperties.d.ts.map +0 -1
- package/dist/types/types/displayArea.d.ts +0 -14
- package/dist/types/types/displayArea.d.ts.map +0 -1
- package/dist/types/types/index.d.ts +0 -88
- package/dist/types/types/index.d.ts.map +0 -1
- package/dist/types/types/voi.d.ts +0 -10
- package/dist/types/types/voi.d.ts.map +0 -1
- package/dist/types/utilities/PointsManager.d.ts +0 -34
- package/dist/types/utilities/PointsManager.d.ts.map +0 -1
- package/dist/types/utilities/ProgressiveIterator.d.ts +0 -25
- package/dist/types/utilities/ProgressiveIterator.d.ts.map +0 -1
- package/dist/types/utilities/RLEVoxelMap.d.ts +0 -27
- package/dist/types/utilities/RLEVoxelMap.d.ts.map +0 -1
- package/dist/types/utilities/VoxelManager.d.ts +0 -45
- package/dist/types/utilities/VoxelManager.d.ts.map +0 -1
- package/dist/types/utilities/actorCheck.d.ts +0 -6
- package/dist/types/utilities/actorCheck.d.ts.map +0 -1
- package/dist/types/utilities/applyPreset.d.ts +0 -4
- package/dist/types/utilities/applyPreset.d.ts.map +0 -1
- package/dist/types/utilities/cacheUtils.d.ts +0 -3
- package/dist/types/utilities/cacheUtils.d.ts.map +0 -1
- package/dist/types/utilities/calculateViewportsSpatialRegistration.d.ts +0 -4
- package/dist/types/utilities/calculateViewportsSpatialRegistration.d.ts.map +0 -1
- package/dist/types/utilities/calibratedPixelSpacingMetadataProvider.d.ts +0 -7
- package/dist/types/utilities/calibratedPixelSpacingMetadataProvider.d.ts.map +0 -1
- package/dist/types/utilities/clamp.d.ts +0 -3
- package/dist/types/utilities/clamp.d.ts.map +0 -1
- package/dist/types/utilities/color.d.ts +0 -8
- package/dist/types/utilities/color.d.ts.map +0 -1
- package/dist/types/utilities/colormap.d.ts +0 -7
- package/dist/types/utilities/colormap.d.ts.map +0 -1
- package/dist/types/utilities/convertStackToVolumeViewport.d.ts +0 -13
- package/dist/types/utilities/convertStackToVolumeViewport.d.ts.map +0 -1
- package/dist/types/utilities/convertToGrayscale.d.ts +0 -2
- package/dist/types/utilities/convertToGrayscale.d.ts.map +0 -1
- package/dist/types/utilities/convertVolumeToStackViewport.d.ts +0 -10
- package/dist/types/utilities/convertVolumeToStackViewport.d.ts.map +0 -1
- package/dist/types/utilities/createFloat32SharedArray.d.ts +0 -3
- package/dist/types/utilities/createFloat32SharedArray.d.ts.map +0 -1
- package/dist/types/utilities/createInt16SharedArray.d.ts +0 -3
- package/dist/types/utilities/createInt16SharedArray.d.ts.map +0 -1
- package/dist/types/utilities/createLinearRGBTransferFunction.d.ts +0 -4
- package/dist/types/utilities/createLinearRGBTransferFunction.d.ts.map +0 -1
- package/dist/types/utilities/createSigmoidRGBTransferFunction.d.ts +0 -4
- package/dist/types/utilities/createSigmoidRGBTransferFunction.d.ts.map +0 -1
- package/dist/types/utilities/createUInt16SharedArray.d.ts +0 -3
- package/dist/types/utilities/createUInt16SharedArray.d.ts.map +0 -1
- package/dist/types/utilities/createUint8SharedArray.d.ts +0 -3
- package/dist/types/utilities/createUint8SharedArray.d.ts.map +0 -1
- package/dist/types/utilities/decimate.d.ts +0 -2
- package/dist/types/utilities/decimate.d.ts.map +0 -1
- package/dist/types/utilities/deepFreeze.d.ts +0 -3
- package/dist/types/utilities/deepFreeze.d.ts.map +0 -1
- package/dist/types/utilities/deepMerge.d.ts +0 -3
- package/dist/types/utilities/deepMerge.d.ts.map +0 -1
- package/dist/types/utilities/eventListener/MultiTargetEventListenerManager.d.ts +0 -8
- package/dist/types/utilities/eventListener/MultiTargetEventListenerManager.d.ts.map +0 -1
- package/dist/types/utilities/eventListener/TargetEventListeners.d.ts +0 -16
- package/dist/types/utilities/eventListener/TargetEventListeners.d.ts.map +0 -1
- package/dist/types/utilities/eventListener/index.d.ts +0 -3
- package/dist/types/utilities/eventListener/index.d.ts.map +0 -1
- package/dist/types/utilities/generateVolumePropsFromImageIds.d.ts +0 -4
- package/dist/types/utilities/generateVolumePropsFromImageIds.d.ts.map +0 -1
- package/dist/types/utilities/genericMetadataProvider.d.ts +0 -7
- package/dist/types/utilities/genericMetadataProvider.d.ts.map +0 -1
- package/dist/types/utilities/getBufferConfiguration.d.ts +0 -10
- package/dist/types/utilities/getBufferConfiguration.d.ts.map +0 -1
- package/dist/types/utilities/getClosestImageId.d.ts +0 -3
- package/dist/types/utilities/getClosestImageId.d.ts.map +0 -1
- package/dist/types/utilities/getClosestStackImageIndexForPoint.d.ts +0 -7
- package/dist/types/utilities/getClosestStackImageIndexForPoint.d.ts.map +0 -1
- package/dist/types/utilities/getCurrentVolumeViewportSlice.d.ts +0 -11
- package/dist/types/utilities/getCurrentVolumeViewportSlice.d.ts.map +0 -1
- package/dist/types/utilities/getImageLegacy.d.ts +0 -4
- package/dist/types/utilities/getImageLegacy.d.ts.map +0 -1
- package/dist/types/utilities/getImageSliceDataForVolumeViewport.d.ts +0 -4
- package/dist/types/utilities/getImageSliceDataForVolumeViewport.d.ts.map +0 -1
- package/dist/types/utilities/getMinMax.d.ts +0 -5
- package/dist/types/utilities/getMinMax.d.ts.map +0 -1
- package/dist/types/utilities/getRandomSampleFromArray.d.ts +0 -2
- package/dist/types/utilities/getRandomSampleFromArray.d.ts.map +0 -1
- package/dist/types/utilities/getRuntimeId.d.ts +0 -2
- package/dist/types/utilities/getRuntimeId.d.ts.map +0 -1
- package/dist/types/utilities/getScalarDataType.d.ts +0 -3
- package/dist/types/utilities/getScalarDataType.d.ts.map +0 -1
- package/dist/types/utilities/getScalingParameters.d.ts +0 -3
- package/dist/types/utilities/getScalingParameters.d.ts.map +0 -1
- package/dist/types/utilities/getSliceRange.d.ts +0 -3
- package/dist/types/utilities/getSliceRange.d.ts.map +0 -1
- package/dist/types/utilities/getSpacingInNormalDirection.d.ts +0 -7
- package/dist/types/utilities/getSpacingInNormalDirection.d.ts.map +0 -1
- package/dist/types/utilities/getTargetVolumeAndSpacingInNormalDir.d.ts +0 -7
- package/dist/types/utilities/getTargetVolumeAndSpacingInNormalDir.d.ts.map +0 -1
- package/dist/types/utilities/getViewportImageCornersInWorld.d.ts +0 -3
- package/dist/types/utilities/getViewportImageCornersInWorld.d.ts.map +0 -1
- package/dist/types/utilities/getViewportImageIds.d.ts +0 -4
- package/dist/types/utilities/getViewportImageIds.d.ts.map +0 -1
- package/dist/types/utilities/getViewportModality.d.ts +0 -4
- package/dist/types/utilities/getViewportModality.d.ts.map +0 -1
- package/dist/types/utilities/getViewportsWithImageURI.d.ts +0 -5
- package/dist/types/utilities/getViewportsWithImageURI.d.ts.map +0 -1
- package/dist/types/utilities/getViewportsWithVolumeId.d.ts +0 -4
- package/dist/types/utilities/getViewportsWithVolumeId.d.ts.map +0 -1
- package/dist/types/utilities/getVoiFromSigmoidRGBTransferFunction.d.ts +0 -3
- package/dist/types/utilities/getVoiFromSigmoidRGBTransferFunction.d.ts.map +0 -1
- package/dist/types/utilities/getVolumeActorCorners.d.ts +0 -3
- package/dist/types/utilities/getVolumeActorCorners.d.ts.map +0 -1
- package/dist/types/utilities/getVolumeId.d.ts +0 -2
- package/dist/types/utilities/getVolumeId.d.ts.map +0 -1
- package/dist/types/utilities/getVolumeSliceRangeInfo.d.ts +0 -8
- package/dist/types/utilities/getVolumeSliceRangeInfo.d.ts.map +0 -1
- package/dist/types/utilities/getVolumeViewportScrollInfo.d.ts +0 -12
- package/dist/types/utilities/getVolumeViewportScrollInfo.d.ts.map +0 -1
- package/dist/types/utilities/getVolumeViewportsContainingSameVolumes.d.ts +0 -4
- package/dist/types/utilities/getVolumeViewportsContainingSameVolumes.d.ts.map +0 -1
- package/dist/types/utilities/hasFloatScalingParameters.d.ts +0 -3
- package/dist/types/utilities/hasFloatScalingParameters.d.ts.map +0 -1
- package/dist/types/utilities/hasNaNValues.d.ts +0 -2
- package/dist/types/utilities/hasNaNValues.d.ts.map +0 -1
- package/dist/types/utilities/imageIdToURI.d.ts +0 -2
- package/dist/types/utilities/imageIdToURI.d.ts.map +0 -1
- package/dist/types/utilities/imageRetrieveMetadataProvider.d.ts +0 -8
- package/dist/types/utilities/imageRetrieveMetadataProvider.d.ts.map +0 -1
- package/dist/types/utilities/imageToWorldCoords.d.ts +0 -3
- package/dist/types/utilities/imageToWorldCoords.d.ts.map +0 -1
- package/dist/types/utilities/index.d.ts +0 -83
- package/dist/types/utilities/index.d.ts.map +0 -1
- package/dist/types/utilities/indexWithinDimensions.d.ts +0 -3
- package/dist/types/utilities/indexWithinDimensions.d.ts.map +0 -1
- package/dist/types/utilities/invertRgbTransferFunction.d.ts +0 -2
- package/dist/types/utilities/invertRgbTransferFunction.d.ts.map +0 -1
- package/dist/types/utilities/isEqual.d.ts +0 -5
- package/dist/types/utilities/isEqual.d.ts.map +0 -1
- package/dist/types/utilities/isOpposite.d.ts +0 -3
- package/dist/types/utilities/isOpposite.d.ts.map +0 -1
- package/dist/types/utilities/isPTPrescaledWithSUV.d.ts +0 -4
- package/dist/types/utilities/isPTPrescaledWithSUV.d.ts.map +0 -1
- package/dist/types/utilities/isTypedArray.d.ts +0 -2
- package/dist/types/utilities/isTypedArray.d.ts.map +0 -1
- package/dist/types/utilities/isValidVolume.d.ts +0 -3
- package/dist/types/utilities/isValidVolume.d.ts.map +0 -1
- package/dist/types/utilities/isVideoTransferSyntax.d.ts +0 -3
- package/dist/types/utilities/isVideoTransferSyntax.d.ts.map +0 -1
- package/dist/types/utilities/loadImageToCanvas.d.ts +0 -32
- package/dist/types/utilities/loadImageToCanvas.d.ts.map +0 -1
- package/dist/types/utilities/makeVolumeMetadata.d.ts +0 -3
- package/dist/types/utilities/makeVolumeMetadata.d.ts.map +0 -1
- package/dist/types/utilities/planar.d.ts +0 -8
- package/dist/types/utilities/planar.d.ts.map +0 -1
- package/dist/types/utilities/renderToCanvasCPU.d.ts +0 -4
- package/dist/types/utilities/renderToCanvasCPU.d.ts.map +0 -1
- package/dist/types/utilities/renderToCanvasGPU.d.ts +0 -6
- package/dist/types/utilities/renderToCanvasGPU.d.ts.map +0 -1
- package/dist/types/utilities/roundNumber.d.ts +0 -5
- package/dist/types/utilities/roundNumber.d.ts.map +0 -1
- package/dist/types/utilities/scaleRgbTransferFunction.d.ts +0 -2
- package/dist/types/utilities/scaleRgbTransferFunction.d.ts.map +0 -1
- package/dist/types/utilities/snapFocalPointToSlice.d.ts +0 -6
- package/dist/types/utilities/snapFocalPointToSlice.d.ts.map +0 -1
- package/dist/types/utilities/sortImageIdsAndGetSpacing.d.ts +0 -10
- package/dist/types/utilities/sortImageIdsAndGetSpacing.d.ts.map +0 -1
- package/dist/types/utilities/spatialRegistrationMetadataProvider.d.ts +0 -7
- package/dist/types/utilities/spatialRegistrationMetadataProvider.d.ts.map +0 -1
- package/dist/types/utilities/transferFunctionUtils.d.ts +0 -4
- package/dist/types/utilities/transferFunctionUtils.d.ts.map +0 -1
- package/dist/types/utilities/transformCanvasToIJK.d.ts +0 -3
- package/dist/types/utilities/transformCanvasToIJK.d.ts.map +0 -1
- package/dist/types/utilities/transformIJKToCanvas.d.ts +0 -3
- package/dist/types/utilities/transformIJKToCanvas.d.ts.map +0 -1
- package/dist/types/utilities/transformIndexToWorld.d.ts +0 -3
- package/dist/types/utilities/transformIndexToWorld.d.ts.map +0 -1
- package/dist/types/utilities/transformWorldToIndex.d.ts +0 -3
- package/dist/types/utilities/transformWorldToIndex.d.ts.map +0 -1
- package/dist/types/utilities/triggerEvent.d.ts +0 -2
- package/dist/types/utilities/triggerEvent.d.ts.map +0 -1
- package/dist/types/utilities/updateVTKImageDataWithCornerstoneImage.d.ts +0 -5
- package/dist/types/utilities/updateVTKImageDataWithCornerstoneImage.d.ts.map +0 -1
- package/dist/types/utilities/uuidv4.d.ts +0 -2
- package/dist/types/utilities/uuidv4.d.ts.map +0 -1
- package/dist/types/utilities/windowLevel.d.ts +0 -10
- package/dist/types/utilities/windowLevel.d.ts.map +0 -1
- package/dist/types/utilities/worldToImageCoords.d.ts +0 -4
- package/dist/types/utilities/worldToImageCoords.d.ts.map +0 -1
- package/dist/types/webWorkerManager/webWorkerManager.d.ts +0 -22
- package/dist/types/webWorkerManager/webWorkerManager.d.ts.map +0 -1
- package/dist/umd/index.js +0 -2
- package/dist/umd/index.js.map +0 -1
- package/src/RenderingEngine/BaseVolumeViewport.ts +0 -1785
- package/src/RenderingEngine/CanvasActor/CanvasMapper.ts +0 -17
- package/src/RenderingEngine/CanvasActor/CanvasProperties.ts +0 -49
- package/src/RenderingEngine/CanvasActor/index.ts +0 -232
- package/src/RenderingEngine/RenderingEngine.ts +0 -1420
- package/src/RenderingEngine/StackViewport.ts +0 -3309
- package/src/RenderingEngine/VideoViewport.ts +0 -1116
- package/src/RenderingEngine/Viewport.ts +0 -1873
- package/src/RenderingEngine/VolumeViewport.ts +0 -638
- package/src/RenderingEngine/VolumeViewport3D.ts +0 -73
- package/src/RenderingEngine/getRenderingEngine.ts +0 -34
- package/src/RenderingEngine/helpers/addImageSlicesToViewports.ts +0 -51
- package/src/RenderingEngine/helpers/addVolumesToViewports.ts +0 -55
- package/src/RenderingEngine/helpers/cpuFallback/colors/colormap.ts +0 -343
- package/src/RenderingEngine/helpers/cpuFallback/colors/index.ts +0 -4
- package/src/RenderingEngine/helpers/cpuFallback/colors/lookupTable.ts +0 -469
- package/src/RenderingEngine/helpers/cpuFallback/drawImageSync.ts +0 -58
- package/src/RenderingEngine/helpers/cpuFallback/rendering/calculateTransform.ts +0 -136
- package/src/RenderingEngine/helpers/cpuFallback/rendering/canvasToPixel.ts +0 -25
- package/src/RenderingEngine/helpers/cpuFallback/rendering/computeAutoVoi.ts +0 -47
- package/src/RenderingEngine/helpers/cpuFallback/rendering/correctShift.ts +0 -38
- package/src/RenderingEngine/helpers/cpuFallback/rendering/createViewport.ts +0 -64
- package/src/RenderingEngine/helpers/cpuFallback/rendering/doesImageNeedToBeRendered.ts +0 -36
- package/src/RenderingEngine/helpers/cpuFallback/rendering/fitToWindow.ts +0 -22
- package/src/RenderingEngine/helpers/cpuFallback/rendering/generateColorLUT.ts +0 -60
- package/src/RenderingEngine/helpers/cpuFallback/rendering/generateLut.ts +0 -83
- package/src/RenderingEngine/helpers/cpuFallback/rendering/getDefaultViewport.ts +0 -88
- package/src/RenderingEngine/helpers/cpuFallback/rendering/getImageFitScale.ts +0 -52
- package/src/RenderingEngine/helpers/cpuFallback/rendering/getImageSize.ts +0 -55
- package/src/RenderingEngine/helpers/cpuFallback/rendering/getLut.ts +0 -53
- package/src/RenderingEngine/helpers/cpuFallback/rendering/getModalityLut.ts +0 -55
- package/src/RenderingEngine/helpers/cpuFallback/rendering/getTransform.ts +0 -17
- package/src/RenderingEngine/helpers/cpuFallback/rendering/getVOILut.ts +0 -82
- package/src/RenderingEngine/helpers/cpuFallback/rendering/initializeRenderCanvas.ts +0 -37
- package/src/RenderingEngine/helpers/cpuFallback/rendering/lutMatches.ts +0 -21
- package/src/RenderingEngine/helpers/cpuFallback/rendering/now.ts +0 -13
- package/src/RenderingEngine/helpers/cpuFallback/rendering/pixelToCanvas.ts +0 -22
- package/src/RenderingEngine/helpers/cpuFallback/rendering/renderColorImage.ts +0 -195
- package/src/RenderingEngine/helpers/cpuFallback/rendering/renderGrayscaleImage.ts +0 -166
- package/src/RenderingEngine/helpers/cpuFallback/rendering/renderPseudoColorImage.ts +0 -200
- package/src/RenderingEngine/helpers/cpuFallback/rendering/resetCamera.ts +0 -32
- package/src/RenderingEngine/helpers/cpuFallback/rendering/resize.ts +0 -109
- package/src/RenderingEngine/helpers/cpuFallback/rendering/saveLastRendered.ts +0 -36
- package/src/RenderingEngine/helpers/cpuFallback/rendering/setDefaultViewport.ts +0 -17
- package/src/RenderingEngine/helpers/cpuFallback/rendering/setToPixelCoordinateSystem.ts +0 -32
- package/src/RenderingEngine/helpers/cpuFallback/rendering/storedColorPixelDataToCanvasImageData.ts +0 -58
- package/src/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageData.ts +0 -76
- package/src/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageDataColorLUT.ts +0 -60
- package/src/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageDataPET.ts +0 -50
- package/src/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageDataPseudocolorLUT.ts +0 -66
- package/src/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageDataPseudocolorLUTPET.ts +0 -68
- package/src/RenderingEngine/helpers/cpuFallback/rendering/storedPixelDataToCanvasImageDataRGBA.ts +0 -81
- package/src/RenderingEngine/helpers/cpuFallback/rendering/storedRGBAPixelDataToCanvasImageData.ts +0 -56
- package/src/RenderingEngine/helpers/cpuFallback/rendering/transform.ts +0 -126
- package/src/RenderingEngine/helpers/cpuFallback/rendering/validator.ts +0 -31
- package/src/RenderingEngine/helpers/createVolumeActor.ts +0 -105
- package/src/RenderingEngine/helpers/createVolumeMapper.ts +0 -37
- package/src/RenderingEngine/helpers/getOrCreateCanvas.ts +0 -89
- package/src/RenderingEngine/helpers/index.ts +0 -17
- package/src/RenderingEngine/helpers/isRgbaSourceRgbDest.ts +0 -1
- package/src/RenderingEngine/helpers/setDefaultVolumeVOI.ts +0 -251
- package/src/RenderingEngine/helpers/setVolumesForViewports.ts +0 -54
- package/src/RenderingEngine/helpers/viewportTypeToViewportClass.ts +0 -16
- package/src/RenderingEngine/helpers/viewportTypeUsesCustomRenderingPipeline.ts +0 -7
- package/src/RenderingEngine/helpers/volumeNewImageEventDispatcher.ts +0 -75
- package/src/RenderingEngine/index.ts +0 -23
- package/src/RenderingEngine/renderingEngineCache.ts +0 -58
- package/src/RenderingEngine/vtkClasses/index.js +0 -11
- package/src/RenderingEngine/vtkClasses/vtkOffscreenMultiRenderWindow.js +0 -149
- package/src/RenderingEngine/vtkClasses/vtkSharedVolumeMapper.js +0 -52
- package/src/RenderingEngine/vtkClasses/vtkSlabCamera.ts +0 -922
- package/src/RenderingEngine/vtkClasses/vtkStreamingOpenGLRenderWindow.js +0 -48
- package/src/RenderingEngine/vtkClasses/vtkStreamingOpenGLTexture.js +0 -272
- package/src/RenderingEngine/vtkClasses/vtkStreamingOpenGLViewNodeFactory.js +0 -152
- package/src/RenderingEngine/vtkClasses/vtkStreamingOpenGLVolumeMapper.js +0 -308
- package/src/Settings.ts +0 -300
- package/src/cache/cache.ts +0 -1005
- package/src/cache/classes/Contour.ts +0 -73
- package/src/cache/classes/ContourSet.ts +0 -217
- package/src/cache/classes/ImageVolume.ts +0 -710
- package/src/cache/classes/Surface.ts +0 -61
- package/src/cache/index.ts +0 -6
- package/src/constants/backgroundColors.ts +0 -5
- package/src/constants/cpuColormaps.ts +0 -1537
- package/src/constants/epsilon.ts +0 -3
- package/src/constants/index.ts +0 -15
- package/src/constants/mprCameraValues.ts +0 -20
- package/src/constants/rendering.ts +0 -8
- package/src/constants/viewportPresets.ts +0 -357
- package/src/enums/BlendModes.ts +0 -23
- package/src/enums/CalibrationTypes.ts +0 -55
- package/src/enums/ContourType.ts +0 -6
- package/src/enums/DynamicOperatorType.ts +0 -14
- package/src/enums/Events.ts +0 -250
- package/src/enums/GeometryType.ts +0 -6
- package/src/enums/ImageQualityStatus.ts +0 -37
- package/src/enums/InterpolationType.ts +0 -13
- package/src/enums/MetadataModules.ts +0 -32
- package/src/enums/OrientationAxis.ts +0 -8
- package/src/enums/RequestType.ts +0 -15
- package/src/enums/SharedArrayBufferModes.ts +0 -11
- package/src/enums/VOILUTFunctionType.ts +0 -10
- package/src/enums/VideoEnums.ts +0 -9
- package/src/enums/ViewportStatus.ts +0 -14
- package/src/enums/ViewportType.ts +0 -22
- package/src/enums/index.ts +0 -35
- package/src/eventTarget.ts +0 -144
- package/src/getEnabledElement.ts +0 -127
- package/src/global.ts +0 -8
- package/src/index.ts +0 -153
- package/src/init.ts +0 -330
- package/src/loaders/ProgressiveRetrieveImages.ts +0 -380
- package/src/loaders/configuration/interleavedRetrieve.ts +0 -96
- package/src/loaders/configuration/sequentialRetrieve.ts +0 -17
- package/src/loaders/configuration/singleRetrieve.ts +0 -18
- package/src/loaders/fillNearbyFrames.ts +0 -53
- package/src/loaders/geometryLoader.ts +0 -59
- package/src/loaders/imageLoader.ts +0 -587
- package/src/loaders/utils/contourSet/createContourSet.ts +0 -29
- package/src/loaders/utils/contourSet/validateContourSet.ts +0 -38
- package/src/loaders/utils/surface/createSurface.ts +0 -31
- package/src/loaders/utils/surface/validateSurface.ts +0 -9
- package/src/loaders/volumeLoader.ts +0 -670
- package/src/metaData.ts +0 -86
- package/src/requestPool/imageLoadPoolManager.ts +0 -43
- package/src/requestPool/imageRetrievalPoolManager.ts +0 -25
- package/src/requestPool/requestPoolManager.ts +0 -348
- package/src/types/AABB2.ts +0 -4
- package/src/types/AABB3.ts +0 -11
- package/src/types/ActorSliceRange.ts +0 -17
- package/src/types/AffineMatrix.ts +0 -8
- package/src/types/BoundsIJK.ts +0 -5
- package/src/types/BoundsLPS.ts +0 -5
- package/src/types/CPUFallbackColormap.ts +0 -23
- package/src/types/CPUFallbackColormapData.ts +0 -12
- package/src/types/CPUFallbackColormapsData.ts +0 -7
- package/src/types/CPUFallbackEnabledElement.ts +0 -41
- package/src/types/CPUFallbackLUT.ts +0 -5
- package/src/types/CPUFallbackLookupTable.ts +0 -17
- package/src/types/CPUFallbackRenderingTools.ts +0 -25
- package/src/types/CPUFallbackTransform.ts +0 -16
- package/src/types/CPUFallbackViewport.ts +0 -29
- package/src/types/CPUFallbackViewportDisplayedArea.ts +0 -15
- package/src/types/CPUIImageData.ts +0 -50
- package/src/types/Color.ts +0 -10
- package/src/types/Colormap.ts +0 -31
- package/src/types/ContourData.ts +0 -21
- package/src/types/Cornerstone3DConfig.ts +0 -73
- package/src/types/CustomEventType.ts +0 -14
- package/src/types/EventTypes.ts +0 -483
- package/src/types/FlipDirection.ts +0 -9
- package/src/types/IActor.ts +0 -37
- package/src/types/ICache.ts +0 -29
- package/src/types/ICachedGeometry.ts +0 -13
- package/src/types/ICachedImage.ts +0 -13
- package/src/types/ICachedVolume.ts +0 -12
- package/src/types/ICamera.ts +0 -36
- package/src/types/IContour.ts +0 -18
- package/src/types/IContourSet.ts +0 -59
- package/src/types/IDynamicImageVolume.ts +0 -18
- package/src/types/IEnabledElement.ts +0 -24
- package/src/types/IGeometry.ts +0 -13
- package/src/types/IImage.ts +0 -136
- package/src/types/IImageCalibration.ts +0 -41
- package/src/types/IImageData.ts +0 -49
- package/src/types/IImageVolume.ts +0 -103
- package/src/types/ILoadObject.ts +0 -36
- package/src/types/IRegisterImageLoader.ts +0 -10
- package/src/types/IRenderingEngine.ts +0 -31
- package/src/types/IRetrieveConfiguration.ts +0 -194
- package/src/types/IStackInput.ts +0 -30
- package/src/types/IStackViewport.ts +0 -3
- package/src/types/IStreamingImageVolume.ts +0 -13
- package/src/types/IStreamingVolumeProperties.ts +0 -17
- package/src/types/ISurface.ts +0 -14
- package/src/types/IVideoViewport.ts +0 -87
- package/src/types/IViewport.ts +0 -464
- package/src/types/IViewportId.ts +0 -9
- package/src/types/IVolume.ts +0 -8
- package/src/types/IVolumeInput.ts +0 -36
- package/src/types/IVolumeViewport.ts +0 -177
- package/src/types/ImageLoadListener.ts +0 -20
- package/src/types/ImageLoaderFn.ts +0 -16
- package/src/types/ImagePixelModule.ts +0 -14
- package/src/types/ImagePlaneModule.ts +0 -17
- package/src/types/ImageSliceData.ts +0 -6
- package/src/types/ImageVolumeProps.ts +0 -15
- package/src/types/Mat3.ts +0 -8
- package/src/types/Metadata.ts +0 -39
- package/src/types/OrientationVectors.ts +0 -36
- package/src/types/PixelDataTypedArray.ts +0 -15
- package/src/types/Plane.ts +0 -6
- package/src/types/Point2.ts +0 -6
- package/src/types/Point3.ts +0 -15
- package/src/types/Point4.ts +0 -6
- package/src/types/RGB.ts +0 -6
- package/src/types/ScalingParameters.ts +0 -33
- package/src/types/StackViewportProperties.ts +0 -18
- package/src/types/SurfaceData.ts +0 -15
- package/src/types/TransformMatrix2D.ts +0 -4
- package/src/types/VideoViewportProperties.ts +0 -15
- package/src/types/VideoViewportTypes.ts +0 -20
- package/src/types/ViewportInputOptions.ts +0 -25
- package/src/types/ViewportPreset.ts +0 -14
- package/src/types/ViewportProperties.ts +0 -21
- package/src/types/VolumeLoaderFn.ts +0 -18
- package/src/types/VolumeProps.ts +0 -57
- package/src/types/VolumeViewportProperties.ts +0 -16
- package/src/types/displayArea.ts +0 -42
- package/src/types/index.ts +0 -254
- package/src/types/voi.ts +0 -15
- package/src/utilities/PointsManager.ts +0 -260
- package/src/utilities/ProgressiveIterator.ts +0 -190
- package/src/utilities/RLEVoxelMap.ts +0 -331
- package/src/utilities/VoxelManager.ts +0 -483
- package/src/utilities/actorCheck.ts +0 -24
- package/src/utilities/applyPreset.ts +0 -138
- package/src/utilities/cacheUtils.ts +0 -145
- package/src/utilities/calculateViewportsSpatialRegistration.ts +0 -67
- package/src/utilities/calibratedPixelSpacingMetadataProvider.ts +0 -36
- package/src/utilities/clamp.ts +0 -5
- package/src/utilities/color.ts +0 -33
- package/src/utilities/colormap.ts +0 -111
- package/src/utilities/convertStackToVolumeViewport.ts +0 -117
- package/src/utilities/convertToGrayscale.ts +0 -27
- package/src/utilities/convertVolumeToStackViewport.ts +0 -125
- package/src/utilities/createFloat32SharedArray.ts +0 -60
- package/src/utilities/createInt16SharedArray.ts +0 -43
- package/src/utilities/createLinearRGBTransferFunction.ts +0 -22
- package/src/utilities/createSigmoidRGBTransferFunction.ts +0 -63
- package/src/utilities/createUInt16SharedArray.ts +0 -43
- package/src/utilities/createUint8SharedArray.ts +0 -45
- package/src/utilities/decimate.ts +0 -17
- package/src/utilities/deepFreeze.ts +0 -19
- package/src/utilities/deepMerge.ts +0 -86
- package/src/utilities/eventListener/MultiTargetEventListenerManager.ts +0 -90
- package/src/utilities/eventListener/TargetEventListeners.ts +0 -278
- package/src/utilities/generateVolumePropsFromImageIds.ts +0 -186
- package/src/utilities/genericMetadataProvider.ts +0 -43
- package/src/utilities/getBufferConfiguration.ts +0 -69
- package/src/utilities/getClosestImageId.ts +0 -79
- package/src/utilities/getClosestStackImageIndexForPoint.ts +0 -128
- package/src/utilities/getCurrentVolumeViewportSlice.ts +0 -166
- package/src/utilities/getImageLegacy.ts +0 -29
- package/src/utilities/getImageSliceDataForVolumeViewport.ts +0 -61
- package/src/utilities/getMinMax.ts +0 -31
- package/src/utilities/getRandomSampleFromArray.ts +0 -30
- package/src/utilities/getRuntimeId.ts +0 -56
- package/src/utilities/getScalarDataType.ts +0 -31
- package/src/utilities/getScalingParameters.ts +0 -35
- package/src/utilities/getSliceRange.ts +0 -86
- package/src/utilities/getSpacingInNormalDirection.ts +0 -44
- package/src/utilities/getTargetVolumeAndSpacingInNormalDir.ts +0 -150
- package/src/utilities/getViewportImageCornersInWorld.ts +0 -109
- package/src/utilities/getViewportImageIds.ts +0 -22
- package/src/utilities/getViewportModality.ts +0 -22
- package/src/utilities/getViewportsWithImageURI.ts +0 -39
- package/src/utilities/getViewportsWithVolumeId.ts +0 -38
- package/src/utilities/getVoiFromSigmoidRGBTransferFunction.ts +0 -23
- package/src/utilities/getVolumeActorCorners.ts +0 -24
- package/src/utilities/getVolumeId.ts +0 -16
- package/src/utilities/getVolumeSliceRangeInfo.ts +0 -60
- package/src/utilities/getVolumeViewportScrollInfo.ts +0 -41
- package/src/utilities/getVolumeViewportsContainingSameVolumes.ts +0 -58
- package/src/utilities/hasFloatScalingParameters.ts +0 -15
- package/src/utilities/hasNaNValues.ts +0 -12
- package/src/utilities/imageIdToURI.ts +0 -10
- package/src/utilities/imageRetrieveMetadataProvider.ts +0 -36
- package/src/utilities/imageToWorldCoords.ts +0 -57
- package/src/utilities/index.ts +0 -171
- package/src/utilities/indexWithinDimensions.ts +0 -27
- package/src/utilities/invertRgbTransferFunction.ts +0 -41
- package/src/utilities/isEqual.ts +0 -92
- package/src/utilities/isOpposite.ts +0 -23
- package/src/utilities/isPTPrescaledWithSUV.ts +0 -7
- package/src/utilities/isTypedArray.ts +0 -20
- package/src/utilities/isValidVolume.ts +0 -59
- package/src/utilities/isVideoTransferSyntax.ts +0 -26
- package/src/utilities/loadImageToCanvas.ts +0 -202
- package/src/utilities/makeVolumeMetadata.ts +0 -87
- package/src/utilities/planar.ts +0 -102
- package/src/utilities/renderToCanvasCPU.ts +0 -48
- package/src/utilities/renderToCanvasGPU.ts +0 -195
- package/src/utilities/roundNumber.ts +0 -57
- package/src/utilities/scaleRgbTransferFunction.ts +0 -37
- package/src/utilities/snapFocalPointToSlice.ts +0 -78
- package/src/utilities/sortImageIdsAndGetSpacing.ts +0 -180
- package/src/utilities/spatialRegistrationMetadataProvider.ts +0 -48
- package/src/utilities/transferFunctionUtils.ts +0 -27
- package/src/utilities/transformCanvasToIJK.ts +0 -18
- package/src/utilities/transformIJKToCanvas.ts +0 -18
- package/src/utilities/transformIndexToWorld.ts +0 -14
- package/src/utilities/transformWorldToIndex.ts +0 -16
- package/src/utilities/triggerEvent.ts +0 -38
- package/src/utilities/updateVTKImageDataWithCornerstoneImage.ts +0 -42
- package/src/utilities/uuidv4.ts +0 -13
- package/src/utilities/windowLevel.ts +0 -48
- package/src/utilities/worldToImageCoords.ts +0 -65
- package/src/webWorkerManager/webWorkerManager.js +0 -254
- /package/{src/utilities/eventListener/index.ts → dist/esm/utilities/eventListener/index.d.ts} +0 -0
|
@@ -1,1873 +0,0 @@
|
|
|
1
|
-
import type { vtkCamera } from '@kitware/vtk.js/Rendering/Core/Camera';
|
|
2
|
-
import vtkMatrixBuilder from '@kitware/vtk.js/Common/Core/MatrixBuilder';
|
|
3
|
-
import vtkMath from '@kitware/vtk.js/Common/Core/Math';
|
|
4
|
-
import vtkPlane from '@kitware/vtk.js/Common/DataModel/Plane';
|
|
5
|
-
|
|
6
|
-
import { vec2, vec3 } from 'gl-matrix';
|
|
7
|
-
|
|
8
|
-
import Events from '../enums/Events';
|
|
9
|
-
import ViewportStatus from '../enums/ViewportStatus';
|
|
10
|
-
import ViewportType from '../enums/ViewportType';
|
|
11
|
-
import renderingEngineCache from './renderingEngineCache';
|
|
12
|
-
import {
|
|
13
|
-
triggerEvent,
|
|
14
|
-
planar,
|
|
15
|
-
isImageActor,
|
|
16
|
-
actorIsA,
|
|
17
|
-
isEqual,
|
|
18
|
-
} from '../utilities';
|
|
19
|
-
import hasNaNValues from '../utilities/hasNaNValues';
|
|
20
|
-
import { RENDERING_DEFAULTS } from '../constants';
|
|
21
|
-
import type {
|
|
22
|
-
ICamera,
|
|
23
|
-
ActorEntry,
|
|
24
|
-
IRenderingEngine,
|
|
25
|
-
ViewportInputOptions,
|
|
26
|
-
Point2,
|
|
27
|
-
Point3,
|
|
28
|
-
FlipDirection,
|
|
29
|
-
EventTypes,
|
|
30
|
-
DisplayArea,
|
|
31
|
-
ViewPresentation,
|
|
32
|
-
ViewReference,
|
|
33
|
-
ViewportProperties,
|
|
34
|
-
} from '../types';
|
|
35
|
-
import type {
|
|
36
|
-
ViewportInput,
|
|
37
|
-
IViewport,
|
|
38
|
-
ViewReferenceSpecifier,
|
|
39
|
-
ReferenceCompatibleOptions,
|
|
40
|
-
ViewPresentationSelector,
|
|
41
|
-
} from '../types/IViewport';
|
|
42
|
-
import type { vtkSlabCamera } from './vtkClasses/vtkSlabCamera';
|
|
43
|
-
import { getConfiguration } from '../init';
|
|
44
|
-
import IImageCalibration from '../types/IImageCalibration';
|
|
45
|
-
import { InterpolationType } from '../enums';
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* An object representing a single viewport, which is a camera
|
|
49
|
-
* looking into a viewport, and an associated target output `HTMLDivElement`.
|
|
50
|
-
* Viewport is a base class that can be extended to create a specific
|
|
51
|
-
* viewport type. Both VolumeViewport and StackViewport are subclasses
|
|
52
|
-
* of Viewport. Common logic for all viewports is contained in Viewport class
|
|
53
|
-
* which is camera properties/methods, vtk.js actors, and other common
|
|
54
|
-
* logic.
|
|
55
|
-
*/
|
|
56
|
-
class Viewport implements IViewport {
|
|
57
|
-
/**
|
|
58
|
-
* CameraViewPresentation is a view preentation selector that has all the
|
|
59
|
-
* camera related presentation selections, and would typically be used for
|
|
60
|
-
* choosing presentation information between two viewports showing the same
|
|
61
|
-
* type of orientation of a view, such as the CT, PT and fusion views in the
|
|
62
|
-
* same orientation view.
|
|
63
|
-
*/
|
|
64
|
-
public static readonly CameraViewPresentation: ViewPresentationSelector = {
|
|
65
|
-
rotation: true,
|
|
66
|
-
pan: true,
|
|
67
|
-
zoom: true,
|
|
68
|
-
displayArea: true,
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* TransferViewPresentation is a view presentation selector that selects all
|
|
73
|
-
* the transfer function related attributes. It would typically be used for
|
|
74
|
-
* synchronizing different orientations of the same series, or for
|
|
75
|
-
* synchronizing two views of the same type of series such as a CT.
|
|
76
|
-
*/
|
|
77
|
-
public static readonly TransferViewPresentation: ViewPresentationSelector = {
|
|
78
|
-
windowLevel: true,
|
|
79
|
-
paletteLut: true,
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
/** unique identifier for the viewport */
|
|
83
|
-
readonly id: string;
|
|
84
|
-
/** HTML element in DOM that is used for rendering the viewport */
|
|
85
|
-
readonly element: HTMLDivElement;
|
|
86
|
-
/** an internal canvas that is created on the provided HTML element */
|
|
87
|
-
readonly canvas: HTMLCanvasElement;
|
|
88
|
-
/** RenderingEngine id that the viewport belongs to */
|
|
89
|
-
readonly renderingEngineId: string;
|
|
90
|
-
/** Type of viewport */
|
|
91
|
-
readonly type: ViewportType;
|
|
92
|
-
/**
|
|
93
|
-
* The amount by which the images are inset in a viewport by default.
|
|
94
|
-
*/
|
|
95
|
-
protected insetImageMultiplier = 1.1;
|
|
96
|
-
|
|
97
|
-
protected flipHorizontal = false;
|
|
98
|
-
protected flipVertical = false;
|
|
99
|
-
public isDisabled: boolean;
|
|
100
|
-
/** Record the rendering status, mostly for testing purposes, but can also
|
|
101
|
-
* be useful for knowing things like whether the viewport is initialized
|
|
102
|
-
*/
|
|
103
|
-
public viewportStatus: ViewportStatus = ViewportStatus.NO_DATA;
|
|
104
|
-
|
|
105
|
-
/** sx of viewport on the offscreen canvas */
|
|
106
|
-
sx: number;
|
|
107
|
-
/** sy of viewport on the offscreen canvas */
|
|
108
|
-
sy: number;
|
|
109
|
-
/** sWidth of viewport on the offscreen canvas */
|
|
110
|
-
sWidth: number;
|
|
111
|
-
/** sHeight of viewport on the offscreen canvas */
|
|
112
|
-
sHeight: number;
|
|
113
|
-
/** a Map containing the actor uid and actors */
|
|
114
|
-
_actors: Map<string, any>;
|
|
115
|
-
/** Default options for the viewport which includes orientation, viewPlaneNormal and backgroundColor */
|
|
116
|
-
readonly defaultOptions: Record<string, any>;
|
|
117
|
-
/** options for the viewport which includes orientation axis, backgroundColor and displayArea */
|
|
118
|
-
options: ViewportInputOptions;
|
|
119
|
-
/** informs if a new actor was added before a resetCameraClippingRange phase */
|
|
120
|
-
_suppressCameraModifiedEvents = false;
|
|
121
|
-
/** A flag representing if viewport methods should fire events or not */
|
|
122
|
-
readonly suppressEvents: boolean;
|
|
123
|
-
protected hasPixelSpacing = true;
|
|
124
|
-
protected calibration: IImageCalibration;
|
|
125
|
-
/** The camera that is initially defined on the reset for
|
|
126
|
-
* the relative pan/zoom
|
|
127
|
-
*/
|
|
128
|
-
protected initialCamera: ICamera;
|
|
129
|
-
/** The camera that is defined for resetting displayArea to ensure absolute displayArea
|
|
130
|
-
* settings
|
|
131
|
-
*/
|
|
132
|
-
protected fitToCanvasCamera: ICamera;
|
|
133
|
-
|
|
134
|
-
constructor(props: ViewportInput) {
|
|
135
|
-
this.id = props.id;
|
|
136
|
-
this.renderingEngineId = props.renderingEngineId;
|
|
137
|
-
this.type = props.type;
|
|
138
|
-
this.element = props.element;
|
|
139
|
-
this.canvas = props.canvas;
|
|
140
|
-
this.sx = props.sx;
|
|
141
|
-
this.sy = props.sy;
|
|
142
|
-
this.sWidth = props.sWidth;
|
|
143
|
-
this.sHeight = props.sHeight;
|
|
144
|
-
this._actors = new Map();
|
|
145
|
-
// Set data attributes for render events
|
|
146
|
-
this.element.setAttribute('data-viewport-uid', this.id);
|
|
147
|
-
this.element.setAttribute(
|
|
148
|
-
'data-rendering-engine-uid',
|
|
149
|
-
this.renderingEngineId
|
|
150
|
-
);
|
|
151
|
-
|
|
152
|
-
this.defaultOptions = structuredClone(props.defaultOptions);
|
|
153
|
-
this.suppressEvents = props.defaultOptions.suppressEvents
|
|
154
|
-
? props.defaultOptions.suppressEvents
|
|
155
|
-
: false;
|
|
156
|
-
this.options = structuredClone(props.defaultOptions);
|
|
157
|
-
this.isDisabled = false;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
getRotation: () => number;
|
|
161
|
-
getFrameOfReferenceUID: () => string;
|
|
162
|
-
canvasToWorld: (canvasPos: Point2) => Point3;
|
|
163
|
-
worldToCanvas: (worldPos: Point3) => Point2;
|
|
164
|
-
customRenderViewportToCanvas: () => unknown;
|
|
165
|
-
resize: () => void;
|
|
166
|
-
getProperties: () => ViewportProperties = () => ({});
|
|
167
|
-
updateRenderingPipeline: () => void;
|
|
168
|
-
getNumberOfSlices: () => number;
|
|
169
|
-
protected setRotation = (_rotation: number) => {
|
|
170
|
-
/*empty*/
|
|
171
|
-
};
|
|
172
|
-
|
|
173
|
-
static get useCustomRenderingPipeline(): boolean {
|
|
174
|
-
return false;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
private viewportWidgets = new Map() as Map<string, any>;
|
|
178
|
-
|
|
179
|
-
public addWidget = (widgetId, widget) => {
|
|
180
|
-
this.viewportWidgets.set(widgetId, widget);
|
|
181
|
-
};
|
|
182
|
-
|
|
183
|
-
public getWidget = (id) => {
|
|
184
|
-
return this.viewportWidgets.get(id);
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
public getWidgets = () => {
|
|
188
|
-
return Array.from(this.viewportWidgets.values());
|
|
189
|
-
};
|
|
190
|
-
|
|
191
|
-
public removeWidgets = () => {
|
|
192
|
-
const widgets = this.getWidgets();
|
|
193
|
-
widgets.forEach((widget) => {
|
|
194
|
-
if (widget.getEnabled()) {
|
|
195
|
-
widget.setEnabled(false);
|
|
196
|
-
}
|
|
197
|
-
if (widget.getActor && widget.getRenderer) {
|
|
198
|
-
const actor = widget.getActor();
|
|
199
|
-
const renderer = widget.getRenderer();
|
|
200
|
-
if (renderer && actor) {
|
|
201
|
-
renderer.removeActor(actor);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
};
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
* Indicate that the image has been rendered.
|
|
209
|
-
* This will set the viewportStatus to RENDERED if there is image data
|
|
210
|
-
* available to actually be rendered - otherwise, the rendering simply showed
|
|
211
|
-
* the background image.
|
|
212
|
-
*/
|
|
213
|
-
public setRendered() {
|
|
214
|
-
if (
|
|
215
|
-
this.viewportStatus === ViewportStatus.NO_DATA ||
|
|
216
|
-
this.viewportStatus === ViewportStatus.LOADING
|
|
217
|
-
) {
|
|
218
|
-
return;
|
|
219
|
-
}
|
|
220
|
-
this.viewportStatus = ViewportStatus.RENDERED;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
/**
|
|
224
|
-
* Returns the rendering engine driving the `Viewport`.
|
|
225
|
-
*
|
|
226
|
-
* @returns The RenderingEngine instance.
|
|
227
|
-
*/
|
|
228
|
-
public getRenderingEngine(): IRenderingEngine {
|
|
229
|
-
return renderingEngineCache.get(this.renderingEngineId);
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
/**
|
|
233
|
-
* Returns the `vtkRenderer` responsible for rendering the `Viewport`.
|
|
234
|
-
*
|
|
235
|
-
* @returns The `vtkRenderer` for the `Viewport`.
|
|
236
|
-
*/
|
|
237
|
-
public getRenderer(): any {
|
|
238
|
-
const renderingEngine = this.getRenderingEngine();
|
|
239
|
-
|
|
240
|
-
if (!renderingEngine || renderingEngine.hasBeenDestroyed) {
|
|
241
|
-
throw new Error('Rendering engine has been destroyed');
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
return renderingEngine.offscreenMultiRenderWindow.getRenderer(this.id);
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
/**
|
|
248
|
-
* Renders the `Viewport` using the `RenderingEngine`.
|
|
249
|
-
*/
|
|
250
|
-
public render(): void {
|
|
251
|
-
const renderingEngine = this.getRenderingEngine();
|
|
252
|
-
|
|
253
|
-
renderingEngine.renderViewport(this.id);
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* Sets new options and (TODO) applies them.
|
|
258
|
-
*
|
|
259
|
-
* @param options - The viewport options to set.
|
|
260
|
-
* @param immediate - If `true`, renders the viewport after the options are set.
|
|
261
|
-
*/
|
|
262
|
-
public setOptions(options: ViewportInputOptions, immediate = false): void {
|
|
263
|
-
this.options = <ViewportInputOptions>structuredClone(options);
|
|
264
|
-
|
|
265
|
-
// TODO When this is needed we need to move the camera position.
|
|
266
|
-
// We can steal some logic from the tools we build to do this.
|
|
267
|
-
if (this.options?.displayArea) {
|
|
268
|
-
this.setDisplayArea(this.options?.displayArea);
|
|
269
|
-
}
|
|
270
|
-
if (immediate) {
|
|
271
|
-
this.render();
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
/**
|
|
276
|
-
* Resets the options the `Viewport`'s `defaultOptions`
|
|
277
|
-
*
|
|
278
|
-
* @param immediate - If `true`, renders the viewport after the options are reset.
|
|
279
|
-
*/
|
|
280
|
-
public reset(immediate = false) {
|
|
281
|
-
this.options = structuredClone(this.defaultOptions);
|
|
282
|
-
|
|
283
|
-
// TODO When this is needed we need to move the camera position.
|
|
284
|
-
// We can steal some logic from the tools we build to do this.
|
|
285
|
-
|
|
286
|
-
if (immediate) {
|
|
287
|
-
this.render();
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
/**
|
|
292
|
-
* Flip the viewport on horizontal or vertical axis, this method
|
|
293
|
-
* works with vtk-js backed rendering pipeline.
|
|
294
|
-
*
|
|
295
|
-
* @param flipOptions - Flip options specifying the axis of flip
|
|
296
|
-
* * flipOptions.flipHorizontal - Flip the viewport on horizontal axis
|
|
297
|
-
* * flipOptions.flipVertical - Flip the viewport on vertical axis
|
|
298
|
-
*/
|
|
299
|
-
protected flip({ flipHorizontal, flipVertical }: FlipDirection): void {
|
|
300
|
-
const imageData = this.getDefaultImageData();
|
|
301
|
-
|
|
302
|
-
if (!imageData) {
|
|
303
|
-
return;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
const camera = this.getCamera();
|
|
307
|
-
const { viewPlaneNormal, viewUp, focalPoint, position } = camera;
|
|
308
|
-
|
|
309
|
-
const viewRight = vec3.cross(vec3.create(), viewPlaneNormal, viewUp);
|
|
310
|
-
let viewUpToSet = vec3.copy(vec3.create(), viewUp);
|
|
311
|
-
const viewPlaneNormalToSet = vec3.negate(vec3.create(), viewPlaneNormal);
|
|
312
|
-
|
|
313
|
-
// for both flip horizontal and vertical we need to move the camera to the
|
|
314
|
-
// other side of the image
|
|
315
|
-
const distance = vec3.distance(position, focalPoint);
|
|
316
|
-
|
|
317
|
-
// If the pan has been applied, we need to be able
|
|
318
|
-
// apply the pan back
|
|
319
|
-
const dimensions = imageData.getDimensions();
|
|
320
|
-
const middleIJK = dimensions.map((d) => Math.floor(d / 2));
|
|
321
|
-
|
|
322
|
-
const idx = [middleIJK[0], middleIJK[1], middleIJK[2]];
|
|
323
|
-
const centeredFocalPoint = imageData.indexToWorld(idx, vec3.create());
|
|
324
|
-
|
|
325
|
-
const resetFocalPoint = this._getFocalPointForResetCamera(
|
|
326
|
-
centeredFocalPoint as Point3,
|
|
327
|
-
camera,
|
|
328
|
-
{ resetPan: true, resetToCenter: false }
|
|
329
|
-
);
|
|
330
|
-
|
|
331
|
-
const panDir = vec3.subtract(vec3.create(), focalPoint, resetFocalPoint);
|
|
332
|
-
const panValue = vec3.length(panDir);
|
|
333
|
-
|
|
334
|
-
const getPanDir = (mirrorVec) => {
|
|
335
|
-
const panDirMirror = vec3.scale(
|
|
336
|
-
vec3.create(),
|
|
337
|
-
mirrorVec,
|
|
338
|
-
2 * vec3.dot(panDir, mirrorVec)
|
|
339
|
-
);
|
|
340
|
-
vec3.subtract(panDirMirror, panDirMirror, panDir);
|
|
341
|
-
vec3.normalize(panDirMirror, panDirMirror);
|
|
342
|
-
|
|
343
|
-
return panDirMirror;
|
|
344
|
-
};
|
|
345
|
-
|
|
346
|
-
// Flipping horizontal mean that the camera should move
|
|
347
|
-
// to the other side of the image but looking at the
|
|
348
|
-
// same direction and same focal point
|
|
349
|
-
if (flipHorizontal) {
|
|
350
|
-
// we need to apply the pan value to the new focal point but in the direction
|
|
351
|
-
// that is mirrored on the viewUp for the flip horizontal and
|
|
352
|
-
// viewRight for the flip vertical
|
|
353
|
-
|
|
354
|
-
// mirror the pan direction based on the viewUp
|
|
355
|
-
const panDirMirror = getPanDir(viewUpToSet);
|
|
356
|
-
|
|
357
|
-
// move focal point from the resetFocalPoint to the newFocalPoint
|
|
358
|
-
// based on the panDirMirror and panValue
|
|
359
|
-
const newFocalPoint = vec3.scaleAndAdd(
|
|
360
|
-
vec3.create(),
|
|
361
|
-
resetFocalPoint,
|
|
362
|
-
panDirMirror,
|
|
363
|
-
panValue
|
|
364
|
-
);
|
|
365
|
-
|
|
366
|
-
// move the camera position also the same way as the focal point
|
|
367
|
-
const newPosition = vec3.scaleAndAdd(
|
|
368
|
-
vec3.create(),
|
|
369
|
-
newFocalPoint,
|
|
370
|
-
viewPlaneNormalToSet,
|
|
371
|
-
distance
|
|
372
|
-
);
|
|
373
|
-
|
|
374
|
-
this.setCamera({
|
|
375
|
-
viewPlaneNormal: viewPlaneNormalToSet as Point3,
|
|
376
|
-
position: newPosition as Point3,
|
|
377
|
-
focalPoint: newFocalPoint as Point3,
|
|
378
|
-
});
|
|
379
|
-
|
|
380
|
-
this.flipHorizontal = !this.flipHorizontal;
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
// Flipping vertical mean that the camera should negate the view up
|
|
384
|
-
// and also move to the other side of the image but looking at the
|
|
385
|
-
if (flipVertical) {
|
|
386
|
-
viewUpToSet = vec3.negate(viewUpToSet, viewUp);
|
|
387
|
-
|
|
388
|
-
// we need to apply the pan value to the new focal point but in the direction
|
|
389
|
-
const panDirMirror = getPanDir(viewRight);
|
|
390
|
-
|
|
391
|
-
const newFocalPoint = vec3.scaleAndAdd(
|
|
392
|
-
vec3.create(),
|
|
393
|
-
resetFocalPoint,
|
|
394
|
-
panDirMirror,
|
|
395
|
-
panValue
|
|
396
|
-
);
|
|
397
|
-
|
|
398
|
-
const newPosition = vec3.scaleAndAdd(
|
|
399
|
-
vec3.create(),
|
|
400
|
-
newFocalPoint,
|
|
401
|
-
viewPlaneNormalToSet,
|
|
402
|
-
distance
|
|
403
|
-
);
|
|
404
|
-
|
|
405
|
-
this.setCamera({
|
|
406
|
-
focalPoint: newFocalPoint as Point3,
|
|
407
|
-
viewPlaneNormal: viewPlaneNormalToSet as Point3,
|
|
408
|
-
viewUp: viewUpToSet as Point3,
|
|
409
|
-
position: newPosition as Point3,
|
|
410
|
-
});
|
|
411
|
-
|
|
412
|
-
this.flipVertical = !this.flipVertical;
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
this.render();
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
private getDefaultImageData(): any {
|
|
419
|
-
const actorEntry = this.getDefaultActor();
|
|
420
|
-
|
|
421
|
-
if (actorEntry && isImageActor(actorEntry)) {
|
|
422
|
-
return actorEntry.actor.getMapper().getInputData();
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
/**
|
|
427
|
-
* Get the default actor
|
|
428
|
-
* @returns An actor entry.
|
|
429
|
-
*/
|
|
430
|
-
public getDefaultActor(): ActorEntry {
|
|
431
|
-
return this.getActors()[0];
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
/**
|
|
435
|
-
* Get all the actors in the viewport
|
|
436
|
-
* @returns An array of ActorEntry objects.
|
|
437
|
-
*/
|
|
438
|
-
public getActors(): Array<ActorEntry> {
|
|
439
|
-
return Array.from(this._actors.values());
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
/**
|
|
443
|
-
* Returns an array of unique identifiers for all the actors in the viewport.
|
|
444
|
-
* @returns An array of strings
|
|
445
|
-
*/
|
|
446
|
-
public getActorUIDs(): Array<string> {
|
|
447
|
-
return Array.from(this._actors.keys());
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
/**
|
|
451
|
-
* Get an actor by its UID
|
|
452
|
-
* @param actorUID - The unique ID of the actor.
|
|
453
|
-
* @returns An ActorEntry object.
|
|
454
|
-
*/
|
|
455
|
-
public getActor(actorUID: string): ActorEntry {
|
|
456
|
-
return this._actors.get(actorUID);
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
/**
|
|
460
|
-
* Get an actor UID by its index
|
|
461
|
-
* @param index - array index.
|
|
462
|
-
* @returns actorUID
|
|
463
|
-
*/
|
|
464
|
-
public getActorUIDByIndex(index: number): string {
|
|
465
|
-
const actor = this.getActors()[index];
|
|
466
|
-
if (actor) {
|
|
467
|
-
return actor.uid;
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
/**
|
|
472
|
-
* Get an actor by its index
|
|
473
|
-
* @param index - array index.
|
|
474
|
-
* @returns actorUID
|
|
475
|
-
*/
|
|
476
|
-
public getActorByIndex(index: number): ActorEntry {
|
|
477
|
-
return this.getActors()[index];
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
/**
|
|
481
|
-
* It removes all actors from the viewport and then adds the actors from the array.
|
|
482
|
-
* @param actors - An array of ActorEntry objects.
|
|
483
|
-
*/
|
|
484
|
-
public setActors(actors: Array<ActorEntry>): void {
|
|
485
|
-
this.removeAllActors();
|
|
486
|
-
const resetCameraPanAndZoom = true;
|
|
487
|
-
// when we set the actor we need to reset the camera to initialize the
|
|
488
|
-
// camera focal point with the bounds of the actors.
|
|
489
|
-
this.addActors(actors, resetCameraPanAndZoom);
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
/**
|
|
493
|
-
* Remove the actor from the viewport
|
|
494
|
-
* @param actorUID - The unique identifier for the actor.
|
|
495
|
-
*/
|
|
496
|
-
_removeActor(actorUID: string): void {
|
|
497
|
-
const actorEntry = this.getActor(actorUID);
|
|
498
|
-
if (!actorEntry) {
|
|
499
|
-
console.warn(`Actor ${actorUID} does not exist for this viewport`);
|
|
500
|
-
return;
|
|
501
|
-
}
|
|
502
|
-
const renderer = this.getRenderer();
|
|
503
|
-
renderer.removeViewProp(actorEntry.actor); // removeActor not implemented in vtk?
|
|
504
|
-
this._actors.delete(actorUID);
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
/**
|
|
508
|
-
* Remove the actors with the given UIDs from the viewport
|
|
509
|
-
* @param actorUIDs - An array of actor UIDs to remove.
|
|
510
|
-
*/
|
|
511
|
-
public removeActors(actorUIDs: Array<string>): void {
|
|
512
|
-
actorUIDs.forEach((actorUID) => {
|
|
513
|
-
this._removeActor(actorUID);
|
|
514
|
-
});
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
/**
|
|
518
|
-
* Add a list of actors (actor entries) to the viewport
|
|
519
|
-
* @param resetCameraPanAndZoom - force reset pan and zoom of the camera,
|
|
520
|
-
* default value is false.
|
|
521
|
-
* @param actors - An array of ActorEntry objects.
|
|
522
|
-
*/
|
|
523
|
-
public addActors(
|
|
524
|
-
actors: Array<ActorEntry>,
|
|
525
|
-
resetCameraPanAndZoom = false
|
|
526
|
-
): void {
|
|
527
|
-
const renderingEngine = this.getRenderingEngine();
|
|
528
|
-
if (!renderingEngine || renderingEngine.hasBeenDestroyed) {
|
|
529
|
-
console.warn(
|
|
530
|
-
'Viewport::addActors::Rendering engine has not been initialized or has been destroyed'
|
|
531
|
-
);
|
|
532
|
-
return;
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
actors.forEach((actor) => this.addActor(actor));
|
|
536
|
-
|
|
537
|
-
// set the clipping planes for the actors
|
|
538
|
-
this.resetCamera(resetCameraPanAndZoom, resetCameraPanAndZoom);
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
/**
|
|
542
|
-
* Add an actor to the viewport including its id, its actor and slabThickness
|
|
543
|
-
* if defined
|
|
544
|
-
* @param actorEntry - ActorEntry
|
|
545
|
-
* * actorEntry.uid - The unique identifier for the actor.
|
|
546
|
-
* * actorEntry.actor - The volume actor.
|
|
547
|
-
* * actorEntry.slabThickness - The slab thickness.
|
|
548
|
-
*/
|
|
549
|
-
public addActor(actorEntry: ActorEntry): void {
|
|
550
|
-
const { uid: actorUID, actor } = actorEntry;
|
|
551
|
-
const renderingEngine = this.getRenderingEngine();
|
|
552
|
-
|
|
553
|
-
if (!renderingEngine || renderingEngine.hasBeenDestroyed) {
|
|
554
|
-
console.warn(
|
|
555
|
-
`Cannot add actor UID of ${actorUID} Rendering Engine has been destroyed`
|
|
556
|
-
);
|
|
557
|
-
return;
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
if (!actorUID || !actor) {
|
|
561
|
-
throw new Error('Actors should have uid and vtk Actor properties');
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
if (this.getActor(actorUID)) {
|
|
565
|
-
console.warn(`Actor ${actorUID} already exists for this viewport`);
|
|
566
|
-
return;
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
const renderer = this.getRenderer();
|
|
570
|
-
renderer?.addActor(actor);
|
|
571
|
-
this._actors.set(actorUID, Object.assign({}, actorEntry));
|
|
572
|
-
|
|
573
|
-
// when we add an actor we should update the camera clipping range and
|
|
574
|
-
// clipping planes as well
|
|
575
|
-
this.updateCameraClippingPlanesAndRange();
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
/**
|
|
579
|
-
* Remove all actors from the renderer
|
|
580
|
-
*/
|
|
581
|
-
public removeAllActors(): void {
|
|
582
|
-
this.getRenderer()?.removeAllViewProps();
|
|
583
|
-
this._actors = new Map();
|
|
584
|
-
return;
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
/**
|
|
588
|
-
* Reset the camera to the default viewport camera without firing events
|
|
589
|
-
*/
|
|
590
|
-
protected resetCameraNoEvent(): void {
|
|
591
|
-
this._suppressCameraModifiedEvents = true;
|
|
592
|
-
this.resetCamera();
|
|
593
|
-
this._suppressCameraModifiedEvents = false;
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
/**
|
|
597
|
-
* Sets the camera to the default viewport camera without firing events
|
|
598
|
-
* @param camera - The camera to use for the viewport.
|
|
599
|
-
*/
|
|
600
|
-
protected setCameraNoEvent(camera: ICamera): void {
|
|
601
|
-
this._suppressCameraModifiedEvents = true;
|
|
602
|
-
this.setCamera(camera);
|
|
603
|
-
this._suppressCameraModifiedEvents = false;
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
/**
|
|
607
|
-
* Calculates the intersections between the volume's boundaries and the viewplane.
|
|
608
|
-
* 1) Determine the viewplane using the camera's ViewplaneNormal and focalPoint.
|
|
609
|
-
* 2) Using volumeBounds, calculate the line equation for the 3D volume's 12 edges.
|
|
610
|
-
* 3) Intersect each edge to the viewPlane and see whether the intersection point is inside the volume bounds.
|
|
611
|
-
* 4) Return list of intersection points
|
|
612
|
-
* It should be noted that intersection points may range from 3 to 6 points.
|
|
613
|
-
* Orthogonal views have four points of intersection.
|
|
614
|
-
*
|
|
615
|
-
* @param imageData - vtkImageData
|
|
616
|
-
* @param focalPoint - camera focal point
|
|
617
|
-
* @param normal - view plane normal
|
|
618
|
-
* @returns intersections list
|
|
619
|
-
*/
|
|
620
|
-
private _getViewImageDataIntersections(imageData, focalPoint, normal) {
|
|
621
|
-
// Viewplane equation: Ax+By+Cz=D
|
|
622
|
-
const A = normal[0];
|
|
623
|
-
const B = normal[1];
|
|
624
|
-
const C = normal[2];
|
|
625
|
-
const D = A * focalPoint[0] + B * focalPoint[1] + C * focalPoint[2];
|
|
626
|
-
|
|
627
|
-
// Computing the edges of the 3D cube
|
|
628
|
-
const bounds = imageData.getBounds();
|
|
629
|
-
const edges = this._getEdges(bounds);
|
|
630
|
-
|
|
631
|
-
const intersections = [];
|
|
632
|
-
|
|
633
|
-
for (const edge of edges) {
|
|
634
|
-
// start point: [x0, y0, z0], end point: [x1, y1, z1]
|
|
635
|
-
const [[x0, y0, z0], [x1, y1, z1]] = edge;
|
|
636
|
-
// Check if the edge is parallel to plane
|
|
637
|
-
if (A * (x1 - x0) + B * (y1 - y0) + C * (z1 - z0) === 0) {
|
|
638
|
-
continue;
|
|
639
|
-
}
|
|
640
|
-
const intersectionPoint = planar.linePlaneIntersection(
|
|
641
|
-
[x0, y0, z0],
|
|
642
|
-
[x1, y1, z1],
|
|
643
|
-
[A, B, C, D]
|
|
644
|
-
);
|
|
645
|
-
|
|
646
|
-
if (this._isInBounds(intersectionPoint, bounds)) {
|
|
647
|
-
intersections.push(intersectionPoint);
|
|
648
|
-
}
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
return intersections;
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
/**
|
|
655
|
-
* Sets the interpolation type. No-op in the base.
|
|
656
|
-
*/
|
|
657
|
-
protected setInterpolationType(_interpolationType: InterpolationType, _arg?) {
|
|
658
|
-
// No-op - just done to allow setting on the base viewport
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
/**
|
|
662
|
-
* Sets the camera to an initial bounds. If
|
|
663
|
-
* resetPan and resetZoom are true it places the focal point at the center of
|
|
664
|
-
* the volume (or slice); otherwise, only the camera zoom and camera Pan or Zoom
|
|
665
|
-
* is reset for the current view.
|
|
666
|
-
* @param displayArea - The display area of interest.
|
|
667
|
-
* @param suppressEvents - If true, don't fire displayArea event.
|
|
668
|
-
*/
|
|
669
|
-
public setDisplayArea(
|
|
670
|
-
displayArea: DisplayArea,
|
|
671
|
-
suppressEvents = false
|
|
672
|
-
): void {
|
|
673
|
-
if (!displayArea) {
|
|
674
|
-
return;
|
|
675
|
-
}
|
|
676
|
-
const { storeAsInitialCamera, type: areaType } = displayArea;
|
|
677
|
-
|
|
678
|
-
// Instead of storing the camera itself, if initial camera is set,
|
|
679
|
-
// then store the display area as the baseline display area.
|
|
680
|
-
if (storeAsInitialCamera) {
|
|
681
|
-
this.options.displayArea = displayArea;
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
// make calculations relative to the fitToCanvasCamera view
|
|
685
|
-
const { _suppressCameraModifiedEvents } = this;
|
|
686
|
-
this._suppressCameraModifiedEvents = true;
|
|
687
|
-
|
|
688
|
-
// This should only apply for storeAsInitialCamera, but the calculations
|
|
689
|
-
// currently don't quite work otherwise.
|
|
690
|
-
// TODO - fix so that the store works for existing transforms
|
|
691
|
-
this.setCamera(this.fitToCanvasCamera);
|
|
692
|
-
|
|
693
|
-
if (areaType === 'SCALE') {
|
|
694
|
-
this.setDisplayAreaScale(displayArea);
|
|
695
|
-
} else {
|
|
696
|
-
this.setInterpolationType(
|
|
697
|
-
this.getProperties()?.interpolationType || InterpolationType.LINEAR
|
|
698
|
-
);
|
|
699
|
-
this.setDisplayAreaFit(displayArea);
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
// Set the initial camera if appropriate
|
|
703
|
-
if (storeAsInitialCamera) {
|
|
704
|
-
this.initialCamera = this.getCamera();
|
|
705
|
-
}
|
|
706
|
-
|
|
707
|
-
// Restore event firing
|
|
708
|
-
this._suppressCameraModifiedEvents = _suppressCameraModifiedEvents;
|
|
709
|
-
if (!suppressEvents && !_suppressCameraModifiedEvents) {
|
|
710
|
-
const eventDetail: EventTypes.DisplayAreaModifiedEventDetail = {
|
|
711
|
-
viewportId: this.id,
|
|
712
|
-
displayArea: displayArea,
|
|
713
|
-
storeAsInitialCamera: storeAsInitialCamera,
|
|
714
|
-
};
|
|
715
|
-
|
|
716
|
-
triggerEvent(this.element, Events.DISPLAY_AREA_MODIFIED, eventDetail);
|
|
717
|
-
this.setCamera(this.getCamera());
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
/**
|
|
722
|
-
* Sets the viewport to pixel scaling mode. Pixel scaling displays
|
|
723
|
-
* 1 image pixel as 1 (or scale) physical screen pixels. That is,
|
|
724
|
-
* a 1024x512 image will be displayed with scale=2, as 2048x1024
|
|
725
|
-
* physical image pixels.
|
|
726
|
-
*
|
|
727
|
-
* @param displayArea - display area to set
|
|
728
|
-
* * displayArea.scale - the number of physical pixels to display
|
|
729
|
-
* each image pixel in. Values `< 1` mean smaller than physical,
|
|
730
|
-
* while values `> 1` mean more than one pixel. Default is 1
|
|
731
|
-
* Suggest using whole numbers or integer fractions (eg `1/3`)
|
|
732
|
-
*/
|
|
733
|
-
protected setDisplayAreaScale(displayArea: DisplayArea): void {
|
|
734
|
-
const { scale = 1 } = displayArea;
|
|
735
|
-
const canvas = this.canvas;
|
|
736
|
-
const height = canvas.height;
|
|
737
|
-
const width = canvas.width;
|
|
738
|
-
if (height < 8 || width < 8) {
|
|
739
|
-
return;
|
|
740
|
-
}
|
|
741
|
-
const imageData = this.getDefaultImageData();
|
|
742
|
-
const spacingWorld = imageData.getSpacing();
|
|
743
|
-
const spacing = spacingWorld[1];
|
|
744
|
-
// Need nearest interpolation for scale
|
|
745
|
-
this.setInterpolationType(InterpolationType.NEAREST);
|
|
746
|
-
this.setCamera({ parallelScale: (height * spacing) / (2 * scale) });
|
|
747
|
-
|
|
748
|
-
// If this is scale, then image area isn't allowed, so just delete it to be safe
|
|
749
|
-
delete displayArea.imageArea;
|
|
750
|
-
// Apply the pan values from the display area.
|
|
751
|
-
this.setDisplayAreaFit(displayArea);
|
|
752
|
-
|
|
753
|
-
// Need to ensure the focal point is aligned with the canvas size/position
|
|
754
|
-
// so that we don't get half pixel rendering, which causes additional
|
|
755
|
-
// moire patterns to be displayed.
|
|
756
|
-
// This is based on the canvas size having the center pixel be at a fractional
|
|
757
|
-
// position when the size is even, so matching a fractional position on the
|
|
758
|
-
// focal point to the center of an image pixel.
|
|
759
|
-
const { focalPoint, position, viewUp, viewPlaneNormal } = this.getCamera();
|
|
760
|
-
const focalChange = vec3.create();
|
|
761
|
-
if (canvas.height % 2) {
|
|
762
|
-
vec3.scaleAndAdd(focalChange, focalChange, viewUp, scale * 0.5 * spacing);
|
|
763
|
-
}
|
|
764
|
-
if (canvas.width % 2) {
|
|
765
|
-
const viewRight = vec3.cross(vec3.create(), viewUp, viewPlaneNormal);
|
|
766
|
-
vec3.scaleAndAdd(
|
|
767
|
-
focalChange,
|
|
768
|
-
focalChange,
|
|
769
|
-
viewRight,
|
|
770
|
-
scale * 0.5 * spacing
|
|
771
|
-
);
|
|
772
|
-
}
|
|
773
|
-
if (!focalChange[0] && !focalChange[1] && !focalChange[2]) {
|
|
774
|
-
return;
|
|
775
|
-
}
|
|
776
|
-
this.setCamera({
|
|
777
|
-
focalPoint: <Point3>vec3.add(vec3.create(), focalPoint, focalChange),
|
|
778
|
-
position: <Point3>vec3.add(vec3.create(), position, focalChange),
|
|
779
|
-
});
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
/**
|
|
783
|
-
* This applies a display area with a fit of the provided area to the
|
|
784
|
-
* available area.
|
|
785
|
-
* The zoom level is controlled by the imageArea parameter, which is a pair
|
|
786
|
-
* of percentage width in the horizontal and vertical dimension is scaled
|
|
787
|
-
* to fit the displayable area. Both values are taken into account, and the
|
|
788
|
-
* scaling is set so that both fractions of the image area are visible.
|
|
789
|
-
*
|
|
790
|
-
* The panning is controlled by the imageCanvasPoint, which has two
|
|
791
|
-
* values, teh imagePoint and the canvasPoint. They are fractional
|
|
792
|
-
* values of the image and canvas respectively, with the panning set to
|
|
793
|
-
* display the image pixel at the given fraction on top of the canvas at the
|
|
794
|
-
* given percentage. The default points are 0.5.
|
|
795
|
-
*
|
|
796
|
-
* For example, if the zoom level is [2,1], then the image is displayed
|
|
797
|
-
* such that at least twice the width is visible, and the height is visible.
|
|
798
|
-
* That will result in the image width being black, divided up on the left
|
|
799
|
-
* and right according to the imageCanvasPoint
|
|
800
|
-
*
|
|
801
|
-
* Then, if the imagePoint is [1,0] and the canvas point is [1,0], then
|
|
802
|
-
* the right most edge of the image, at the top of the image, will be
|
|
803
|
-
* displayed at the right most edge of the canvas, at the top.
|
|
804
|
-
*
|
|
805
|
-
*/
|
|
806
|
-
protected setDisplayAreaFit(displayArea: DisplayArea) {
|
|
807
|
-
const { imageArea, imageCanvasPoint } = displayArea;
|
|
808
|
-
|
|
809
|
-
const devicePixelRatio = window?.devicePixelRatio || 1;
|
|
810
|
-
const imageData = this.getDefaultImageData();
|
|
811
|
-
if (!imageData) {
|
|
812
|
-
return;
|
|
813
|
-
}
|
|
814
|
-
const canvasWidth = this.sWidth / devicePixelRatio;
|
|
815
|
-
const canvasHeight = this.sHeight / devicePixelRatio;
|
|
816
|
-
const dimensions = imageData.getDimensions();
|
|
817
|
-
const canvasZero = this.worldToCanvas(imageData.indexToWorld([0, 0, 0]));
|
|
818
|
-
const canvasEdge = this.worldToCanvas(
|
|
819
|
-
imageData.indexToWorld([
|
|
820
|
-
dimensions[0] - 1,
|
|
821
|
-
dimensions[1] - 1,
|
|
822
|
-
dimensions[2],
|
|
823
|
-
])
|
|
824
|
-
);
|
|
825
|
-
|
|
826
|
-
const canvasImage = [
|
|
827
|
-
Math.abs(canvasEdge[0] - canvasZero[0]),
|
|
828
|
-
Math.abs(canvasEdge[1] - canvasZero[1]),
|
|
829
|
-
];
|
|
830
|
-
const [imgWidth, imgHeight] = canvasImage;
|
|
831
|
-
|
|
832
|
-
if (imageArea) {
|
|
833
|
-
const [areaX, areaY] = imageArea;
|
|
834
|
-
const requireX = Math.abs((areaX * imgWidth) / canvasWidth);
|
|
835
|
-
const requireY = Math.abs((areaY * imgHeight) / canvasHeight);
|
|
836
|
-
|
|
837
|
-
const initZoom = this.getZoom();
|
|
838
|
-
const fitZoom = this.getZoom(this.fitToCanvasCamera);
|
|
839
|
-
const absZoom = Math.min(1 / requireX, 1 / requireY);
|
|
840
|
-
const applyZoom = (absZoom * initZoom) / fitZoom;
|
|
841
|
-
this.setZoom(applyZoom, false);
|
|
842
|
-
}
|
|
843
|
-
|
|
844
|
-
// getting the image info
|
|
845
|
-
// getting the image info
|
|
846
|
-
if (imageCanvasPoint) {
|
|
847
|
-
const { imagePoint, canvasPoint = imagePoint || [0.5, 0.5] } =
|
|
848
|
-
imageCanvasPoint;
|
|
849
|
-
const [canvasX, canvasY] = canvasPoint;
|
|
850
|
-
const canvasPanX = canvasWidth * (canvasX - 0.5);
|
|
851
|
-
const canvasPanY = canvasHeight * (canvasY - 0.5);
|
|
852
|
-
|
|
853
|
-
const [imageX, imageY] = imagePoint || canvasPoint;
|
|
854
|
-
const useZoom = 1;
|
|
855
|
-
const imagePanX = useZoom * imgWidth * (0.5 - imageX);
|
|
856
|
-
const imagePanY = useZoom * imgHeight * (0.5 - imageY);
|
|
857
|
-
|
|
858
|
-
const newPositionX = imagePanX + canvasPanX;
|
|
859
|
-
const newPositionY = imagePanY + canvasPanY;
|
|
860
|
-
|
|
861
|
-
const deltaPoint2: Point2 = [newPositionX, newPositionY];
|
|
862
|
-
// Use getPan from current for the setting
|
|
863
|
-
vec2.add(deltaPoint2, deltaPoint2, this.getPan());
|
|
864
|
-
// The pan is part of the display area settings, not the initial camera, so
|
|
865
|
-
// don't store as initial camera here - that breaks rotation and other changes.
|
|
866
|
-
this.setPan(deltaPoint2, false);
|
|
867
|
-
}
|
|
868
|
-
}
|
|
869
|
-
|
|
870
|
-
public getDisplayArea(): DisplayArea | undefined {
|
|
871
|
-
return this.options?.displayArea;
|
|
872
|
-
}
|
|
873
|
-
|
|
874
|
-
/**
|
|
875
|
-
* Resets the camera based on the rendering volume(s) bounds. If
|
|
876
|
-
* resetPan and resetZoom are true it places the focal point at the center of
|
|
877
|
-
* the volume (or slice); otherwise, only the camera zoom and camera Pan or Zoom
|
|
878
|
-
* is reset for the current view.
|
|
879
|
-
* @param resetPan - If true, the camera focal point is reset to the center of the volume (slice)
|
|
880
|
-
* @param resetZoom - If true, the camera zoom is reset to the default zoom
|
|
881
|
-
* @param storeAsInitialCamera - If true, reset camera is stored as the initial camera (to allow differences to
|
|
882
|
-
* be detected for pan/zoom values)
|
|
883
|
-
* @returns boolean
|
|
884
|
-
*/
|
|
885
|
-
public resetCamera(
|
|
886
|
-
resetPan = true,
|
|
887
|
-
resetZoom = true,
|
|
888
|
-
resetToCenter = true,
|
|
889
|
-
storeAsInitialCamera = true
|
|
890
|
-
): boolean {
|
|
891
|
-
const renderer = this.getRenderer();
|
|
892
|
-
|
|
893
|
-
// fix the flip right away, since we rely on the viewPlaneNormal and
|
|
894
|
-
// viewUp for later. Basically, we need to flip back if flipHorizontal
|
|
895
|
-
// is true or flipVertical is true
|
|
896
|
-
// we should use resetCamera no event here, since we don't want to fire
|
|
897
|
-
// camera modified events yet since a proper one will be fired later down
|
|
898
|
-
// below
|
|
899
|
-
this.setCameraNoEvent({
|
|
900
|
-
flipHorizontal: false,
|
|
901
|
-
flipVertical: false,
|
|
902
|
-
});
|
|
903
|
-
|
|
904
|
-
const previousCamera = structuredClone(this.getCamera());
|
|
905
|
-
const bounds = renderer.computeVisiblePropBounds();
|
|
906
|
-
const focalPoint = <Point3>[0, 0, 0];
|
|
907
|
-
const imageData = this.getDefaultImageData();
|
|
908
|
-
|
|
909
|
-
// The bounds are used to set the clipping view, which is then used to
|
|
910
|
-
// figure out the center point of each image. This needs to be the depth
|
|
911
|
-
// center, so the bounds need to be extended by the spacing such that the
|
|
912
|
-
// depth center is in the middle of each image.
|
|
913
|
-
if (imageData) {
|
|
914
|
-
const spc = imageData.getSpacing();
|
|
915
|
-
|
|
916
|
-
bounds[0] = bounds[0] + spc[0] / 2;
|
|
917
|
-
bounds[1] = bounds[1] - spc[0] / 2;
|
|
918
|
-
bounds[2] = bounds[2] + spc[1] / 2;
|
|
919
|
-
bounds[3] = bounds[3] - spc[1] / 2;
|
|
920
|
-
bounds[4] = bounds[4] + spc[2] / 2;
|
|
921
|
-
bounds[5] = bounds[5] - spc[2] / 2;
|
|
922
|
-
}
|
|
923
|
-
|
|
924
|
-
const activeCamera = this.getVtkActiveCamera();
|
|
925
|
-
const viewPlaneNormal = <Point3>activeCamera.getViewPlaneNormal();
|
|
926
|
-
const viewUp = <Point3>activeCamera.getViewUp();
|
|
927
|
-
|
|
928
|
-
// Reset the perspective zoom factors, otherwise subsequent zooms will cause
|
|
929
|
-
// the view angle to become very small and cause bad depth sorting.
|
|
930
|
-
// todo: parallel projection only
|
|
931
|
-
|
|
932
|
-
focalPoint[0] = (bounds[0] + bounds[1]) / 2.0;
|
|
933
|
-
focalPoint[1] = (bounds[2] + bounds[3]) / 2.0;
|
|
934
|
-
focalPoint[2] = (bounds[4] + bounds[5]) / 2.0;
|
|
935
|
-
|
|
936
|
-
if (imageData) {
|
|
937
|
-
const dimensions = imageData.getDimensions();
|
|
938
|
-
// TODO: This should be the line below, but that causes issues with existing
|
|
939
|
-
// tests. Not doing that adds significant fuzziness on rendering, so at
|
|
940
|
-
// some point it should be fixed.
|
|
941
|
-
// const middleIJK = dimensions.map((d) => Math.floor((d-1) / 2));
|
|
942
|
-
const middleIJK = dimensions.map((d) => Math.floor(d / 2));
|
|
943
|
-
|
|
944
|
-
const idx = [middleIJK[0], middleIJK[1], middleIJK[2]];
|
|
945
|
-
// Modifies the focal point in place, as this hits the vtk indexToWorld function
|
|
946
|
-
imageData.indexToWorld(idx, focalPoint);
|
|
947
|
-
}
|
|
948
|
-
|
|
949
|
-
const { widthWorld, heightWorld } =
|
|
950
|
-
this._getWorldDistanceViewUpAndViewRight(bounds, viewUp, viewPlaneNormal);
|
|
951
|
-
|
|
952
|
-
const canvasSize = [this.sWidth, this.sHeight];
|
|
953
|
-
|
|
954
|
-
const boundsAspectRatio = widthWorld / heightWorld;
|
|
955
|
-
const canvasAspectRatio = canvasSize[0] / canvasSize[1];
|
|
956
|
-
|
|
957
|
-
const scaleFactor = boundsAspectRatio / canvasAspectRatio;
|
|
958
|
-
|
|
959
|
-
const parallelScale =
|
|
960
|
-
scaleFactor < 1 // can fit full height, so use it.
|
|
961
|
-
? (this.insetImageMultiplier * heightWorld) / 2
|
|
962
|
-
: (this.insetImageMultiplier * heightWorld * scaleFactor) / 2;
|
|
963
|
-
|
|
964
|
-
// If we have just a single point, pick a radius of 1.0
|
|
965
|
-
// compute the radius of the enclosing sphere
|
|
966
|
-
// For 3D viewport, we should increase the radius to make sure the whole
|
|
967
|
-
// volume is visible and we don't get clipping artifacts.
|
|
968
|
-
const radius =
|
|
969
|
-
Viewport.boundsRadius(bounds) *
|
|
970
|
-
(this.type === ViewportType.VOLUME_3D ? 10 : 1);
|
|
971
|
-
|
|
972
|
-
const distance = this.insetImageMultiplier * radius;
|
|
973
|
-
|
|
974
|
-
const viewUpToSet: Point3 =
|
|
975
|
-
Math.abs(vtkMath.dot(viewUp, viewPlaneNormal)) > 0.999
|
|
976
|
-
? [-viewUp[2], viewUp[0], viewUp[1]]
|
|
977
|
-
: viewUp;
|
|
978
|
-
|
|
979
|
-
const focalPointToSet = this._getFocalPointForResetCamera(
|
|
980
|
-
focalPoint,
|
|
981
|
-
previousCamera,
|
|
982
|
-
{ resetPan, resetToCenter }
|
|
983
|
-
);
|
|
984
|
-
|
|
985
|
-
const positionToSet: Point3 = [
|
|
986
|
-
focalPointToSet[0] + distance * viewPlaneNormal[0],
|
|
987
|
-
focalPointToSet[1] + distance * viewPlaneNormal[1],
|
|
988
|
-
focalPointToSet[2] + distance * viewPlaneNormal[2],
|
|
989
|
-
];
|
|
990
|
-
|
|
991
|
-
renderer.resetCameraClippingRange(bounds);
|
|
992
|
-
|
|
993
|
-
const clippingRangeToUse: Point2 = [
|
|
994
|
-
-RENDERING_DEFAULTS.MAXIMUM_RAY_DISTANCE,
|
|
995
|
-
RENDERING_DEFAULTS.MAXIMUM_RAY_DISTANCE,
|
|
996
|
-
];
|
|
997
|
-
|
|
998
|
-
activeCamera.setPhysicalScale(radius);
|
|
999
|
-
activeCamera.setPhysicalTranslation(
|
|
1000
|
-
-focalPointToSet[0],
|
|
1001
|
-
-focalPointToSet[1],
|
|
1002
|
-
-focalPointToSet[2]
|
|
1003
|
-
);
|
|
1004
|
-
|
|
1005
|
-
this.setCamera({
|
|
1006
|
-
parallelScale: resetZoom ? parallelScale : previousCamera.parallelScale,
|
|
1007
|
-
focalPoint: focalPointToSet,
|
|
1008
|
-
position: positionToSet,
|
|
1009
|
-
viewAngle: 90,
|
|
1010
|
-
viewUp: viewUpToSet,
|
|
1011
|
-
clippingRange: clippingRangeToUse,
|
|
1012
|
-
});
|
|
1013
|
-
|
|
1014
|
-
const modifiedCamera = structuredClone(this.getCamera());
|
|
1015
|
-
|
|
1016
|
-
this.setFitToCanvasCamera(structuredClone(this.getCamera()));
|
|
1017
|
-
|
|
1018
|
-
if (storeAsInitialCamera) {
|
|
1019
|
-
this.setInitialCamera(modifiedCamera);
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1022
|
-
if (resetZoom) {
|
|
1023
|
-
this.setZoom(1, storeAsInitialCamera);
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
|
-
const RESET_CAMERA_EVENT = {
|
|
1027
|
-
type: 'ResetCameraEvent',
|
|
1028
|
-
renderer,
|
|
1029
|
-
};
|
|
1030
|
-
|
|
1031
|
-
// Here to let parallel/distributed compositing intercept
|
|
1032
|
-
// and do the right thing.
|
|
1033
|
-
renderer.invokeEvent(RESET_CAMERA_EVENT);
|
|
1034
|
-
|
|
1035
|
-
this.triggerCameraModifiedEventIfNecessary(previousCamera, modifiedCamera);
|
|
1036
|
-
|
|
1037
|
-
if (
|
|
1038
|
-
imageData &&
|
|
1039
|
-
this.options?.displayArea &&
|
|
1040
|
-
resetZoom &&
|
|
1041
|
-
resetPan &&
|
|
1042
|
-
resetToCenter
|
|
1043
|
-
) {
|
|
1044
|
-
this.setDisplayArea(this.options?.displayArea);
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1047
|
-
return true;
|
|
1048
|
-
}
|
|
1049
|
-
|
|
1050
|
-
/**
|
|
1051
|
-
* Sets the provided camera as the initial camera.
|
|
1052
|
-
* This allows computing differences applied later as compared to the initial
|
|
1053
|
-
* position, for things like zoom and pan.
|
|
1054
|
-
* @param camera - to store as the initial value.
|
|
1055
|
-
*/
|
|
1056
|
-
protected setInitialCamera(camera: ICamera): void {
|
|
1057
|
-
this.initialCamera = camera;
|
|
1058
|
-
}
|
|
1059
|
-
|
|
1060
|
-
/**
|
|
1061
|
-
* Sets the provided camera as the displayArea camera.
|
|
1062
|
-
* This allows computing differences applied later as compared to the initial
|
|
1063
|
-
* position, for things like zoom and pan.
|
|
1064
|
-
* @param camera - to store as the initial value.
|
|
1065
|
-
*/
|
|
1066
|
-
protected setFitToCanvasCamera(camera: ICamera): void {
|
|
1067
|
-
this.fitToCanvasCamera = camera;
|
|
1068
|
-
}
|
|
1069
|
-
|
|
1070
|
-
/**
|
|
1071
|
-
* Helper function to return the current canvas pan value.
|
|
1072
|
-
*
|
|
1073
|
-
* @returns a Point2 containing the current pan values
|
|
1074
|
-
* on the canvas,
|
|
1075
|
-
* computed from the current camera, where the initial pan
|
|
1076
|
-
* value is [0,0].
|
|
1077
|
-
*/
|
|
1078
|
-
public getPan(initialCamera = this.initialCamera): Point2 {
|
|
1079
|
-
const activeCamera = this.getVtkActiveCamera();
|
|
1080
|
-
const focalPoint = activeCamera.getFocalPoint() as Point3;
|
|
1081
|
-
|
|
1082
|
-
const zero3 = this.canvasToWorld([0, 0]);
|
|
1083
|
-
const initialCanvasFocal = this.worldToCanvas(
|
|
1084
|
-
<Point3>vec3.subtract([0, 0, 0], initialCamera.focalPoint, zero3)
|
|
1085
|
-
);
|
|
1086
|
-
const currentCanvasFocal = this.worldToCanvas(
|
|
1087
|
-
<Point3>vec3.subtract([0, 0, 0], focalPoint, zero3)
|
|
1088
|
-
);
|
|
1089
|
-
const result = <Point2>(
|
|
1090
|
-
vec2.subtract([0, 0], initialCanvasFocal, currentCanvasFocal)
|
|
1091
|
-
);
|
|
1092
|
-
return result;
|
|
1093
|
-
}
|
|
1094
|
-
|
|
1095
|
-
public getCurrentImageIdIndex(): number {
|
|
1096
|
-
throw new Error('Not implemented');
|
|
1097
|
-
}
|
|
1098
|
-
|
|
1099
|
-
public getSliceIndex(): number {
|
|
1100
|
-
throw new Error('Not implemented');
|
|
1101
|
-
}
|
|
1102
|
-
|
|
1103
|
-
/**
|
|
1104
|
-
* Gets a referenced image url of some sort - could be a real image id, or
|
|
1105
|
-
* could be a URL with parameters. Regardless it refers to the currently displaying
|
|
1106
|
-
* image as a string value.
|
|
1107
|
-
*/
|
|
1108
|
-
public getReferenceId(_specifier?: ViewReferenceSpecifier): string {
|
|
1109
|
-
return null;
|
|
1110
|
-
}
|
|
1111
|
-
|
|
1112
|
-
/**
|
|
1113
|
-
* Sets the canvas pan value relative to the initial view position of 0,0
|
|
1114
|
-
* Modifies the camera to perform the pan.
|
|
1115
|
-
*/
|
|
1116
|
-
public setPan(pan: Point2, storeAsInitialCamera = false): void {
|
|
1117
|
-
const previousCamera = this.getCamera();
|
|
1118
|
-
const { focalPoint, position } = previousCamera;
|
|
1119
|
-
const zero3 = this.canvasToWorld([0, 0]);
|
|
1120
|
-
const delta2 = vec2.subtract([0, 0], pan, this.getPan());
|
|
1121
|
-
if (
|
|
1122
|
-
Math.abs(delta2[0]) < 1 &&
|
|
1123
|
-
Math.abs(delta2[1]) < 1 &&
|
|
1124
|
-
!storeAsInitialCamera
|
|
1125
|
-
) {
|
|
1126
|
-
return;
|
|
1127
|
-
}
|
|
1128
|
-
const delta = vec3.subtract(
|
|
1129
|
-
vec3.create(),
|
|
1130
|
-
this.canvasToWorld(<Point2>delta2),
|
|
1131
|
-
zero3
|
|
1132
|
-
);
|
|
1133
|
-
const newFocal = vec3.subtract(vec3.create(), focalPoint, delta);
|
|
1134
|
-
const newPosition = vec3.subtract(vec3.create(), position, delta);
|
|
1135
|
-
this.setCamera(
|
|
1136
|
-
{
|
|
1137
|
-
...previousCamera,
|
|
1138
|
-
focalPoint: newFocal as Point3,
|
|
1139
|
-
position: newPosition as Point3,
|
|
1140
|
-
},
|
|
1141
|
-
storeAsInitialCamera
|
|
1142
|
-
);
|
|
1143
|
-
}
|
|
1144
|
-
|
|
1145
|
-
/**
|
|
1146
|
-
* Returns a current zoom level relative to the initial parallel scale
|
|
1147
|
-
* originally applied to the image. That is, on initial display,
|
|
1148
|
-
* the zoom level is 1. Computed as a function of the camera.
|
|
1149
|
-
*/
|
|
1150
|
-
public getZoom(compareCamera = this.initialCamera): number {
|
|
1151
|
-
if (!compareCamera) {
|
|
1152
|
-
return 1;
|
|
1153
|
-
}
|
|
1154
|
-
|
|
1155
|
-
const activeCamera = this.getVtkActiveCamera();
|
|
1156
|
-
const { parallelScale: initialParallelScale } = compareCamera;
|
|
1157
|
-
return initialParallelScale / activeCamera.getParallelScale();
|
|
1158
|
-
}
|
|
1159
|
-
|
|
1160
|
-
/** Zooms the image using parallel scale by updating the camera value.
|
|
1161
|
-
* @param value - The relative parallel scale to apply. It is relative
|
|
1162
|
-
* to the initial offsets value.
|
|
1163
|
-
* @param storeAsInitialCamera - can be set to true to reset the camera
|
|
1164
|
-
* after applying this zoom as the initial camera. A subsequent getZoom
|
|
1165
|
-
* call will return "1", but the zoom will have been applied.
|
|
1166
|
-
*/
|
|
1167
|
-
public setZoom(value: number, storeAsInitialCamera = false): void {
|
|
1168
|
-
const camera = this.getCamera();
|
|
1169
|
-
const { parallelScale: initialParallelScale } = this.initialCamera;
|
|
1170
|
-
const parallelScale = initialParallelScale / value;
|
|
1171
|
-
if (camera.parallelScale === parallelScale && !storeAsInitialCamera) {
|
|
1172
|
-
return;
|
|
1173
|
-
}
|
|
1174
|
-
this.setCamera(
|
|
1175
|
-
{
|
|
1176
|
-
...camera,
|
|
1177
|
-
parallelScale,
|
|
1178
|
-
},
|
|
1179
|
-
storeAsInitialCamera
|
|
1180
|
-
);
|
|
1181
|
-
}
|
|
1182
|
-
|
|
1183
|
-
/**
|
|
1184
|
-
* Because the focalPoint is always in the centre of the viewport,
|
|
1185
|
-
* we must do planar computations if the frame (image "slice") is to be preserved.
|
|
1186
|
-
* 1. Calculate the intersection of the view plane with the imageData
|
|
1187
|
-
* which results in points of intersection (minimum of 3, maximum of 6)
|
|
1188
|
-
* 2. Calculate average of the intersection points to get newFocalPoint
|
|
1189
|
-
* 3. Set the new focalPoint
|
|
1190
|
-
* @param imageData - imageData
|
|
1191
|
-
* @returns focalPoint
|
|
1192
|
-
*/
|
|
1193
|
-
private _getFocalPointForViewPlaneReset(imageData) {
|
|
1194
|
-
// Todo: move some where else
|
|
1195
|
-
const { focalPoint, viewPlaneNormal: normal } = this.getCamera();
|
|
1196
|
-
const intersections = this._getViewImageDataIntersections(
|
|
1197
|
-
imageData,
|
|
1198
|
-
focalPoint,
|
|
1199
|
-
normal
|
|
1200
|
-
);
|
|
1201
|
-
|
|
1202
|
-
let x = 0;
|
|
1203
|
-
let y = 0;
|
|
1204
|
-
let z = 0;
|
|
1205
|
-
|
|
1206
|
-
intersections.forEach(([point_x, point_y, point_z]) => {
|
|
1207
|
-
x += point_x;
|
|
1208
|
-
y += point_y;
|
|
1209
|
-
z += point_z;
|
|
1210
|
-
});
|
|
1211
|
-
|
|
1212
|
-
const newFocalPoint = <Point3>[
|
|
1213
|
-
x / intersections.length,
|
|
1214
|
-
y / intersections.length,
|
|
1215
|
-
z / intersections.length,
|
|
1216
|
-
];
|
|
1217
|
-
// Set the focal point on the average of the intersection points
|
|
1218
|
-
return newFocalPoint;
|
|
1219
|
-
}
|
|
1220
|
-
|
|
1221
|
-
/**
|
|
1222
|
-
* Gets the target output canvas for the `Viewport`.
|
|
1223
|
-
*
|
|
1224
|
-
* @returns an HTMLCanvasElement.
|
|
1225
|
-
*/
|
|
1226
|
-
public getCanvas(): HTMLCanvasElement {
|
|
1227
|
-
return <HTMLCanvasElement>this.canvas;
|
|
1228
|
-
}
|
|
1229
|
-
/**
|
|
1230
|
-
* Gets the active vtkCamera for the viewport.
|
|
1231
|
-
*
|
|
1232
|
-
* @returns vtk driven camera
|
|
1233
|
-
*/
|
|
1234
|
-
protected getVtkActiveCamera(): vtkCamera | vtkSlabCamera {
|
|
1235
|
-
const renderer = this.getRenderer();
|
|
1236
|
-
|
|
1237
|
-
return renderer.getActiveCamera();
|
|
1238
|
-
}
|
|
1239
|
-
|
|
1240
|
-
/**
|
|
1241
|
-
* Get the camera's current state
|
|
1242
|
-
* @returns The camera object.
|
|
1243
|
-
*/
|
|
1244
|
-
public getCamera(): ICamera {
|
|
1245
|
-
const vtkCamera = this.getVtkActiveCamera();
|
|
1246
|
-
|
|
1247
|
-
return {
|
|
1248
|
-
viewUp: <Point3>vtkCamera.getViewUp(),
|
|
1249
|
-
viewPlaneNormal: <Point3>vtkCamera.getViewPlaneNormal(),
|
|
1250
|
-
position: <Point3>vtkCamera.getPosition(),
|
|
1251
|
-
focalPoint: <Point3>vtkCamera.getFocalPoint(),
|
|
1252
|
-
parallelProjection: vtkCamera.getParallelProjection(),
|
|
1253
|
-
parallelScale: vtkCamera.getParallelScale(),
|
|
1254
|
-
viewAngle: vtkCamera.getViewAngle(),
|
|
1255
|
-
flipHorizontal: this.flipHorizontal,
|
|
1256
|
-
flipVertical: this.flipVertical,
|
|
1257
|
-
};
|
|
1258
|
-
}
|
|
1259
|
-
|
|
1260
|
-
/**
|
|
1261
|
-
* Set the camera parameters
|
|
1262
|
-
* @param cameraInterface - ICamera
|
|
1263
|
-
* @param storeAsInitialCamera - to set the provided camera as the initial one,
|
|
1264
|
-
* used to compute differences for things like pan and zoom.
|
|
1265
|
-
*/
|
|
1266
|
-
public setCamera(
|
|
1267
|
-
cameraInterface: ICamera,
|
|
1268
|
-
storeAsInitialCamera = false
|
|
1269
|
-
): void {
|
|
1270
|
-
const vtkCamera = this.getVtkActiveCamera();
|
|
1271
|
-
const previousCamera = structuredClone(this.getCamera());
|
|
1272
|
-
const updatedCamera = Object.assign({}, previousCamera, cameraInterface);
|
|
1273
|
-
const {
|
|
1274
|
-
viewUp,
|
|
1275
|
-
viewPlaneNormal,
|
|
1276
|
-
position,
|
|
1277
|
-
focalPoint,
|
|
1278
|
-
parallelScale,
|
|
1279
|
-
viewAngle,
|
|
1280
|
-
flipHorizontal,
|
|
1281
|
-
flipVertical,
|
|
1282
|
-
clippingRange,
|
|
1283
|
-
} = cameraInterface;
|
|
1284
|
-
|
|
1285
|
-
// Note: Flip camera should be two separate calls since
|
|
1286
|
-
// for flip, we need to flip the viewportNormal, and if
|
|
1287
|
-
// flipHorizontal, and flipVertical are both true, that would
|
|
1288
|
-
// the logic would be incorrect. So instead, we handle flip Horizontal
|
|
1289
|
-
// and flipVertical separately.
|
|
1290
|
-
if (flipHorizontal !== undefined) {
|
|
1291
|
-
// flip if not flipped but requested to flip OR if flipped but requested to
|
|
1292
|
-
// not flip
|
|
1293
|
-
const flipH =
|
|
1294
|
-
(flipHorizontal && !this.flipHorizontal) ||
|
|
1295
|
-
(!flipHorizontal && this.flipHorizontal);
|
|
1296
|
-
|
|
1297
|
-
if (flipH) {
|
|
1298
|
-
this.flip({ flipHorizontal: flipH });
|
|
1299
|
-
}
|
|
1300
|
-
}
|
|
1301
|
-
|
|
1302
|
-
if (flipVertical !== undefined) {
|
|
1303
|
-
const flipV =
|
|
1304
|
-
(flipVertical && !this.flipVertical) ||
|
|
1305
|
-
(!flipVertical && this.flipVertical);
|
|
1306
|
-
|
|
1307
|
-
if (flipV) {
|
|
1308
|
-
this.flip({ flipVertical: flipV });
|
|
1309
|
-
}
|
|
1310
|
-
}
|
|
1311
|
-
|
|
1312
|
-
if (viewUp !== undefined) {
|
|
1313
|
-
vtkCamera.setViewUp(viewUp);
|
|
1314
|
-
}
|
|
1315
|
-
|
|
1316
|
-
if (viewPlaneNormal !== undefined) {
|
|
1317
|
-
vtkCamera.setDirectionOfProjection(
|
|
1318
|
-
-viewPlaneNormal[0],
|
|
1319
|
-
-viewPlaneNormal[1],
|
|
1320
|
-
-viewPlaneNormal[2]
|
|
1321
|
-
);
|
|
1322
|
-
}
|
|
1323
|
-
|
|
1324
|
-
if (position !== undefined) {
|
|
1325
|
-
vtkCamera.setPosition(...position);
|
|
1326
|
-
}
|
|
1327
|
-
|
|
1328
|
-
if (focalPoint !== undefined) {
|
|
1329
|
-
vtkCamera.setFocalPoint(...focalPoint);
|
|
1330
|
-
}
|
|
1331
|
-
|
|
1332
|
-
if (parallelScale !== undefined) {
|
|
1333
|
-
vtkCamera.setParallelScale(parallelScale);
|
|
1334
|
-
}
|
|
1335
|
-
|
|
1336
|
-
if (viewAngle !== undefined) {
|
|
1337
|
-
vtkCamera.setViewAngle(viewAngle);
|
|
1338
|
-
}
|
|
1339
|
-
|
|
1340
|
-
if (clippingRange !== undefined) {
|
|
1341
|
-
vtkCamera.setClippingRange(clippingRange);
|
|
1342
|
-
}
|
|
1343
|
-
|
|
1344
|
-
// update clipping range only if focal point changed of a new actor is added
|
|
1345
|
-
const prevFocalPoint = previousCamera.focalPoint;
|
|
1346
|
-
const prevViewUp = previousCamera.viewUp;
|
|
1347
|
-
|
|
1348
|
-
if ((prevFocalPoint && focalPoint) || (prevViewUp && viewUp)) {
|
|
1349
|
-
const currentViewPlaneNormal = <Point3>vtkCamera.getViewPlaneNormal();
|
|
1350
|
-
const currentViewUp = <Point3>vtkCamera.getViewUp();
|
|
1351
|
-
|
|
1352
|
-
let cameraModifiedOutOfPlane = false;
|
|
1353
|
-
let viewUpHasChanged = false;
|
|
1354
|
-
|
|
1355
|
-
if (focalPoint) {
|
|
1356
|
-
const deltaCamera = <Point3>[
|
|
1357
|
-
focalPoint[0] - prevFocalPoint[0],
|
|
1358
|
-
focalPoint[1] - prevFocalPoint[1],
|
|
1359
|
-
focalPoint[2] - prevFocalPoint[2],
|
|
1360
|
-
];
|
|
1361
|
-
|
|
1362
|
-
cameraModifiedOutOfPlane =
|
|
1363
|
-
Math.abs(vtkMath.dot(deltaCamera, currentViewPlaneNormal)) > 0;
|
|
1364
|
-
}
|
|
1365
|
-
|
|
1366
|
-
if (viewUp) {
|
|
1367
|
-
viewUpHasChanged = !isEqual(currentViewUp, prevViewUp);
|
|
1368
|
-
}
|
|
1369
|
-
|
|
1370
|
-
// only modify the clipping planes if the camera is modified out of plane
|
|
1371
|
-
// or a new actor is added and we need to update the clipping planes
|
|
1372
|
-
if (cameraModifiedOutOfPlane || viewUpHasChanged) {
|
|
1373
|
-
const actorEntry = this.getDefaultActor();
|
|
1374
|
-
if (!actorEntry?.actor) {
|
|
1375
|
-
return;
|
|
1376
|
-
}
|
|
1377
|
-
|
|
1378
|
-
if (!actorIsA(actorEntry, 'vtkActor')) {
|
|
1379
|
-
this.updateClippingPlanesForActors(updatedCamera);
|
|
1380
|
-
}
|
|
1381
|
-
|
|
1382
|
-
if (
|
|
1383
|
-
actorIsA(actorEntry, 'vtkImageSlice') ||
|
|
1384
|
-
this.type === ViewportType.VOLUME_3D
|
|
1385
|
-
) {
|
|
1386
|
-
const renderer = this.getRenderer();
|
|
1387
|
-
renderer.resetCameraClippingRange();
|
|
1388
|
-
}
|
|
1389
|
-
}
|
|
1390
|
-
}
|
|
1391
|
-
|
|
1392
|
-
if (storeAsInitialCamera) {
|
|
1393
|
-
this.setInitialCamera(updatedCamera);
|
|
1394
|
-
}
|
|
1395
|
-
|
|
1396
|
-
this.triggerCameraModifiedEventIfNecessary(
|
|
1397
|
-
previousCamera,
|
|
1398
|
-
this.getCamera()
|
|
1399
|
-
);
|
|
1400
|
-
}
|
|
1401
|
-
|
|
1402
|
-
/**
|
|
1403
|
-
* Trigger camera modified event
|
|
1404
|
-
* @param cameraInterface - ICamera
|
|
1405
|
-
* @param cameraInterface - ICamera
|
|
1406
|
-
*/
|
|
1407
|
-
public triggerCameraModifiedEventIfNecessary(
|
|
1408
|
-
previousCamera: ICamera,
|
|
1409
|
-
updatedCamera: ICamera
|
|
1410
|
-
): void {
|
|
1411
|
-
if (!this._suppressCameraModifiedEvents && !this.suppressEvents) {
|
|
1412
|
-
const eventDetail: EventTypes.CameraModifiedEventDetail = {
|
|
1413
|
-
previousCamera,
|
|
1414
|
-
camera: updatedCamera,
|
|
1415
|
-
element: this.element,
|
|
1416
|
-
viewportId: this.id,
|
|
1417
|
-
renderingEngineId: this.renderingEngineId,
|
|
1418
|
-
rotation: this.getRotation(),
|
|
1419
|
-
};
|
|
1420
|
-
|
|
1421
|
-
triggerEvent(this.element, Events.CAMERA_MODIFIED, eventDetail);
|
|
1422
|
-
}
|
|
1423
|
-
}
|
|
1424
|
-
|
|
1425
|
-
/**
|
|
1426
|
-
* Updates the camera's clipping planes and range.
|
|
1427
|
-
*/
|
|
1428
|
-
public updateCameraClippingPlanesAndRange(): void {
|
|
1429
|
-
const currentCamera = this.getCamera();
|
|
1430
|
-
this.updateClippingPlanesForActors(currentCamera);
|
|
1431
|
-
this.getRenderer().resetCameraClippingRange();
|
|
1432
|
-
}
|
|
1433
|
-
|
|
1434
|
-
/**
|
|
1435
|
-
* Updates the actors clipping planes orientation from the camera properties
|
|
1436
|
-
* @param updatedCamera - ICamera
|
|
1437
|
-
*/
|
|
1438
|
-
protected async updateClippingPlanesForActors(
|
|
1439
|
-
updatedCamera: ICamera
|
|
1440
|
-
): Promise<void> {
|
|
1441
|
-
const actorEntries = this.getActors();
|
|
1442
|
-
// Todo: this was using an async and promise wait all because of the
|
|
1443
|
-
// new surface rendering use case, which broke the more important 3D
|
|
1444
|
-
// volume rendering, so reverting this back for now until I can figure
|
|
1445
|
-
// out a better way to handle this.
|
|
1446
|
-
actorEntries.map((actorEntry) => {
|
|
1447
|
-
// we assume that the first two clipping plane of the mapper are always
|
|
1448
|
-
// the 'camera' clipping. Update clipping planes only if the actor is
|
|
1449
|
-
// a vtkVolume
|
|
1450
|
-
if (!actorEntry.actor) {
|
|
1451
|
-
return;
|
|
1452
|
-
}
|
|
1453
|
-
|
|
1454
|
-
const mapper = actorEntry.actor.getMapper();
|
|
1455
|
-
let vtkPlanes = actorEntry?.clippingFilter
|
|
1456
|
-
? actorEntry.clippingFilter.getClippingPlanes()
|
|
1457
|
-
: mapper.getClippingPlanes();
|
|
1458
|
-
|
|
1459
|
-
if (vtkPlanes.length === 0 && actorEntry?.clippingFilter) {
|
|
1460
|
-
vtkPlanes = [vtkPlane.newInstance(), vtkPlane.newInstance()];
|
|
1461
|
-
}
|
|
1462
|
-
|
|
1463
|
-
let slabThickness = RENDERING_DEFAULTS.MINIMUM_SLAB_THICKNESS;
|
|
1464
|
-
if (actorEntry.slabThickness) {
|
|
1465
|
-
slabThickness = actorEntry.slabThickness;
|
|
1466
|
-
}
|
|
1467
|
-
|
|
1468
|
-
const { viewPlaneNormal, focalPoint } = updatedCamera;
|
|
1469
|
-
|
|
1470
|
-
this.setOrientationOfClippingPlanes(
|
|
1471
|
-
vtkPlanes,
|
|
1472
|
-
slabThickness,
|
|
1473
|
-
viewPlaneNormal,
|
|
1474
|
-
focalPoint
|
|
1475
|
-
);
|
|
1476
|
-
triggerEvent(this.element, Events.CLIPPING_PLANES_UPDATED, {
|
|
1477
|
-
actorEntry,
|
|
1478
|
-
focalPoint,
|
|
1479
|
-
vtkPlanes,
|
|
1480
|
-
viewport: this,
|
|
1481
|
-
});
|
|
1482
|
-
});
|
|
1483
|
-
}
|
|
1484
|
-
|
|
1485
|
-
public setOrientationOfClippingPlanes(
|
|
1486
|
-
vtkPlanes: Array<vtkPlane>,
|
|
1487
|
-
slabThickness: number,
|
|
1488
|
-
viewPlaneNormal: Point3,
|
|
1489
|
-
focalPoint: Point3
|
|
1490
|
-
): void {
|
|
1491
|
-
if (vtkPlanes.length < 2) {
|
|
1492
|
-
return;
|
|
1493
|
-
}
|
|
1494
|
-
|
|
1495
|
-
const scaledDistance = <Point3>[
|
|
1496
|
-
viewPlaneNormal[0],
|
|
1497
|
-
viewPlaneNormal[1],
|
|
1498
|
-
viewPlaneNormal[2],
|
|
1499
|
-
];
|
|
1500
|
-
vtkMath.multiplyScalar(scaledDistance, slabThickness);
|
|
1501
|
-
|
|
1502
|
-
vtkPlanes[0].setNormal(viewPlaneNormal);
|
|
1503
|
-
const newOrigin1 = <Point3>[0, 0, 0];
|
|
1504
|
-
vtkMath.subtract(focalPoint, scaledDistance, newOrigin1);
|
|
1505
|
-
vtkPlanes[0].setOrigin(newOrigin1);
|
|
1506
|
-
|
|
1507
|
-
vtkPlanes[1].setNormal(
|
|
1508
|
-
-viewPlaneNormal[0],
|
|
1509
|
-
-viewPlaneNormal[1],
|
|
1510
|
-
-viewPlaneNormal[2]
|
|
1511
|
-
);
|
|
1512
|
-
const newOrigin2 = <Point3>[0, 0, 0];
|
|
1513
|
-
vtkMath.add(focalPoint, scaledDistance, newOrigin2);
|
|
1514
|
-
vtkPlanes[1].setOrigin(newOrigin2);
|
|
1515
|
-
}
|
|
1516
|
-
|
|
1517
|
-
/**
|
|
1518
|
-
* Method to get the clipping planes of a given actor
|
|
1519
|
-
* @param actorEntry - The actor entry (a specific type you'll define dependent on your code)
|
|
1520
|
-
* @returns vtkPlanes - An array of vtkPlane objects associated with the given actor
|
|
1521
|
-
*/
|
|
1522
|
-
public getClippingPlanesForActor(actorEntry?: ActorEntry): vtkPlane[] {
|
|
1523
|
-
if (!actorEntry) {
|
|
1524
|
-
actorEntry = this.getDefaultActor();
|
|
1525
|
-
}
|
|
1526
|
-
|
|
1527
|
-
if (!actorEntry.actor) {
|
|
1528
|
-
throw new Error('Invalid actor entry: Actor is undefined');
|
|
1529
|
-
}
|
|
1530
|
-
|
|
1531
|
-
const mapper = actorEntry.actor.getMapper();
|
|
1532
|
-
let vtkPlanes = actorEntry?.clippingFilter
|
|
1533
|
-
? actorEntry.clippingFilter.getClippingPlanes()
|
|
1534
|
-
: mapper.getClippingPlanes();
|
|
1535
|
-
|
|
1536
|
-
if (vtkPlanes.length === 0 && actorEntry?.clippingFilter) {
|
|
1537
|
-
vtkPlanes = [vtkPlane.newInstance(), vtkPlane.newInstance()];
|
|
1538
|
-
}
|
|
1539
|
-
|
|
1540
|
-
return vtkPlanes;
|
|
1541
|
-
}
|
|
1542
|
-
|
|
1543
|
-
private _getWorldDistanceViewUpAndViewRight(bounds, viewUp, viewPlaneNormal) {
|
|
1544
|
-
const viewUpCorners = this._getCorners(bounds);
|
|
1545
|
-
const viewRightCorners = this._getCorners(bounds);
|
|
1546
|
-
|
|
1547
|
-
const viewRight = vec3.cross(vec3.create(), viewUp, viewPlaneNormal);
|
|
1548
|
-
|
|
1549
|
-
let transform = vtkMatrixBuilder
|
|
1550
|
-
.buildFromDegree()
|
|
1551
|
-
.identity()
|
|
1552
|
-
.rotateFromDirections(viewUp, [1, 0, 0]);
|
|
1553
|
-
|
|
1554
|
-
viewUpCorners.forEach((pt) => transform.apply(pt));
|
|
1555
|
-
|
|
1556
|
-
// range is now maximum X distance
|
|
1557
|
-
let minY = Infinity;
|
|
1558
|
-
let maxY = -Infinity;
|
|
1559
|
-
for (let i = 0; i < 8; i++) {
|
|
1560
|
-
const y = viewUpCorners[i][0];
|
|
1561
|
-
if (y > maxY) {
|
|
1562
|
-
maxY = y;
|
|
1563
|
-
}
|
|
1564
|
-
if (y < minY) {
|
|
1565
|
-
minY = y;
|
|
1566
|
-
}
|
|
1567
|
-
}
|
|
1568
|
-
|
|
1569
|
-
transform = vtkMatrixBuilder
|
|
1570
|
-
.buildFromDegree()
|
|
1571
|
-
.identity()
|
|
1572
|
-
.rotateFromDirections(
|
|
1573
|
-
[viewRight[0], viewRight[1], viewRight[2]],
|
|
1574
|
-
[1, 0, 0]
|
|
1575
|
-
);
|
|
1576
|
-
|
|
1577
|
-
viewRightCorners.forEach((pt) => transform.apply(pt));
|
|
1578
|
-
|
|
1579
|
-
// range is now maximum Y distance
|
|
1580
|
-
let minX = Infinity;
|
|
1581
|
-
let maxX = -Infinity;
|
|
1582
|
-
for (let i = 0; i < 8; i++) {
|
|
1583
|
-
const x = viewRightCorners[i][0];
|
|
1584
|
-
if (x > maxX) {
|
|
1585
|
-
maxX = x;
|
|
1586
|
-
}
|
|
1587
|
-
if (x < minX) {
|
|
1588
|
-
minX = x;
|
|
1589
|
-
}
|
|
1590
|
-
}
|
|
1591
|
-
|
|
1592
|
-
return { widthWorld: maxX - minX, heightWorld: maxY - minY };
|
|
1593
|
-
}
|
|
1594
|
-
|
|
1595
|
-
/**
|
|
1596
|
-
* Gets a view target specifying WHAT a view is displaying,
|
|
1597
|
-
* allowing for checking if a given image is displayed or could be displayed
|
|
1598
|
-
* in a given viewport.
|
|
1599
|
-
* See getViewPresentation for HOW a view is displayed.
|
|
1600
|
-
*
|
|
1601
|
-
* @param viewRefSpecifier - choose an alternate view to be specified, typically
|
|
1602
|
-
* a different slice index in the same set of images.
|
|
1603
|
-
*/
|
|
1604
|
-
public getViewReference(
|
|
1605
|
-
viewRefSpecifier: ViewReferenceSpecifier = {}
|
|
1606
|
-
): ViewReference {
|
|
1607
|
-
const {
|
|
1608
|
-
focalPoint: cameraFocalPoint,
|
|
1609
|
-
viewPlaneNormal,
|
|
1610
|
-
viewUp,
|
|
1611
|
-
} = this.getCamera();
|
|
1612
|
-
const target: ViewReference = {
|
|
1613
|
-
FrameOfReferenceUID: this.getFrameOfReferenceUID(),
|
|
1614
|
-
cameraFocalPoint,
|
|
1615
|
-
viewPlaneNormal,
|
|
1616
|
-
viewUp,
|
|
1617
|
-
sliceIndex: viewRefSpecifier.sliceIndex ?? this.getSliceIndex(),
|
|
1618
|
-
};
|
|
1619
|
-
return target;
|
|
1620
|
-
}
|
|
1621
|
-
|
|
1622
|
-
/**
|
|
1623
|
-
* Find out if this viewport does or could show this view reference.
|
|
1624
|
-
*
|
|
1625
|
-
* @param options - allows specifying whether the view COULD display this with
|
|
1626
|
-
* some modification - either navigation or displaying as volume.
|
|
1627
|
-
* @returns true if the viewport could show this view reference
|
|
1628
|
-
*/
|
|
1629
|
-
public isReferenceViewable(
|
|
1630
|
-
viewRef: ViewReference,
|
|
1631
|
-
options?: ReferenceCompatibleOptions
|
|
1632
|
-
): boolean {
|
|
1633
|
-
if (
|
|
1634
|
-
viewRef.FrameOfReferenceUID &&
|
|
1635
|
-
viewRef.FrameOfReferenceUID !== this.getFrameOfReferenceUID()
|
|
1636
|
-
) {
|
|
1637
|
-
return false;
|
|
1638
|
-
}
|
|
1639
|
-
|
|
1640
|
-
const { viewPlaneNormal } = viewRef;
|
|
1641
|
-
const camera = this.getCamera();
|
|
1642
|
-
if (
|
|
1643
|
-
viewPlaneNormal &&
|
|
1644
|
-
!isEqual(viewPlaneNormal, camera.viewPlaneNormal) &&
|
|
1645
|
-
!isEqual(
|
|
1646
|
-
vec3.negate(camera.viewPlaneNormal, camera.viewPlaneNormal),
|
|
1647
|
-
viewPlaneNormal
|
|
1648
|
-
)
|
|
1649
|
-
) {
|
|
1650
|
-
// Could navigate as a volume to the reference with an orientation change
|
|
1651
|
-
return options?.withOrientation === true;
|
|
1652
|
-
}
|
|
1653
|
-
return true;
|
|
1654
|
-
}
|
|
1655
|
-
|
|
1656
|
-
/**
|
|
1657
|
-
* Gets a view presentation information specifying HOW a viewport displays
|
|
1658
|
-
* something, but not what is being displayed.
|
|
1659
|
-
* See getViewReference to get information on WHAT is being displayed.
|
|
1660
|
-
*
|
|
1661
|
-
* This is intended to have information on how an image is presented to the user, without
|
|
1662
|
-
* specifying what image s displayed. All of this information is available
|
|
1663
|
-
* externally, but this method combines the parts of this that are appropriate
|
|
1664
|
-
* for remember or applying to other views, without necessarily needing to know
|
|
1665
|
-
* what all the atributes are. That differs from methods like getCamera which
|
|
1666
|
-
* fetch exact view details that are not likely to be identical between viewports
|
|
1667
|
-
* as they change sizes or apply to different images.
|
|
1668
|
-
*
|
|
1669
|
-
* Note that the results of this can be used on different viewports, for example,
|
|
1670
|
-
* the pan values can be applied to a volume viewport showing a CT, and a
|
|
1671
|
-
* stack viewport showing an ultrasound.
|
|
1672
|
-
*
|
|
1673
|
-
* The selector allows choosing which view presentation attributes to return.
|
|
1674
|
-
* Some default values are available from `Viewport.CameraViewPresentation` and
|
|
1675
|
-
* `Viewport.TransferViewPresentation`
|
|
1676
|
-
*
|
|
1677
|
-
* @param viewPresSel - select which attributes to display.
|
|
1678
|
-
*/
|
|
1679
|
-
public getViewPresentation(
|
|
1680
|
-
viewPresSel: ViewPresentationSelector = {
|
|
1681
|
-
rotation: true,
|
|
1682
|
-
displayArea: true,
|
|
1683
|
-
zoom: true,
|
|
1684
|
-
pan: true,
|
|
1685
|
-
}
|
|
1686
|
-
): ViewPresentation {
|
|
1687
|
-
const target: ViewPresentation = {};
|
|
1688
|
-
|
|
1689
|
-
const { rotation, displayArea, zoom, pan } = viewPresSel;
|
|
1690
|
-
if (rotation) {
|
|
1691
|
-
target.rotation = this.getRotation();
|
|
1692
|
-
}
|
|
1693
|
-
if (displayArea) {
|
|
1694
|
-
target.displayArea = this.getDisplayArea();
|
|
1695
|
-
}
|
|
1696
|
-
const initZoom = this.getZoom();
|
|
1697
|
-
|
|
1698
|
-
if (zoom) {
|
|
1699
|
-
target.zoom = initZoom;
|
|
1700
|
-
}
|
|
1701
|
-
if (pan) {
|
|
1702
|
-
target.pan = this.getPan();
|
|
1703
|
-
vec2.scale(target.pan, target.pan, 1 / initZoom);
|
|
1704
|
-
}
|
|
1705
|
-
return target;
|
|
1706
|
-
}
|
|
1707
|
-
|
|
1708
|
-
/**
|
|
1709
|
-
* Navigates to the image specified by the viewRef.
|
|
1710
|
-
*/
|
|
1711
|
-
public setViewReference(viewRef: ViewReference) {
|
|
1712
|
-
// No-op
|
|
1713
|
-
}
|
|
1714
|
-
|
|
1715
|
-
/**
|
|
1716
|
-
* Applies the display area, zoom, pan and rotation from the view presentation.
|
|
1717
|
-
* No-op is viewPres isn't defined.
|
|
1718
|
-
*/
|
|
1719
|
-
public setViewPresentation(viewPres: ViewPresentation) {
|
|
1720
|
-
if (!viewPres) {
|
|
1721
|
-
return;
|
|
1722
|
-
}
|
|
1723
|
-
const { displayArea, zoom = this.getZoom(), pan, rotation } = viewPres;
|
|
1724
|
-
if (displayArea !== this.getDisplayArea()) {
|
|
1725
|
-
this.setDisplayArea(displayArea);
|
|
1726
|
-
}
|
|
1727
|
-
this.setZoom(zoom);
|
|
1728
|
-
if (pan) {
|
|
1729
|
-
this.setPan(vec2.scale([0, 0], pan, zoom) as Point2);
|
|
1730
|
-
}
|
|
1731
|
-
if (rotation >= 0) {
|
|
1732
|
-
this.setRotation(rotation);
|
|
1733
|
-
}
|
|
1734
|
-
}
|
|
1735
|
-
|
|
1736
|
-
protected _shouldUseNativeDataType() {
|
|
1737
|
-
const { useNorm16Texture, preferSizeOverAccuracy } =
|
|
1738
|
-
getConfiguration().rendering;
|
|
1739
|
-
return useNorm16Texture || preferSizeOverAccuracy;
|
|
1740
|
-
}
|
|
1741
|
-
|
|
1742
|
-
_getCorners(bounds: Array<number>): Array<number>[] {
|
|
1743
|
-
return [
|
|
1744
|
-
[bounds[0], bounds[2], bounds[4]],
|
|
1745
|
-
[bounds[0], bounds[2], bounds[5]],
|
|
1746
|
-
[bounds[0], bounds[3], bounds[4]],
|
|
1747
|
-
[bounds[0], bounds[3], bounds[5]],
|
|
1748
|
-
[bounds[1], bounds[2], bounds[4]],
|
|
1749
|
-
[bounds[1], bounds[2], bounds[5]],
|
|
1750
|
-
[bounds[1], bounds[3], bounds[4]],
|
|
1751
|
-
[bounds[1], bounds[3], bounds[5]],
|
|
1752
|
-
];
|
|
1753
|
-
}
|
|
1754
|
-
|
|
1755
|
-
_getFocalPointForResetCamera(
|
|
1756
|
-
centeredFocalPoint: Point3,
|
|
1757
|
-
previousCamera: ICamera,
|
|
1758
|
-
{ resetPan = true, resetToCenter = true }
|
|
1759
|
-
): Point3 {
|
|
1760
|
-
if (resetToCenter && resetPan) {
|
|
1761
|
-
return centeredFocalPoint;
|
|
1762
|
-
}
|
|
1763
|
-
|
|
1764
|
-
if (resetToCenter && !resetPan) {
|
|
1765
|
-
return hasNaNValues(previousCamera.focalPoint)
|
|
1766
|
-
? centeredFocalPoint
|
|
1767
|
-
: previousCamera.focalPoint;
|
|
1768
|
-
}
|
|
1769
|
-
|
|
1770
|
-
if (!resetToCenter && resetPan) {
|
|
1771
|
-
// this is an interesting case that means the reset camera should not
|
|
1772
|
-
// change the slice (default behavior is to go to the center of the
|
|
1773
|
-
// image), and rather just reset the pan on the slice that is currently
|
|
1774
|
-
// being viewed
|
|
1775
|
-
const oldCamera = previousCamera;
|
|
1776
|
-
const oldFocalPoint = oldCamera.focalPoint;
|
|
1777
|
-
const oldViewPlaneNormal = oldCamera.viewPlaneNormal;
|
|
1778
|
-
|
|
1779
|
-
const vectorFromOldFocalPointToCenteredFocalPoint = vec3.subtract(
|
|
1780
|
-
vec3.create(),
|
|
1781
|
-
centeredFocalPoint,
|
|
1782
|
-
oldFocalPoint
|
|
1783
|
-
);
|
|
1784
|
-
|
|
1785
|
-
const distanceFromOldFocalPointToCenteredFocalPoint = vec3.dot(
|
|
1786
|
-
vectorFromOldFocalPointToCenteredFocalPoint,
|
|
1787
|
-
oldViewPlaneNormal
|
|
1788
|
-
);
|
|
1789
|
-
|
|
1790
|
-
const newFocalPoint = vec3.scaleAndAdd(
|
|
1791
|
-
vec3.create(),
|
|
1792
|
-
centeredFocalPoint,
|
|
1793
|
-
oldViewPlaneNormal,
|
|
1794
|
-
-1 * distanceFromOldFocalPointToCenteredFocalPoint
|
|
1795
|
-
);
|
|
1796
|
-
|
|
1797
|
-
return [newFocalPoint[0], newFocalPoint[1], newFocalPoint[2]];
|
|
1798
|
-
}
|
|
1799
|
-
|
|
1800
|
-
if (!resetPan && !resetToCenter) {
|
|
1801
|
-
// this means the reset camera should not change the slice and should not
|
|
1802
|
-
// touch the pan either.
|
|
1803
|
-
return hasNaNValues(previousCamera.focalPoint)
|
|
1804
|
-
? centeredFocalPoint
|
|
1805
|
-
: previousCamera.focalPoint;
|
|
1806
|
-
}
|
|
1807
|
-
}
|
|
1808
|
-
|
|
1809
|
-
/**
|
|
1810
|
-
* Determines whether or not the 3D point position is inside the boundaries of the 3D imageData.
|
|
1811
|
-
* @param point - 3D coordinate
|
|
1812
|
-
* @param bounds - Bounds of the image
|
|
1813
|
-
* @returns boolean
|
|
1814
|
-
*/
|
|
1815
|
-
_isInBounds(point: Point3, bounds: number[]): boolean {
|
|
1816
|
-
const [xMin, xMax, yMin, yMax, zMin, zMax] = bounds;
|
|
1817
|
-
const [x, y, z] = point;
|
|
1818
|
-
if (x < xMin || x > xMax || y < yMin || y > yMax || z < zMin || z > zMax) {
|
|
1819
|
-
return false;
|
|
1820
|
-
}
|
|
1821
|
-
return true;
|
|
1822
|
-
}
|
|
1823
|
-
|
|
1824
|
-
/**
|
|
1825
|
-
* Returns a list of edges for the imageData bounds, which are
|
|
1826
|
-
* the cube edges in the case of volumeViewport edges.
|
|
1827
|
-
* p1: front, bottom, left
|
|
1828
|
-
* p2: front, top, left
|
|
1829
|
-
* p3: back, bottom, left
|
|
1830
|
-
* p4: back, top, left
|
|
1831
|
-
* p5: front, bottom, right
|
|
1832
|
-
* p6: front, top, right
|
|
1833
|
-
* p7: back, bottom, right
|
|
1834
|
-
* p8: back, top, right
|
|
1835
|
-
* @param bounds - Bounds of the renderer
|
|
1836
|
-
* @returns Edges of the containing bounds
|
|
1837
|
-
*/
|
|
1838
|
-
_getEdges(bounds: Array<number>): Array<[number[], number[]]> {
|
|
1839
|
-
const [p1, p2, p3, p4, p5, p6, p7, p8] = this._getCorners(bounds);
|
|
1840
|
-
return [
|
|
1841
|
-
[p1, p2],
|
|
1842
|
-
[p1, p5],
|
|
1843
|
-
[p1, p3],
|
|
1844
|
-
[p2, p4],
|
|
1845
|
-
[p2, p6],
|
|
1846
|
-
[p3, p4],
|
|
1847
|
-
[p3, p7],
|
|
1848
|
-
[p4, p8],
|
|
1849
|
-
[p5, p7],
|
|
1850
|
-
[p5, p6],
|
|
1851
|
-
[p6, p8],
|
|
1852
|
-
[p7, p8],
|
|
1853
|
-
];
|
|
1854
|
-
}
|
|
1855
|
-
|
|
1856
|
-
/**
|
|
1857
|
-
* Computes the bounds radius value
|
|
1858
|
-
*/
|
|
1859
|
-
static boundsRadius(bounds: number[]) {
|
|
1860
|
-
const w1 = (bounds[1] - bounds[0]) ** 2;
|
|
1861
|
-
const w2 = (bounds[3] - bounds[2]) ** 2;
|
|
1862
|
-
const w3 = (bounds[5] - bounds[4]) ** 2;
|
|
1863
|
-
|
|
1864
|
-
// If we have just a single point, pick a radius of 1.0
|
|
1865
|
-
// compute the radius of the enclosing sphere
|
|
1866
|
-
// For 3D viewport, we should increase the radius to make sure the whole
|
|
1867
|
-
// volume is visible and we don't get clipping artifacts.
|
|
1868
|
-
const radius = Math.sqrt(w1 + w2 + w3 || 1) * 0.5;
|
|
1869
|
-
return radius;
|
|
1870
|
-
}
|
|
1871
|
-
}
|
|
1872
|
-
|
|
1873
|
-
export default Viewport;
|