@kitware/vtk.js 34.16.2 → 34.16.6
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/CONTRIBUTING.md +8 -8
- package/Common/Core/CellArray.d.ts +5 -1
- package/Common/Core/CellArray.js +6 -10
- package/Common/Core/DataArray.js +9 -23
- package/Common/Core/ImageHelper.d.ts +2 -2
- package/Common/Core/ImageHelper.js +6 -8
- package/Common/Core/LookupTable.js +1 -3
- package/Common/Core/Math/index.js +19 -47
- package/Common/Core/MatrixBuilder.js +2 -5
- package/Common/Core/Points.js +3 -8
- package/Common/Core/PriorityQueue.js +4 -8
- package/Common/Core/ProgressHandler.js +4 -7
- package/Common/Core/ScalarsToColors.js +1 -2
- package/Common/Core/StringArray.js +4 -12
- package/Common/Core/URLExtract.js +1 -3
- package/Common/Core/VariantArray.js +4 -12
- package/Common/DataModel/AbstractPointLocator.js +1 -2
- package/Common/DataModel/BoundingBox.js +6 -16
- package/Common/DataModel/Box.js +7 -11
- package/Common/DataModel/CardinalSpline1D.js +2 -4
- package/Common/DataModel/Cell.js +2 -4
- package/Common/DataModel/CellLinks.js +2 -4
- package/Common/DataModel/CellTypes.js +2 -5
- package/Common/DataModel/Collection.js +1 -2
- package/Common/DataModel/Cone.js +1 -2
- package/Common/DataModel/Cylinder.js +1 -2
- package/Common/DataModel/DataSet/Constants.js +0 -1
- package/Common/DataModel/DataSet.js +2 -4
- package/Common/DataModel/DataSetAttributes/Constants.js +0 -4
- package/Common/DataModel/DataSetAttributes/FieldData.js +3 -11
- package/Common/DataModel/DataSetAttributes.js +1 -2
- package/Common/DataModel/EdgeLocator.js +2 -4
- package/Common/DataModel/ITKHelper.js +4 -8
- package/Common/DataModel/ImageData.js +17 -33
- package/Common/DataModel/ImplicitBoolean.js +1 -2
- package/Common/DataModel/ImplicitFunction.js +1 -2
- package/Common/DataModel/IncrementalOctreeNode.js +1 -2
- package/Common/DataModel/IncrementalOctreePointLocator.js +2 -3
- package/Common/DataModel/KochanekSpline1D.js +2 -4
- package/Common/DataModel/Line.js +2 -4
- package/Common/DataModel/Locator.js +1 -2
- package/Common/DataModel/MergePoints.js +1 -2
- package/Common/DataModel/Molecule.js +1 -2
- package/Common/DataModel/PiecewiseFunction.js +2 -4
- package/Common/DataModel/Plane.js +1 -2
- package/Common/DataModel/Planes.js +2 -4
- package/Common/DataModel/PointLocator.js +3 -7
- package/Common/DataModel/PointSet.js +2 -4
- package/Common/DataModel/PolyData.js +4 -8
- package/Common/DataModel/PolyLine.js +1 -2
- package/Common/DataModel/Polygon.js +2 -4
- package/Common/DataModel/Quad.js +1 -2
- package/Common/DataModel/SelectionNode.js +1 -2
- package/Common/DataModel/Sphere.js +1 -2
- package/Common/DataModel/Spline1D.js +2 -3
- package/Common/DataModel/Spline3D.js +1 -2
- package/Common/DataModel/Triangle.js +2 -6
- package/Common/DataModel/TriangleStrip.js +1 -2
- package/Common/Transform/LandmarkTransform.js +1 -2
- package/Common/Transform/Transform.js +4 -10
- package/Filters/Core/CleanPolyData.js +1 -2
- package/Filters/Core/Cutter.js +1 -3
- package/Filters/Core/PolyDataNormals.js +1 -3
- package/Filters/Core/ThresholdPoints.js +2 -4
- package/Filters/Cornerstone/ImageDataToCornerstoneImage.js +1 -2
- package/Filters/General/AppendPolyData.js +1 -2
- package/Filters/General/Calculator.js +40 -47
- package/Filters/General/ClipClosedSurface.js +1 -4
- package/Filters/General/ClosedPolyLineToSurfaceFilter.js +1 -2
- package/Filters/General/ContourLoopExtraction.js +1 -2
- package/Filters/General/ContourTriangulator/helper.js +1 -5
- package/Filters/General/ContourTriangulator.js +2 -4
- package/Filters/General/ImageCropFilter.js +1 -2
- package/Filters/General/ImageDataOutlineFilter.js +1 -2
- package/Filters/General/ImageMarchingCubes/caseTable.js +0 -1
- package/Filters/General/ImageMarchingCubes.js +1 -4
- package/Filters/General/ImageMarchingSquares/caseTable.js +0 -1
- package/Filters/General/ImageMarchingSquares.js +1 -4
- package/Filters/General/ImageOutlineFilter.js +1 -2
- package/Filters/General/ImageSliceFilter.js +1 -2
- package/Filters/General/ImageStreamline.js +1 -3
- package/Filters/General/LineFilter.js +1 -2
- package/Filters/General/MoleculeToRepresentation.js +2 -5
- package/Filters/General/OBBTree/OBBNode.js +1 -2
- package/Filters/General/OBBTree.js +2 -6
- package/Filters/General/OutlineFilter.js +1 -2
- package/Filters/General/PaintFilter/PaintFilter.worker.js +20 -25
- package/Filters/General/PaintFilter.js +1 -2
- package/Filters/General/ScalarToRGBA.js +1 -2
- package/Filters/General/ShrinkPolyData.js +2 -4
- package/Filters/General/TransformPolyDataFilter.js +1 -2
- package/Filters/General/TriangleFilter.js +1 -2
- package/Filters/General/TubeFilter.js +2 -6
- package/Filters/General/WarpScalar.js +1 -2
- package/Filters/General/WindowedSincPolyDataFilter.js +1 -2
- package/Filters/Sources/ArcSource.js +1 -2
- package/Filters/Sources/Arrow2DSource.js +1 -2
- package/Filters/Sources/ArrowSource.js +1 -2
- package/Filters/Sources/CircleSource.d.ts +2 -3
- package/Filters/Sources/CircleSource.js +1 -2
- package/Filters/Sources/ConcentricCylinderSource.js +2 -6
- package/Filters/Sources/ConeSource.js +1 -2
- package/Filters/Sources/CubeSource.js +6 -7
- package/Filters/Sources/Cursor3D.js +1 -2
- package/Filters/Sources/CylinderSource.js +1 -2
- package/Filters/Sources/DiskSource.js +1 -2
- package/Filters/Sources/EllipseArcSource.js +1 -2
- package/Filters/Sources/FrustumSource.js +1 -2
- package/Filters/Sources/ImageGridSource.js +1 -2
- package/Filters/Sources/LineSource.js +1 -2
- package/Filters/Sources/PlaneSource.js +21 -22
- package/Filters/Sources/PlatonicSolidSource.js +1 -2
- package/Filters/Sources/PointSource.js +1 -2
- package/Filters/Sources/RTAnalyticSource.js +1 -2
- package/Filters/Sources/SLICSource.js +1 -2
- package/Filters/Sources/SphereSource.js +1 -2
- package/Filters/Sources/TorusSource.js +1 -2
- package/Filters/Sources/ViewFinderSource.js +1 -2
- package/Filters/Texture/TextureMapToPlane.js +1 -2
- package/Filters/Texture/TextureMapToSphere.js +1 -2
- package/IO/Core/BinaryHelper.js +1 -2
- package/IO/Core/DataAccessHelper/HtmlDataAccessHelper.js +4 -5
- package/IO/Core/DataAccessHelper/HttpDataAccessHelper.js +7 -16
- package/IO/Core/DataAccessHelper/JSZipDataAccessHelper.js +5 -9
- package/IO/Core/DataAccessHelper/LiteHttpDataAccessHelper.js +7 -16
- package/IO/Core/DataAccessHelper.js +1 -3
- package/IO/Core/HttpDataSetReader.js +10 -16
- package/IO/Core/HttpDataSetSeriesReader.js +4 -8
- package/IO/Core/HttpSceneLoader.js +3 -8
- package/IO/Core/ImageStream/DefaultProtocol.js +12 -42
- package/IO/Core/ImageStream/ViewStream.js +5 -8
- package/IO/Core/ImageStream.js +4 -9
- package/IO/Core/Serializer/ArraySerializer.js +1 -2
- package/IO/Core/WSLinkClient.js +14 -25
- package/IO/Core/ZipMultiDataSetReader.js +5 -12
- package/IO/Core/ZipMultiDataSetWriter.js +1 -2
- package/IO/Geometry/DracoReader.js +6 -10
- package/IO/Geometry/GLTFImporter/Animations.js +9 -14
- package/IO/Geometry/GLTFImporter/Constants.js +0 -1
- package/IO/Geometry/GLTFImporter/Parser.js +1 -3
- package/IO/Geometry/GLTFImporter/Reader.js +2 -5
- package/IO/Geometry/GLTFImporter.js +7 -12
- package/IO/Geometry/IFCImporter.d.ts +1 -1
- package/IO/Geometry/IFCImporter.js +6 -10
- package/IO/Geometry/PLYReader.js +6 -11
- package/IO/Geometry/PLYWriter.js +1 -2
- package/IO/Geometry/STLReader.js +6 -11
- package/IO/Geometry/STLWriter.js +2 -6
- package/IO/Image/HDRReader/Utils.js +1 -2
- package/IO/Image/HDRReader.js +7 -10
- package/IO/Image/TGAReader.js +7 -9
- package/IO/Image/TIFFReader.js +7 -10
- package/IO/Legacy/LegacyAsciiParser.js +1 -2
- package/IO/Legacy/PolyDataReader.js +5 -7
- package/IO/Misc/ElevationReader.js +1 -2
- package/IO/Misc/GCodeReader.js +6 -11
- package/IO/Misc/HttpDataSetLODsLoader.js +1 -2
- package/IO/Misc/ITKImageReader.js +6 -13
- package/IO/Misc/ITKPolyDataReader.js +6 -13
- package/IO/Misc/JSONNucleoReader.js +1 -2
- package/IO/Misc/JSONReader.js +4 -10
- package/IO/Misc/MTLReader.js +2 -4
- package/IO/Misc/OBJReader.js +4 -10
- package/IO/Misc/OBJWriter.js +1 -2
- package/IO/Misc/PDBReader.js +1 -2
- package/IO/Misc/SkyboxReader.js +5 -10
- package/IO/XML/XMLImageDataReader.js +1 -2
- package/IO/XML/XMLImageDataWriter.js +1 -2
- package/IO/XML/XMLPolyDataReader.js +1 -2
- package/IO/XML/XMLPolyDataWriter.js +1 -2
- package/IO/XML/XMLReader.js +4 -10
- package/IO/XML/XMLWriter.js +2 -4
- package/Imaging/Core/AbstractImageInterpolator.js +1 -3
- package/Imaging/Core/ImageInterpolator.js +1 -3
- package/Imaging/Core/ImagePointDataIterator.js +2 -6
- package/Imaging/Core/ImageReslice.js +1 -3
- package/Imaging/Hybrid/SampleFunction.js +1 -2
- package/Interaction/Animations/TimeStepBasedAnimationHandler.js +1 -2
- package/Interaction/Manipulators/3DControllerModelSelectorManipulator/index.js +1 -2
- package/Interaction/Manipulators/CompositeCameraManipulator.js +1 -2
- package/Interaction/Manipulators/CompositeGestureManipulator.js +1 -2
- package/Interaction/Manipulators/CompositeKeyboardManipulator.js +1 -2
- package/Interaction/Manipulators/CompositeMouseManipulator.js +1 -2
- package/Interaction/Manipulators/CompositeVRManipulator.js +1 -2
- package/Interaction/Manipulators/GestureCameraManipulator.js +1 -2
- package/Interaction/Manipulators/KeyboardCameraManipulator.js +1 -2
- package/Interaction/Manipulators/MouseBoxSelectorManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraAxisRotateManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraSliceManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraTrackballFirstPersonManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraTrackballMultiRotateManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraTrackballPanManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraTrackballPanManipulatorAutoCenter.js +1 -2
- package/Interaction/Manipulators/MouseCameraTrackballRollManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraTrackballRotateManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraTrackballZoomManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraTrackballZoomToMouseManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraUnicamManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraUnicamRotateManipulator.js +1 -2
- package/Interaction/Manipulators/MouseRangeManipulator.js +4 -11
- package/Interaction/Manipulators/VRButtonPanManipulator.js +1 -2
- package/Interaction/Misc/DeviceOrientationToCamera.js +1 -2
- package/Interaction/Style/InteractorStyleHMDXR.js +1 -2
- package/Interaction/Style/InteractorStyleImage.js +1 -2
- package/Interaction/Style/InteractorStyleMPRSlice.js +2 -6
- package/Interaction/Style/InteractorStyleManipulator.js +1 -2
- package/Interaction/Style/InteractorStyleRemoteMouse.js +1 -2
- package/Interaction/Style/InteractorStyleTrackballCamera.js +1 -3
- package/Interaction/Style/InteractorStyleUnicam.js +1 -2
- package/Interaction/UI/CornerAnnotation.js +2 -4
- package/Interaction/UI/FPSMonitor.js +3 -9
- package/Interaction/UI/Slider.js +1 -3
- package/Interaction/UI/VolumeController.js +2 -5
- package/Interaction/Widgets/OrientationMarkerWidget.js +1 -2
- package/Interaction/Widgets/PiecewiseGaussianWidget.js +42 -59
- package/Proxy/Animation/AbstractAnimationProxy.js +1 -2
- package/Proxy/Animation/AnimationProxyManager.js +1 -2
- package/Proxy/Animation/TimeStepBasedAnimationHandlerProxy.js +1 -2
- package/Proxy/Core/AbstractRepresentationProxy.js +3 -6
- package/Proxy/Core/LookupTableProxy.js +1 -3
- package/Proxy/Core/PiecewiseFunctionProxy.js +3 -11
- package/Proxy/Core/ProxyManager/state.js +171 -182
- package/Proxy/Core/ProxyManager/view.js +3 -6
- package/Proxy/Core/ProxyManager.js +1 -2
- package/Proxy/Core/SourceProxy.js +2 -6
- package/Proxy/Core/View2DProxy.js +2 -4
- package/Proxy/Core/ViewProxy.js +20 -37
- package/Proxy/Representations/GeometryRepresentationProxy.js +1 -2
- package/Proxy/Representations/GlyphRepresentationProxy.js +1 -2
- package/Proxy/Representations/MoleculeRepresentationProxy.js +1 -2
- package/Proxy/Representations/ResliceRepresentationProxy.js +3 -8
- package/Proxy/Representations/SkyboxRepresentationProxy.js +1 -2
- package/Proxy/Representations/SliceRepresentationProxy.js +3 -8
- package/Proxy/Representations/SlicedGeometryRepresentationProxy.js +3 -6
- package/Proxy/Representations/VolumeRepresentationProxy.js +9 -17
- package/Rendering/Core/AbstractImageMapper.js +1 -2
- package/Rendering/Core/AbstractMapper.js +1 -2
- package/Rendering/Core/AbstractMapper3D.js +1 -2
- package/Rendering/Core/AbstractPicker.js +1 -2
- package/Rendering/Core/Actor.js +1 -2
- package/Rendering/Core/Actor2D.js +1 -2
- package/Rendering/Core/AnnotatedCubeActor.js +2 -4
- package/Rendering/Core/AxesActor.js +2 -4
- package/Rendering/Core/Camera.js +2 -6
- package/Rendering/Core/CellPicker.js +1 -3
- package/Rendering/Core/ColorTransferFunction/CssFilters.js +8 -16
- package/Rendering/Core/ColorTransferFunction.js +4 -10
- package/Rendering/Core/Coordinate.js +2 -6
- package/Rendering/Core/CubeAxesActor.js +4 -6
- package/Rendering/Core/Follower.js +1 -2
- package/Rendering/Core/Glyph3DMapper.js +1 -2
- package/Rendering/Core/HardwareSelector.js +1 -2
- package/Rendering/Core/ImageArrayMapper.js +6 -13
- package/Rendering/Core/ImageCPRMapper.js +1 -2
- package/Rendering/Core/ImageMapper.d.ts +2 -0
- package/Rendering/Core/ImageMapper.js +2 -5
- package/Rendering/Core/ImageProperty.js +9 -28
- package/Rendering/Core/ImageResliceMapper.js +1 -2
- package/Rendering/Core/ImageSlice.js +1 -2
- package/Rendering/Core/InteractorObserver.js +1 -2
- package/Rendering/Core/InteractorStyle.js +1 -2
- package/Rendering/Core/Light.js +1 -2
- package/Rendering/Core/Mapper/Static.js +1 -2
- package/Rendering/Core/Mapper.js +1 -6
- package/Rendering/Core/Mapper2D.js +1 -3
- package/Rendering/Core/Picker.js +1 -2
- package/Rendering/Core/PixelSpaceCallbackMapper.js +1 -2
- package/Rendering/Core/PointPicker.js +1 -2
- package/Rendering/Core/Prop.js +1 -2
- package/Rendering/Core/Prop3D.js +3 -8
- package/Rendering/Core/Property.js +1 -2
- package/Rendering/Core/Property2D.js +1 -2
- package/Rendering/Core/RenderWindow.js +4 -11
- package/Rendering/Core/RenderWindowInteractor/Constants.js +0 -1
- package/Rendering/Core/RenderWindowInteractor.js +7 -12
- package/Rendering/Core/Renderer.js +3 -6
- package/Rendering/Core/ScalarBarActor.js +4 -6
- package/Rendering/Core/Skybox.js +1 -2
- package/Rendering/Core/SphereMapper.js +1 -2
- package/Rendering/Core/StickMapper.js +1 -2
- package/Rendering/Core/SurfaceLICInterface.js +1 -2
- package/Rendering/Core/SurfaceLICMapper.js +1 -2
- package/Rendering/Core/TextActor.js +1 -2
- package/Rendering/Core/TextProperty.js +1 -2
- package/Rendering/Core/Texture.js +1 -2
- package/Rendering/Core/VectorText/Utils.js +4 -8
- package/Rendering/Core/VectorText.js +1 -3
- package/Rendering/Core/Viewport.js +2 -4
- package/Rendering/Core/Volume.js +1 -2
- package/Rendering/Core/VolumeMapper.js +1 -2
- package/Rendering/Core/VolumeProperty.js +9 -22
- package/Rendering/Misc/CanvasView.js +1 -2
- package/Rendering/Misc/FullScreenRenderWindow.js +1 -2
- package/Rendering/Misc/GenericRenderWindow.js +1 -2
- package/Rendering/Misc/RemoteView.js +1 -2
- package/Rendering/Misc/RenderWindowWithControlBar.js +1 -2
- package/Rendering/Misc/SynchronizableRenderWindow/BehaviorManager/CameraSynchronizer.js +1 -3
- package/Rendering/Misc/SynchronizableRenderWindow/BehaviorManager.js +5 -6
- package/Rendering/Misc/SynchronizableRenderWindow/ObjectManager.js +24 -43
- package/Rendering/Misc/SynchronizableRenderWindow.js +3 -6
- package/Rendering/Misc/TextureLODsDownloader.js +1 -2
- package/Rendering/OpenGL/Actor.js +1 -2
- package/Rendering/OpenGL/Actor2D.js +1 -2
- package/Rendering/OpenGL/BufferObject.js +1 -3
- package/Rendering/OpenGL/Camera.js +1 -2
- package/Rendering/OpenGL/CellArrayBufferObject.js +2 -4
- package/Rendering/OpenGL/Convolution2DPass.js +2 -3
- package/Rendering/OpenGL/CubeAxesActor.js +1 -2
- package/Rendering/OpenGL/ForwardPass.js +2 -4
- package/Rendering/OpenGL/Framebuffer.js +4 -8
- package/Rendering/OpenGL/Glyph3DMapper.js +1 -2
- package/Rendering/OpenGL/HardwareSelector.js +21 -27
- package/Rendering/OpenGL/Helper.js +1 -2
- package/Rendering/OpenGL/ImageCPRMapper.js +1 -2
- package/Rendering/OpenGL/ImageMapper.js +1 -2
- package/Rendering/OpenGL/ImageResliceMapper.js +10 -16
- package/Rendering/OpenGL/ImageSlice.js +1 -2
- package/Rendering/OpenGL/OrderIndependentTranslucentPass.js +1 -2
- package/Rendering/OpenGL/PixelSpaceCallbackMapper.js +1 -2
- package/Rendering/OpenGL/PolyDataMapper.js +5 -4
- package/Rendering/OpenGL/PolyDataMapper2D.js +1 -2
- package/Rendering/OpenGL/RadialDistortionPass.js +2 -3
- package/Rendering/OpenGL/RenderWindow.js +36 -53
- package/Rendering/OpenGL/Renderer.js +1 -3
- package/Rendering/OpenGL/ReplacementShaderMapper.js +2 -2
- package/Rendering/OpenGL/ScalarBarActor.js +1 -2
- package/Rendering/OpenGL/Shader.js +1 -2
- package/Rendering/OpenGL/ShaderCache.js +1 -2
- package/Rendering/OpenGL/ShaderProgram.js +4 -14
- package/Rendering/OpenGL/Skybox.js +1 -2
- package/Rendering/OpenGL/SphereMapper.js +1 -2
- package/Rendering/OpenGL/StickMapper.js +1 -2
- package/Rendering/OpenGL/SurfaceLIC/LineIntegralConvolution2D/pingpong.js +6 -12
- package/Rendering/OpenGL/SurfaceLIC/LineIntegralConvolution2D.js +4 -12
- package/Rendering/OpenGL/SurfaceLIC/SurfaceLICInterface.js +2 -4
- package/Rendering/OpenGL/SurfaceLIC/SurfaceLICMapper.js +1 -2
- package/Rendering/OpenGL/Texture.js +91 -113
- package/Rendering/OpenGL/TextureUnitManager.js +1 -2
- package/Rendering/OpenGL/VertexArrayObject.js +1 -2
- package/Rendering/OpenGL/ViewNodeFactory.js +1 -2
- package/Rendering/OpenGL/Volume.js +1 -2
- package/Rendering/OpenGL/VolumeMapper.js +11 -17
- package/Rendering/SceneGraph/RenderPass.js +2 -4
- package/Rendering/SceneGraph/RenderWindowViewNode.js +1 -2
- package/Rendering/SceneGraph/ViewNode.js +3 -6
- package/Rendering/SceneGraph/ViewNodeFactory.js +1 -2
- package/Rendering/WebGPU/Actor.js +1 -2
- package/Rendering/WebGPU/Actor2D.js +1 -2
- package/Rendering/WebGPU/BindGroup.js +1 -2
- package/Rendering/WebGPU/Buffer.js +2 -5
- package/Rendering/WebGPU/BufferManager.js +1 -2
- package/Rendering/WebGPU/Camera.js +1 -2
- package/Rendering/WebGPU/CellArrayMapper.js +3 -6
- package/Rendering/WebGPU/CubeAxesActor.js +1 -2
- package/Rendering/WebGPU/Device.js +2 -6
- package/Rendering/WebGPU/ForwardPass.js +2 -4
- package/Rendering/WebGPU/FullScreenQuad.js +1 -2
- package/Rendering/WebGPU/Glyph3DMapper.js +2 -4
- package/Rendering/WebGPU/HardwareSelectionPass.js +1 -2
- package/Rendering/WebGPU/HardwareSelector.js +1 -2
- package/Rendering/WebGPU/ImageMapper.js +1 -2
- package/Rendering/WebGPU/ImageSlice.js +1 -2
- package/Rendering/WebGPU/IndexBuffer.js +1 -2
- package/Rendering/WebGPU/OpaquePass.js +1 -2
- package/Rendering/WebGPU/OrderIndependentTranslucentPass.js +1 -2
- package/Rendering/WebGPU/Pipeline.js +1 -2
- package/Rendering/WebGPU/PixelSpaceCallbackMapper.js +1 -2
- package/Rendering/WebGPU/PolyDataMapper.js +1 -2
- package/Rendering/WebGPU/PolyDataMapper2D.js +1 -2
- package/Rendering/WebGPU/RenderEncoder.js +2 -5
- package/Rendering/WebGPU/RenderWindow.js +15 -25
- package/Rendering/WebGPU/Renderer.js +1 -2
- package/Rendering/WebGPU/Sampler.js +2 -4
- package/Rendering/WebGPU/ScalarBarActor.js +1 -2
- package/Rendering/WebGPU/ShaderCache.js +2 -4
- package/Rendering/WebGPU/ShaderDescription.js +2 -4
- package/Rendering/WebGPU/ShaderModule.js +1 -2
- package/Rendering/WebGPU/SimpleMapper.js +1 -3
- package/Rendering/WebGPU/SphereMapper.js +1 -2
- package/Rendering/WebGPU/StickMapper.js +1 -2
- package/Rendering/WebGPU/StorageBuffer.js +1 -2
- package/Rendering/WebGPU/Texture.js +3 -7
- package/Rendering/WebGPU/TextureManager.js +2 -6
- package/Rendering/WebGPU/TextureView.js +1 -3
- package/Rendering/WebGPU/UniformBuffer.js +1 -2
- package/Rendering/WebGPU/VertexInput.js +2 -4
- package/Rendering/WebGPU/ViewNodeFactory.js +1 -2
- package/Rendering/WebGPU/Volume.js +1 -2
- package/Rendering/WebGPU/VolumePass.js +1 -2
- package/Rendering/WebGPU/VolumePassFSQ.js +1 -2
- package/Rendering/WebXR/RenderWindowHelper.js +2 -6
- package/Widgets/Core/AbstractWidget.js +6 -10
- package/Widgets/Core/AbstractWidgetFactory.js +17 -22
- package/Widgets/Core/StateBuilder/boundsMixin.js +1 -2
- package/Widgets/Core/StateBuilder/color3Mixin.js +1 -2
- package/Widgets/Core/StateBuilder/colorMixin.js +1 -2
- package/Widgets/Core/StateBuilder/cornerMixin.js +1 -2
- package/Widgets/Core/StateBuilder/directionMixin.js +1 -2
- package/Widgets/Core/StateBuilder/manipulatorMixin.js +1 -2
- package/Widgets/Core/StateBuilder/nameMixin.js +1 -2
- package/Widgets/Core/StateBuilder/orientationMixin.js +1 -2
- package/Widgets/Core/StateBuilder/originMixin.js +1 -2
- package/Widgets/Core/StateBuilder/scale1Mixin.js +1 -2
- package/Widgets/Core/StateBuilder/scale3Mixin.js +1 -2
- package/Widgets/Core/StateBuilder/shapeMixin.js +1 -2
- package/Widgets/Core/StateBuilder/textMixin.js +1 -2
- package/Widgets/Core/StateBuilder/visibleMixin.js +1 -2
- package/Widgets/Core/StateBuilder.js +23 -33
- package/Widgets/Core/WidgetManager/Constants.js +0 -1
- package/Widgets/Core/WidgetManager.js +25 -30
- package/Widgets/Core/WidgetState.js +2 -4
- package/Widgets/Manipulators/AbstractManipulator.js +1 -2
- package/Widgets/Manipulators/CPRManipulator.js +1 -2
- package/Widgets/Manipulators/LineManipulator.js +1 -2
- package/Widgets/Manipulators/PickerManipulator.js +1 -2
- package/Widgets/Manipulators/PlaneManipulator.js +1 -2
- package/Widgets/Manipulators/TrackballManipulator.js +1 -2
- package/Widgets/Representations/ArrowHandleRepresentation.js +2 -6
- package/Widgets/Representations/CircleContextRepresentation.js +1 -2
- package/Widgets/Representations/ContextRepresentation.js +1 -2
- package/Widgets/Representations/ConvexFaceContextRepresentation.js +2 -6
- package/Widgets/Representations/CroppingOutlineRepresentation.js +1 -2
- package/Widgets/Representations/CubeHandleRepresentation.js +1 -2
- package/Widgets/Representations/GlyphRepresentation.js +3 -11
- package/Widgets/Representations/HandleRepresentation.js +1 -2
- package/Widgets/Representations/ImplicitPlaneRepresentation.js +1 -2
- package/Widgets/Representations/LineHandleRepresentation.js +1 -2
- package/Widgets/Representations/OutlineContextRepresentation.js +1 -2
- package/Widgets/Representations/PolyLineRepresentation.js +2 -4
- package/Widgets/Representations/RectangleContextRepresentation.js +1 -2
- package/Widgets/Representations/RotateTransformHandleRepresentation.js +1 -2
- package/Widgets/Representations/ScaleTransformHandleRepresentation.js +1 -2
- package/Widgets/Representations/SphereContextRepresentation.js +1 -2
- package/Widgets/Representations/SphereHandleRepresentation.js +1 -2
- package/Widgets/Representations/SplineContextRepresentation.js +2 -6
- package/Widgets/Representations/TranslateTransformHandleRepresentation/TransformHandleSource.js +1 -2
- package/Widgets/Representations/TranslateTransformHandleRepresentation.js +1 -2
- package/Widgets/Representations/WidgetRepresentation.js +6 -20
- package/Widgets/Widgets3D/AngleWidget.js +1 -2
- package/Widgets/Widgets3D/EllipseWidget.js +1 -2
- package/Widgets/Widgets3D/ImageCroppingWidget.js +1 -2
- package/Widgets/Widgets3D/ImplicitPlaneWidget.js +1 -3
- package/Widgets/Widgets3D/InteractiveOrientationWidget/helpers.js +6 -7
- package/Widgets/Widgets3D/InteractiveOrientationWidget/state.js +0 -1
- package/Widgets/Widgets3D/InteractiveOrientationWidget.js +1 -2
- package/Widgets/Widgets3D/LabelWidget.js +1 -2
- package/Widgets/Widgets3D/LineWidget/behavior.js +1 -2
- package/Widgets/Widgets3D/LineWidget/helpers.js +1 -2
- package/Widgets/Widgets3D/LineWidget.js +1 -2
- package/Widgets/Widgets3D/PaintWidget.js +1 -2
- package/Widgets/Widgets3D/PolyLineWidget/behavior.js +3 -4
- package/Widgets/Widgets3D/PolyLineWidget.js +1 -2
- package/Widgets/Widgets3D/RectangleWidget.js +1 -2
- package/Widgets/Widgets3D/ResliceCursorWidget/Constants.js +0 -1
- package/Widgets/Widgets3D/ResliceCursorWidget/behavior.js +0 -1
- package/Widgets/Widgets3D/ResliceCursorWidget/helpers.js +2 -3
- package/Widgets/Widgets3D/ResliceCursorWidget/state.js +1 -3
- package/Widgets/Widgets3D/ResliceCursorWidget.js +1 -3
- package/Widgets/Widgets3D/SeedWidget/behavior.js +15 -14
- package/Widgets/Widgets3D/SeedWidget.d.ts +18 -1
- package/Widgets/Widgets3D/SeedWidget.js +1 -2
- package/Widgets/Widgets3D/ShapeWidget/behavior.js +7 -10
- package/Widgets/Widgets3D/ShapeWidget.js +1 -2
- package/Widgets/Widgets3D/SphereWidget.js +1 -2
- package/Widgets/Widgets3D/SplineWidget/behavior.js +13 -13
- package/Widgets/Widgets3D/SplineWidget.js +1 -2
- package/Widgets/Widgets3D/TransformControlsWidget.js +1 -2
- package/_virtual/rollup-plugin-worker-loader__module_Sources/Filters/General/PaintFilter/PaintFilter.worker.js +20 -25
- package/macros2.js +46 -114
- package/package.json +24 -16
|
@@ -69,9 +69,7 @@ function vtkVolumeProperty(publicAPI, model) {
|
|
|
69
69
|
};
|
|
70
70
|
|
|
71
71
|
// Set the color of a volume to a gray transfer function
|
|
72
|
-
publicAPI.setGrayTransferFunction =
|
|
73
|
-
let index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
74
|
-
let func = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
72
|
+
publicAPI.setGrayTransferFunction = (index = 0, func = null) => {
|
|
75
73
|
let modified = false;
|
|
76
74
|
if (model.componentData[index].grayTransferFunction !== func) {
|
|
77
75
|
model.componentData[index].grayTransferFunction = func;
|
|
@@ -88,8 +86,7 @@ function vtkVolumeProperty(publicAPI, model) {
|
|
|
88
86
|
};
|
|
89
87
|
|
|
90
88
|
// Get the currently set gray transfer function. Create one if none set.
|
|
91
|
-
publicAPI.getGrayTransferFunction =
|
|
92
|
-
let index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
89
|
+
publicAPI.getGrayTransferFunction = (index = 0) => {
|
|
93
90
|
if (model.componentData[index].grayTransferFunction === null) {
|
|
94
91
|
model.componentData[index].grayTransferFunction = vtkPiecewiseFunction.newInstance();
|
|
95
92
|
model.componentData[index].grayTransferFunction.addPoint(0, 0.0);
|
|
@@ -103,9 +100,7 @@ function vtkVolumeProperty(publicAPI, model) {
|
|
|
103
100
|
};
|
|
104
101
|
|
|
105
102
|
// Set the color of a volume to an RGB transfer function
|
|
106
|
-
publicAPI.setRGBTransferFunction =
|
|
107
|
-
let index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
108
|
-
let func = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
103
|
+
publicAPI.setRGBTransferFunction = (index = 0, func = null) => {
|
|
109
104
|
let modified = false;
|
|
110
105
|
if (model.componentData[index].rGBTransferFunction !== func) {
|
|
111
106
|
model.componentData[index].rGBTransferFunction = func;
|
|
@@ -122,8 +117,7 @@ function vtkVolumeProperty(publicAPI, model) {
|
|
|
122
117
|
};
|
|
123
118
|
|
|
124
119
|
// Get the currently set RGB transfer function. Create one if none set.
|
|
125
|
-
publicAPI.getRGBTransferFunction =
|
|
126
|
-
let index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
120
|
+
publicAPI.getRGBTransferFunction = (index = 0) => {
|
|
127
121
|
if (model.componentData[index].rGBTransferFunction === null) {
|
|
128
122
|
model.componentData[index].rGBTransferFunction = vtkColorTransferFunction.newInstance();
|
|
129
123
|
model.componentData[index].rGBTransferFunction.addRGBPoint(0, 0.0, 0.0, 0.0);
|
|
@@ -137,9 +131,7 @@ function vtkVolumeProperty(publicAPI, model) {
|
|
|
137
131
|
};
|
|
138
132
|
|
|
139
133
|
// Set the scalar opacity of a volume to a transfer function
|
|
140
|
-
publicAPI.setScalarOpacity =
|
|
141
|
-
let index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
142
|
-
let func = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
134
|
+
publicAPI.setScalarOpacity = (index = 0, func = null) => {
|
|
143
135
|
if (model.componentData[index].scalarOpacity !== func) {
|
|
144
136
|
model.componentData[index].scalarOpacity = func;
|
|
145
137
|
publicAPI.modified();
|
|
@@ -149,8 +141,7 @@ function vtkVolumeProperty(publicAPI, model) {
|
|
|
149
141
|
};
|
|
150
142
|
|
|
151
143
|
// Get the scalar opacity transfer function. Create one if none set.
|
|
152
|
-
publicAPI.getScalarOpacity =
|
|
153
|
-
let index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
144
|
+
publicAPI.getScalarOpacity = (index = 0) => {
|
|
154
145
|
if (model.componentData[index].scalarOpacity === null) {
|
|
155
146
|
model.componentData[index].scalarOpacity = vtkPiecewiseFunction.newInstance();
|
|
156
147
|
model.componentData[index].scalarOpacity.addPoint(0, 1.0);
|
|
@@ -159,9 +150,7 @@ function vtkVolumeProperty(publicAPI, model) {
|
|
|
159
150
|
}
|
|
160
151
|
return model.componentData[index].scalarOpacity;
|
|
161
152
|
};
|
|
162
|
-
publicAPI.setComponentWeight =
|
|
163
|
-
let index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
164
|
-
let value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
153
|
+
publicAPI.setComponentWeight = (index = 0, value = 1) => {
|
|
165
154
|
if (index < 0 || index >= VTK_MAX_VRCOMP) {
|
|
166
155
|
vtkErrorMacro('Invalid index');
|
|
167
156
|
return false;
|
|
@@ -174,8 +163,7 @@ function vtkVolumeProperty(publicAPI, model) {
|
|
|
174
163
|
}
|
|
175
164
|
return false;
|
|
176
165
|
};
|
|
177
|
-
publicAPI.getComponentWeight =
|
|
178
|
-
let index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
166
|
+
publicAPI.getComponentWeight = (index = 0) => {
|
|
179
167
|
if (index < 0 || index >= VTK_MAX_VRCOMP) {
|
|
180
168
|
vtkErrorMacro('Invalid index');
|
|
181
169
|
return 0.0;
|
|
@@ -261,8 +249,7 @@ const defaultValues = initialValues => ({
|
|
|
261
249
|
|
|
262
250
|
// ----------------------------------------------------------------------------
|
|
263
251
|
|
|
264
|
-
function extend(publicAPI, model) {
|
|
265
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
252
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
266
253
|
Object.assign(model, defaultValues(initialValues));
|
|
267
254
|
|
|
268
255
|
// Build VTK API
|
|
@@ -129,8 +129,7 @@ const DEFAULT_VALUES = {
|
|
|
129
129
|
|
|
130
130
|
// ----------------------------------------------------------------------------
|
|
131
131
|
|
|
132
|
-
function extend(publicAPI, model) {
|
|
133
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
132
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
134
133
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
135
134
|
|
|
136
135
|
// Create internal instances
|
|
@@ -173,8 +173,7 @@ const DEFAULT_VALUES = {
|
|
|
173
173
|
|
|
174
174
|
// ----------------------------------------------------------------------------
|
|
175
175
|
|
|
176
|
-
function extend(publicAPI, model) {
|
|
177
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
176
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
178
177
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
179
178
|
|
|
180
179
|
// Object methods
|
|
@@ -91,8 +91,7 @@ const DEFAULT_VALUES = {
|
|
|
91
91
|
|
|
92
92
|
// ----------------------------------------------------------------------------
|
|
93
93
|
|
|
94
|
-
function extend(publicAPI, model) {
|
|
95
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
94
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
96
95
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
97
96
|
|
|
98
97
|
// Object methods
|
|
@@ -203,8 +203,7 @@ const DEFAULT_VALUES = {
|
|
|
203
203
|
|
|
204
204
|
// ----------------------------------------------------------------------------
|
|
205
205
|
|
|
206
|
-
function extend(publicAPI, model) {
|
|
207
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
206
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
208
207
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
209
208
|
macro.obj(publicAPI, model, initialValues);
|
|
210
209
|
macro.get(publicAPI, model, ['container', 'viewStream', 'canvasView', 'interactor', 'interactorStyle', 'interactiveQuality', 'interactiveRatio', 'stillQuality', 'stillRatio', 'canvasElement']);
|
|
@@ -135,8 +135,7 @@ const DEFAULT_VALUES = {
|
|
|
135
135
|
|
|
136
136
|
// ----------------------------------------------------------------------------
|
|
137
137
|
|
|
138
|
-
function extend(publicAPI, model) {
|
|
139
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
138
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
140
139
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
141
140
|
|
|
142
141
|
// Object methods
|
|
@@ -95,9 +95,7 @@ const DEFAULT_VALUES = {
|
|
|
95
95
|
// srcRenderer: null,
|
|
96
96
|
// dstRenderer: null,
|
|
97
97
|
};
|
|
98
|
-
|
|
99
|
-
function extend(publicAPI, model) {
|
|
100
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
98
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
101
99
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
102
100
|
|
|
103
101
|
// Build VTK API
|
|
@@ -7,12 +7,11 @@ class CameraSync {
|
|
|
7
7
|
this.behavior = vtkCameraSynchronizer.newInstance(this.getProperties(config));
|
|
8
8
|
this.behavior.update();
|
|
9
9
|
}
|
|
10
|
-
getProperties(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} = _ref;
|
|
10
|
+
getProperties({
|
|
11
|
+
actorBounds,
|
|
12
|
+
srcRenderer,
|
|
13
|
+
dstRenderer
|
|
14
|
+
}) {
|
|
16
15
|
const distance = 3.4 * Math.max(actorBounds[1] - actorBounds[0], actorBounds[3] - actorBounds[2], actorBounds[5] - actorBounds[4]);
|
|
17
16
|
const focalPoint = [0.5 * (actorBounds[0] + actorBounds[1]), 0.5 * (actorBounds[2] + actorBounds[3]), 0.5 * (actorBounds[4] + actorBounds[5])];
|
|
18
17
|
const mode = vtkCameraSynchronizer.SynchronizationMode.MODE_ORIENTATION;
|
|
@@ -63,8 +63,7 @@ function extractInstanceIds(argList) {
|
|
|
63
63
|
|
|
64
64
|
// ----------------------------------------------------------------------------
|
|
65
65
|
|
|
66
|
-
function extractDependencyIds(state) {
|
|
67
|
-
let depList = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
66
|
+
function extractDependencyIds(state, depList = []) {
|
|
68
67
|
if (state.dependencies) {
|
|
69
68
|
state.dependencies.forEach(childState => {
|
|
70
69
|
depList.push(childState.id);
|
|
@@ -130,8 +129,7 @@ function update(type, instance, props, context) {
|
|
|
130
129
|
|
|
131
130
|
// ----------------------------------------------------------------------------
|
|
132
131
|
|
|
133
|
-
function build(type) {
|
|
134
|
-
let initialProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
132
|
+
function build(type, initialProps = {}) {
|
|
135
133
|
const handler = TYPE_HANDLERS[type];
|
|
136
134
|
if (handler && handler.build) {
|
|
137
135
|
// DEBUG console.log(`new ${type} - ${initialProps.managedInstanceId}`);
|
|
@@ -180,10 +178,7 @@ function clearAllOneTimeUpdaters() {
|
|
|
180
178
|
|
|
181
179
|
// ----------------------------------------------------------------------------
|
|
182
180
|
|
|
183
|
-
function clearOneTimeUpdaters() {
|
|
184
|
-
for (var _len = arguments.length, ids = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
185
|
-
ids[_key] = arguments[_key];
|
|
186
|
-
}
|
|
181
|
+
function clearOneTimeUpdaters(...ids) {
|
|
187
182
|
if (ids.length === 0) {
|
|
188
183
|
return clearAllOneTimeUpdaters();
|
|
189
184
|
}
|
|
@@ -265,7 +260,6 @@ function genericUpdater(instance, state, context) {
|
|
|
265
260
|
console.log('Error fetching array', JSON.stringify(arrayMetadata), error);
|
|
266
261
|
}).finally(context.end); // -> end(arrays)
|
|
267
262
|
});
|
|
268
|
-
|
|
269
263
|
context.start(); // -> start(arraysToBind)
|
|
270
264
|
dependencies.push(Promise.all(promises).then(() => {
|
|
271
265
|
// Since some arrays are getting updated, we should modify our dataset
|
|
@@ -279,7 +273,6 @@ function genericUpdater(instance, state, context) {
|
|
|
279
273
|
}).finally(context.end) // -> end(arraysToBind)
|
|
280
274
|
);
|
|
281
275
|
}
|
|
282
|
-
|
|
283
276
|
context.end(); // -> end(generic-updater)
|
|
284
277
|
return Promise.all(dependencies);
|
|
285
278
|
}
|
|
@@ -395,17 +388,14 @@ function colorTransferFunctionUpdater(instance, state, context) {
|
|
|
395
388
|
if (!state.properties.nodes) {
|
|
396
389
|
instance.set(state.properties);
|
|
397
390
|
} else {
|
|
398
|
-
const nodes = state.properties.nodes.map(
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
sharpness
|
|
407
|
-
};
|
|
408
|
-
});
|
|
391
|
+
const nodes = state.properties.nodes.map(([x, r, g, b, midpoint, sharpness]) => ({
|
|
392
|
+
x,
|
|
393
|
+
r,
|
|
394
|
+
g,
|
|
395
|
+
b,
|
|
396
|
+
midpoint,
|
|
397
|
+
sharpness
|
|
398
|
+
}));
|
|
409
399
|
instance.set({
|
|
410
400
|
...state.properties,
|
|
411
401
|
nodes
|
|
@@ -413,21 +403,17 @@ function colorTransferFunctionUpdater(instance, state, context) {
|
|
|
413
403
|
}
|
|
414
404
|
context.end(); // -> end(colorTransferFunctionUpdater)
|
|
415
405
|
}
|
|
416
|
-
|
|
417
406
|
function piecewiseFunctionUpdater(instance, state, context) {
|
|
418
407
|
context.start(); // -> start(piecewiseFunctionUpdater)
|
|
419
408
|
if (!state.properties.nodes) {
|
|
420
409
|
instance.set(state.properties);
|
|
421
410
|
} else {
|
|
422
|
-
const nodes = state.properties.nodes.map(
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
sharpness
|
|
429
|
-
};
|
|
430
|
-
});
|
|
411
|
+
const nodes = state.properties.nodes.map(([x, y, midpoint, sharpness]) => ({
|
|
412
|
+
x,
|
|
413
|
+
y,
|
|
414
|
+
midpoint,
|
|
415
|
+
sharpness
|
|
416
|
+
}));
|
|
431
417
|
instance.set({
|
|
432
418
|
...state.properties,
|
|
433
419
|
nodes
|
|
@@ -464,8 +450,7 @@ function getArrayKey(arrayMeta) {
|
|
|
464
450
|
const namePart = arrayMeta.name ? `_${arrayMeta.name}` : '';
|
|
465
451
|
return `${arrayMeta.hash}_${arrayMeta.dataType}${namePart}`;
|
|
466
452
|
}
|
|
467
|
-
function createDataSetUpdate() {
|
|
468
|
-
let piecesToFetch = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
453
|
+
function createDataSetUpdate(piecesToFetch = []) {
|
|
469
454
|
return (instance, state, context) => {
|
|
470
455
|
context.start(); // -> start(dataset-update)
|
|
471
456
|
|
|
@@ -505,11 +490,10 @@ function createDataSetUpdate() {
|
|
|
505
490
|
cellData: new Set(),
|
|
506
491
|
fieldData: new Set()
|
|
507
492
|
};
|
|
508
|
-
fieldsArrays.forEach(
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
} = _ref3;
|
|
493
|
+
fieldsArrays.forEach(({
|
|
494
|
+
location,
|
|
495
|
+
name
|
|
496
|
+
}) => {
|
|
513
497
|
arrayToKeep[location].add(name);
|
|
514
498
|
});
|
|
515
499
|
removeUnavailableArrays(instance.getPointData(), arrayToKeep.pointData);
|
|
@@ -534,9 +518,7 @@ const imageDataUpdater = createDataSetUpdate([]);
|
|
|
534
518
|
// Construct the type mapping
|
|
535
519
|
// ----------------------------------------------------------------------------
|
|
536
520
|
|
|
537
|
-
function setTypeMapping(type) {
|
|
538
|
-
let buildFn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
539
|
-
let updateFn = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : genericUpdater;
|
|
521
|
+
function setTypeMapping(type, buildFn = null, updateFn = genericUpdater) {
|
|
540
522
|
if (!build && !update) {
|
|
541
523
|
delete TYPE_HANDLERS[type];
|
|
542
524
|
return;
|
|
@@ -661,8 +643,7 @@ const DEFAULT_MAPPING = {
|
|
|
661
643
|
|
|
662
644
|
// ----------------------------------------------------------------------------
|
|
663
645
|
|
|
664
|
-
function setDefaultMapping() {
|
|
665
|
-
let reset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
646
|
+
function setDefaultMapping(reset = true) {
|
|
666
647
|
if (reset) {
|
|
667
648
|
clearTypeMapping();
|
|
668
649
|
}
|
|
@@ -180,8 +180,7 @@ function createSceneMtimeHandler() {
|
|
|
180
180
|
|
|
181
181
|
// ----------------------------------------------------------------------------
|
|
182
182
|
|
|
183
|
-
function getSynchronizerContext() {
|
|
184
|
-
let name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'default';
|
|
183
|
+
function getSynchronizerContext(name = 'default') {
|
|
185
184
|
let ctx = SYNCHRONIZER_CONTEXTS[name];
|
|
186
185
|
if (!ctx) {
|
|
187
186
|
ctx = {
|
|
@@ -296,8 +295,7 @@ const DEFAULT_VALUES = {
|
|
|
296
295
|
|
|
297
296
|
// ----------------------------------------------------------------------------
|
|
298
297
|
|
|
299
|
-
function extend(publicAPI, model) {
|
|
300
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
298
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
301
299
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
302
300
|
|
|
303
301
|
// Build VTK API
|
|
@@ -316,8 +314,7 @@ const newInstance = newInstance$1(extend, 'vtkSynchronizableRenderWindow');
|
|
|
316
314
|
// More Static methods
|
|
317
315
|
// ----------------------------------------------------------------------------
|
|
318
316
|
|
|
319
|
-
function decorate(renderWindow) {
|
|
320
|
-
let name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'default';
|
|
317
|
+
function decorate(renderWindow, name = 'default') {
|
|
321
318
|
const addOn = createSyncFunction(renderWindow, getSynchronizerContext(name));
|
|
322
319
|
return {
|
|
323
320
|
...addOn,
|
|
@@ -130,8 +130,7 @@ const DEFAULT_VALUES = {
|
|
|
130
130
|
|
|
131
131
|
// ----------------------------------------------------------------------------
|
|
132
132
|
|
|
133
|
-
function extend(publicAPI, model) {
|
|
134
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
133
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
135
134
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
136
135
|
macro.obj(publicAPI, model);
|
|
137
136
|
|
|
@@ -153,8 +153,7 @@ const DEFAULT_VALUES = {
|
|
|
153
153
|
|
|
154
154
|
// ----------------------------------------------------------------------------
|
|
155
155
|
|
|
156
|
-
function extend(publicAPI, model) {
|
|
157
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
156
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
158
157
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
159
158
|
|
|
160
159
|
// Inheritance
|
|
@@ -141,8 +141,7 @@ const DEFAULT_VALUES = {
|
|
|
141
141
|
|
|
142
142
|
// ----------------------------------------------------------------------------
|
|
143
143
|
|
|
144
|
-
function extend(publicAPI, model) {
|
|
145
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
144
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
146
145
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
147
146
|
|
|
148
147
|
// Inheritance
|
|
@@ -40,7 +40,6 @@ function vtkOpenGLBufferObject(publicAPI, model) {
|
|
|
40
40
|
/* eslint-enable no-fallthrough */
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
|
|
44
43
|
let internalType = null;
|
|
45
44
|
let internalHandle = null;
|
|
46
45
|
let dirty = true;
|
|
@@ -123,8 +122,7 @@ const DEFAULT_VALUES = {
|
|
|
123
122
|
|
|
124
123
|
// ----------------------------------------------------------------------------
|
|
125
124
|
|
|
126
|
-
function extend(publicAPI, model) {
|
|
127
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
125
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
128
126
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
129
127
|
|
|
130
128
|
// Object methods
|
|
@@ -61,8 +61,7 @@ const DEFAULT_VALUES = {
|
|
|
61
61
|
|
|
62
62
|
// ----------------------------------------------------------------------------
|
|
63
63
|
|
|
64
|
-
function extend(publicAPI, model) {
|
|
65
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
64
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
66
65
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
67
66
|
|
|
68
67
|
// Inheritance
|
|
@@ -28,8 +28,7 @@ function vtkOpenGLCellArrayBufferObject(publicAPI, model) {
|
|
|
28
28
|
// Set our className
|
|
29
29
|
model.classHierarchy.push('vtkOpenGLCellArrayBufferObject');
|
|
30
30
|
publicAPI.setType(ObjectType.ARRAY_BUFFER);
|
|
31
|
-
publicAPI.createVBO =
|
|
32
|
-
let selectionMaps = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
|
|
31
|
+
publicAPI.createVBO = (cellArray, inRep, outRep, options, selectionMaps = null) => {
|
|
33
32
|
if (!cellArray.getData() || !cellArray.getData().length) {
|
|
34
33
|
model.elementCount = 0;
|
|
35
34
|
return 0;
|
|
@@ -358,8 +357,7 @@ const DEFAULT_VALUES = {
|
|
|
358
357
|
|
|
359
358
|
// ----------------------------------------------------------------------------
|
|
360
359
|
|
|
361
|
-
function extend(publicAPI, model) {
|
|
362
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
360
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
363
361
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
364
362
|
|
|
365
363
|
// Inheritance
|
|
@@ -20,7 +20,7 @@ function vtkConvolution2DPass(publicAPI, model) {
|
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
// handles post-processing via convolution kernel and call delegate
|
|
23
|
-
publicAPI.traverse =
|
|
23
|
+
publicAPI.traverse = (viewNode, parent = null) => {
|
|
24
24
|
if (model.deleted) {
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
@@ -195,8 +195,7 @@ const DEFAULT_VALUES = {
|
|
|
195
195
|
|
|
196
196
|
// ----------------------------------------------------------------------------
|
|
197
197
|
|
|
198
|
-
function extend(publicAPI, model) {
|
|
199
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
198
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
200
199
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
201
200
|
|
|
202
201
|
// Build VTK API
|
|
@@ -41,8 +41,7 @@ const DEFAULT_VALUES = {};
|
|
|
41
41
|
|
|
42
42
|
// ----------------------------------------------------------------------------
|
|
43
43
|
|
|
44
|
-
function extend(publicAPI, model) {
|
|
45
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
44
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
46
45
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
47
46
|
|
|
48
47
|
// Inheritance
|
|
@@ -13,8 +13,7 @@ function vtkForwardPass(publicAPI, model) {
|
|
|
13
13
|
// if both volumes and opaque geometry are present
|
|
14
14
|
// it will mix the two together by capturing a zbuffer
|
|
15
15
|
// first
|
|
16
|
-
publicAPI.traverse =
|
|
17
|
-
let parent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
16
|
+
publicAPI.traverse = (viewNode, parent = null) => {
|
|
18
17
|
if (model.deleted) {
|
|
19
18
|
return;
|
|
20
19
|
}
|
|
@@ -121,8 +120,7 @@ const DEFAULT_VALUES = {
|
|
|
121
120
|
|
|
122
121
|
// ----------------------------------------------------------------------------
|
|
123
122
|
|
|
124
|
-
function extend(publicAPI, model) {
|
|
125
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
123
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
126
124
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
127
125
|
|
|
128
126
|
// Build VTK API
|
|
@@ -47,8 +47,7 @@ function vtkFramebuffer(publicAPI, model) {
|
|
|
47
47
|
publicAPI.restorePreviousBuffers = modeIn => {
|
|
48
48
|
// currently a noop on webgl1
|
|
49
49
|
};
|
|
50
|
-
publicAPI.bind =
|
|
51
|
-
let modeArg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
50
|
+
publicAPI.bind = (modeArg = null) => {
|
|
52
51
|
let mode = modeArg;
|
|
53
52
|
if (mode === null) {
|
|
54
53
|
mode = model.context.FRAMEBUFFER;
|
|
@@ -68,8 +67,7 @@ function vtkFramebuffer(publicAPI, model) {
|
|
|
68
67
|
model.glFramebuffer.width = width;
|
|
69
68
|
model.glFramebuffer.height = height;
|
|
70
69
|
};
|
|
71
|
-
publicAPI.setColorBuffer =
|
|
72
|
-
let attachment = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
70
|
+
publicAPI.setColorBuffer = (texture, attachment = 0) => {
|
|
73
71
|
const gl = model.context;
|
|
74
72
|
if (!gl) {
|
|
75
73
|
vtkErrorMacro('you must set the OpenGLRenderWindow before calling setColorBuffer');
|
|
@@ -87,8 +85,7 @@ function vtkFramebuffer(publicAPI, model) {
|
|
|
87
85
|
model.colorBuffers[attachment] = texture;
|
|
88
86
|
gl.framebufferTexture2D(gl.FRAMEBUFFER, glAttachment, gl.TEXTURE_2D, texture.getHandle(), 0);
|
|
89
87
|
};
|
|
90
|
-
publicAPI.removeColorBuffer =
|
|
91
|
-
let attachment = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
88
|
+
publicAPI.removeColorBuffer = (attachment = 0) => {
|
|
92
89
|
const gl = model.context;
|
|
93
90
|
if (!gl) {
|
|
94
91
|
vtkErrorMacro('you must set the OpenGLRenderWindow before calling removeColorBuffer');
|
|
@@ -199,8 +196,7 @@ const DEFAULT_VALUES = {
|
|
|
199
196
|
};
|
|
200
197
|
|
|
201
198
|
// ----------------------------------------------------------------------------
|
|
202
|
-
function extend(publicAPI, model) {
|
|
203
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
199
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
204
200
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
205
201
|
|
|
206
202
|
// Build VTK API
|
|
@@ -489,8 +489,7 @@ const DEFAULT_VALUES = {
|
|
|
489
489
|
|
|
490
490
|
// ----------------------------------------------------------------------------
|
|
491
491
|
|
|
492
|
-
function extend(publicAPI, model) {
|
|
493
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
492
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
494
493
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
495
494
|
|
|
496
495
|
// Inheritance
|