@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
package/IO/XML/XMLReader.js
CHANGED
|
@@ -410,14 +410,12 @@ function vtkXMLReader(publicAPI, model) {
|
|
|
410
410
|
}
|
|
411
411
|
|
|
412
412
|
// Internal method to fetch Array
|
|
413
|
-
function fetchData(url) {
|
|
414
|
-
let option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
413
|
+
function fetchData(url, option = {}) {
|
|
415
414
|
return model.dataAccessHelper.fetchBinary(url, option);
|
|
416
415
|
}
|
|
417
416
|
|
|
418
417
|
// Set DataSet url
|
|
419
|
-
publicAPI.setUrl =
|
|
420
|
-
let option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
418
|
+
publicAPI.setUrl = (url, option = {}) => {
|
|
421
419
|
model.url = url;
|
|
422
420
|
|
|
423
421
|
// Remove the file in the URL
|
|
@@ -430,10 +428,7 @@ function vtkXMLReader(publicAPI, model) {
|
|
|
430
428
|
};
|
|
431
429
|
|
|
432
430
|
// Fetch the actual data arrays
|
|
433
|
-
publicAPI.loadData =
|
|
434
|
-
let option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
435
|
-
return fetchData(model.url, option).then(publicAPI.parseAsArrayBuffer);
|
|
436
|
-
};
|
|
431
|
+
publicAPI.loadData = (option = {}) => fetchData(model.url, option).then(publicAPI.parseAsArrayBuffer);
|
|
437
432
|
publicAPI.parseAsArrayBuffer = arrayBuffer => {
|
|
438
433
|
if (!arrayBuffer) {
|
|
439
434
|
return false;
|
|
@@ -571,8 +566,7 @@ const DEFAULT_VALUES = {
|
|
|
571
566
|
|
|
572
567
|
// ----------------------------------------------------------------------------
|
|
573
568
|
|
|
574
|
-
function extend(publicAPI, model) {
|
|
575
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
569
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
576
570
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
577
571
|
|
|
578
572
|
// Build VTK API
|
package/IO/XML/XMLWriter.js
CHANGED
|
@@ -11,8 +11,7 @@ import { FormatTypes, TYPED_ARRAY } from './XMLWriter/Constants.js';
|
|
|
11
11
|
function compressBlock(uncompressed) {
|
|
12
12
|
return zlibSync(uncompressed);
|
|
13
13
|
}
|
|
14
|
-
function processDataArray(dataArray, format, blockSize) {
|
|
15
|
-
let compressor = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'vtkZLibDataCompressor';
|
|
14
|
+
function processDataArray(dataArray, format, blockSize, compressor = 'vtkZLibDataCompressor') {
|
|
16
15
|
if (format === FormatTypes.ASCII) {
|
|
17
16
|
return dataArray.getData().join(' ');
|
|
18
17
|
}
|
|
@@ -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
|
|
@@ -64,7 +64,6 @@ function vtkAbstractImageInterpolator(publicAPI, model) {
|
|
|
64
64
|
|
|
65
65
|
// TODO get functions
|
|
66
66
|
};
|
|
67
|
-
|
|
68
67
|
publicAPI.internalUpdate = () => {};
|
|
69
68
|
publicAPI.interpolateXYZ = (x, y, z, component) => {
|
|
70
69
|
let value = model.outValue;
|
|
@@ -159,8 +158,7 @@ const DEFAULT_VALUES = {
|
|
|
159
158
|
|
|
160
159
|
// ----------------------------------------------------------------------------
|
|
161
160
|
|
|
162
|
-
function extend(publicAPI, model) {
|
|
163
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
161
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
164
162
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
165
163
|
|
|
166
164
|
// Object methods
|
|
@@ -328,7 +328,6 @@ function vtkImageInterpolator(publicAPI, model) {
|
|
|
328
328
|
constants = new Int16Array(size);
|
|
329
329
|
// constants -= step * outExt[2 * j];
|
|
330
330
|
}
|
|
331
|
-
|
|
332
331
|
weights.kernelSize[j] = step;
|
|
333
332
|
weights.weightExtent[2 * j] = outExt[2 * j];
|
|
334
333
|
weights.weightExtent[2 * j + 1] = outExt[2 * j + 1];
|
|
@@ -444,8 +443,7 @@ const DEFAULT_VALUES = {
|
|
|
444
443
|
|
|
445
444
|
// ----------------------------------------------------------------------------
|
|
446
445
|
|
|
447
|
-
function extend(publicAPI, model) {
|
|
448
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
446
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
449
447
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
450
448
|
|
|
451
449
|
// Inheritance
|
|
@@ -256,10 +256,7 @@ function vtkImagePointDataIterator(publicAPI, model) {
|
|
|
256
256
|
publicAPI.spanEndId = () => model.spanEnd;
|
|
257
257
|
publicAPI.reportProgress = () => {};
|
|
258
258
|
publicAPI.getArray = (array, i) => array.getData().subarray(i * array.getNumberOfComponents());
|
|
259
|
-
publicAPI.getScalars =
|
|
260
|
-
let i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
261
|
-
return publicAPI.getArray(image.getPointData().getScalars(), i);
|
|
262
|
-
};
|
|
259
|
+
publicAPI.getScalars = (image, i = 0) => publicAPI.getArray(image.getPointData().getScalars(), i);
|
|
263
260
|
}
|
|
264
261
|
|
|
265
262
|
// ----------------------------------------------------------------------------
|
|
@@ -294,8 +291,7 @@ const DEFAULT_VALUES = {
|
|
|
294
291
|
|
|
295
292
|
// ----------------------------------------------------------------------------
|
|
296
293
|
|
|
297
|
-
function extend(publicAPI, model) {
|
|
298
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
294
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
299
295
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
300
296
|
|
|
301
297
|
// Object methods
|
|
@@ -243,7 +243,6 @@ function vtkImageReslice(publicAPI, model) {
|
|
|
243
243
|
|
|
244
244
|
// console.timeEnd('reslice');
|
|
245
245
|
};
|
|
246
|
-
|
|
247
246
|
publicAPI.vtkImageResliceExecute = (input, output) => {
|
|
248
247
|
// const outDims = output.getDimensions();
|
|
249
248
|
const inScalars = input.getPointData().getScalars();
|
|
@@ -866,8 +865,7 @@ const DEFAULT_VALUES = {
|
|
|
866
865
|
|
|
867
866
|
// ----------------------------------------------------------------------------
|
|
868
867
|
|
|
869
|
-
function extend(publicAPI, model) {
|
|
870
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
868
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
871
869
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
872
870
|
|
|
873
871
|
// Make this a VTK object
|
|
@@ -89,8 +89,7 @@ const DEFAULT_VALUES = {
|
|
|
89
89
|
|
|
90
90
|
// ----------------------------------------------------------------------------
|
|
91
91
|
|
|
92
|
-
function extend(publicAPI, model) {
|
|
93
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
92
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
94
93
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
95
94
|
|
|
96
95
|
// Make this a VTK object
|
|
@@ -108,8 +108,7 @@ const DEFAULT_VALUES = {
|
|
|
108
108
|
applySettings: null,
|
|
109
109
|
originalMetadata: null
|
|
110
110
|
};
|
|
111
|
-
function extend(publicAPI, model) {
|
|
112
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
111
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
113
112
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
114
113
|
|
|
115
114
|
// Build VTK API
|
|
@@ -157,8 +157,7 @@ const DEFAULT_VALUES = {};
|
|
|
157
157
|
|
|
158
158
|
// ----------------------------------------------------------------------------
|
|
159
159
|
|
|
160
|
-
function extend(publicAPI, model) {
|
|
161
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
160
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
162
161
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
163
162
|
macro.get(publicAPI, model, ['lastWorldPosition', 'lastOrientation']);
|
|
164
163
|
macro.obj(publicAPI, model);
|
|
@@ -28,8 +28,7 @@ const DEFAULT_VALUES = {
|
|
|
28
28
|
|
|
29
29
|
// ----------------------------------------------------------------------------
|
|
30
30
|
|
|
31
|
-
function extend(publicAPI, model) {
|
|
32
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
31
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
33
32
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
34
33
|
|
|
35
34
|
// Create get-set macros
|
|
@@ -35,8 +35,7 @@ const DEFAULT_VALUES = {
|
|
|
35
35
|
|
|
36
36
|
// ----------------------------------------------------------------------------
|
|
37
37
|
|
|
38
|
-
function extend(publicAPI, model) {
|
|
39
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
38
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
40
39
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
41
40
|
|
|
42
41
|
// Create get-set macros
|
|
@@ -18,8 +18,7 @@ const DEFAULT_VALUES = {};
|
|
|
18
18
|
|
|
19
19
|
// ----------------------------------------------------------------------------
|
|
20
20
|
|
|
21
|
-
function extend(publicAPI, model) {
|
|
22
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
21
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
23
22
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
24
23
|
|
|
25
24
|
// Object specific methods
|
|
@@ -34,8 +34,7 @@ const DEFAULT_VALUES = {
|
|
|
34
34
|
|
|
35
35
|
// ----------------------------------------------------------------------------
|
|
36
36
|
|
|
37
|
-
function extend(publicAPI, model) {
|
|
38
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
37
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
39
38
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
40
39
|
|
|
41
40
|
// Create get-set macros
|
|
@@ -23,8 +23,7 @@ const DEFAULT_VALUES = {
|
|
|
23
23
|
|
|
24
24
|
// ----------------------------------------------------------------------------
|
|
25
25
|
|
|
26
|
-
function extend(publicAPI, model) {
|
|
27
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
26
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
28
27
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
29
28
|
|
|
30
29
|
// Create get-set macros
|
|
@@ -88,8 +88,7 @@ const DEFAULT_VALUES = {};
|
|
|
88
88
|
|
|
89
89
|
// ----------------------------------------------------------------------------
|
|
90
90
|
|
|
91
|
-
function extend(publicAPI, model) {
|
|
92
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
91
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
93
92
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
94
93
|
|
|
95
94
|
// Inheritance
|
|
@@ -224,8 +224,7 @@ const DEFAULT_VALUES = {
|
|
|
224
224
|
|
|
225
225
|
// ----------------------------------------------------------------------------
|
|
226
226
|
|
|
227
|
-
function extend(publicAPI, model) {
|
|
228
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
227
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
229
228
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
230
229
|
|
|
231
230
|
// Inheritance
|
|
@@ -148,8 +148,7 @@ function DEFAULT_VALUES(initialValues) {
|
|
|
148
148
|
|
|
149
149
|
// ----------------------------------------------------------------------------
|
|
150
150
|
|
|
151
|
-
function extend(publicAPI, model) {
|
|
152
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
151
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
153
152
|
Object.assign(model, DEFAULT_VALUES(initialValues));
|
|
154
153
|
|
|
155
154
|
// Inheritance
|
|
@@ -106,8 +106,7 @@ const DEFAULT_VALUES = {
|
|
|
106
106
|
|
|
107
107
|
// ----------------------------------------------------------------------------
|
|
108
108
|
|
|
109
|
-
function extend(publicAPI, model) {
|
|
110
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
109
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
111
110
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
112
111
|
|
|
113
112
|
// Inheritance
|
|
@@ -75,8 +75,7 @@ const DEFAULT_VALUES = {};
|
|
|
75
75
|
|
|
76
76
|
// ----------------------------------------------------------------------------
|
|
77
77
|
|
|
78
|
-
function extend(publicAPI, model) {
|
|
79
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
78
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
80
79
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
81
80
|
|
|
82
81
|
// Inheritance
|
|
@@ -102,8 +102,7 @@ const DEFAULT_VALUES = {
|
|
|
102
102
|
|
|
103
103
|
// ----------------------------------------------------------------------------
|
|
104
104
|
|
|
105
|
-
function extend(publicAPI, model) {
|
|
106
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
105
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
107
106
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
108
107
|
|
|
109
108
|
// Inheritance
|
|
@@ -57,8 +57,7 @@ const DEFAULT_VALUES = {};
|
|
|
57
57
|
|
|
58
58
|
// ----------------------------------------------------------------------------
|
|
59
59
|
|
|
60
|
-
function extend(publicAPI, model) {
|
|
61
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
60
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
62
61
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
63
62
|
|
|
64
63
|
// Inheritance
|
|
@@ -76,8 +76,7 @@ const DEFAULT_VALUES = {};
|
|
|
76
76
|
|
|
77
77
|
// ----------------------------------------------------------------------------
|
|
78
78
|
|
|
79
|
-
function extend(publicAPI, model) {
|
|
80
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
79
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
81
80
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
82
81
|
|
|
83
82
|
// Inheritance
|
|
@@ -95,8 +95,7 @@ const DEFAULT_VALUES = {};
|
|
|
95
95
|
|
|
96
96
|
// ----------------------------------------------------------------------------
|
|
97
97
|
|
|
98
|
-
function extend(publicAPI, model) {
|
|
99
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
98
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
100
99
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
101
100
|
|
|
102
101
|
// Inheritance
|
|
@@ -93,8 +93,7 @@ const DEFAULT_VALUES = {};
|
|
|
93
93
|
|
|
94
94
|
// ----------------------------------------------------------------------------
|
|
95
95
|
|
|
96
|
-
function extend(publicAPI, model) {
|
|
97
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
96
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
98
97
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
99
98
|
|
|
100
99
|
// Inheritance
|
|
@@ -107,8 +107,7 @@ const DEFAULT_VALUES = {
|
|
|
107
107
|
|
|
108
108
|
// ----------------------------------------------------------------------------
|
|
109
109
|
|
|
110
|
-
function extend(publicAPI, model) {
|
|
111
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
110
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
112
111
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
113
112
|
|
|
114
113
|
// Inheritance
|
|
@@ -84,8 +84,7 @@ const DEFAULT_VALUES = {
|
|
|
84
84
|
|
|
85
85
|
// ----------------------------------------------------------------------------
|
|
86
86
|
|
|
87
|
-
function extend(publicAPI, model) {
|
|
88
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
87
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
89
88
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
90
89
|
|
|
91
90
|
// Inheritance
|
|
@@ -48,8 +48,7 @@ const DEFAULT_VALUES = {
|
|
|
48
48
|
|
|
49
49
|
// ----------------------------------------------------------------------------
|
|
50
50
|
|
|
51
|
-
function extend(publicAPI, model) {
|
|
52
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
51
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
53
52
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
54
53
|
|
|
55
54
|
// Inheritance
|
|
@@ -247,8 +247,7 @@ const DEFAULT_VALUES = {};
|
|
|
247
247
|
|
|
248
248
|
// ----------------------------------------------------------------------------
|
|
249
249
|
|
|
250
|
-
function extend(publicAPI, model) {
|
|
251
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
250
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
252
251
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
253
252
|
|
|
254
253
|
// Inheritance
|
|
@@ -316,8 +316,7 @@ const DEFAULT_VALUES = {
|
|
|
316
316
|
|
|
317
317
|
// ----------------------------------------------------------------------------
|
|
318
318
|
|
|
319
|
-
function extend(publicAPI, model) {
|
|
320
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
319
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
321
320
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
322
321
|
|
|
323
322
|
// Inheritance
|
|
@@ -63,9 +63,7 @@ function vtkMouseRangeManipulator(publicAPI, model) {
|
|
|
63
63
|
// setValue:fn = function to set value
|
|
64
64
|
// scale:number = scale value is applied to mouse event to allow users accelerate or decelerate delta without emitting more events
|
|
65
65
|
//-------------------------------------------------------------------------
|
|
66
|
-
publicAPI.setHorizontalListener =
|
|
67
|
-
let scale = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
|
|
68
|
-
let exponentialScroll = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
|
|
66
|
+
publicAPI.setHorizontalListener = (min, max, step, getValue, setValue, scale = 1, exponentialScroll = false) => {
|
|
69
67
|
const getFn = Number.isFinite(getValue) ? () => getValue : getValue;
|
|
70
68
|
model.horizontalListener = {
|
|
71
69
|
min,
|
|
@@ -81,9 +79,7 @@ function vtkMouseRangeManipulator(publicAPI, model) {
|
|
|
81
79
|
};
|
|
82
80
|
|
|
83
81
|
//-------------------------------------------------------------------------
|
|
84
|
-
publicAPI.setVerticalListener =
|
|
85
|
-
let scale = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
|
|
86
|
-
let exponentialScroll = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
|
|
82
|
+
publicAPI.setVerticalListener = (min, max, step, getValue, setValue, scale = 1, exponentialScroll = false) => {
|
|
87
83
|
const getFn = Number.isFinite(getValue) ? () => getValue : getValue;
|
|
88
84
|
model.verticalListener = {
|
|
89
85
|
min,
|
|
@@ -99,9 +95,7 @@ function vtkMouseRangeManipulator(publicAPI, model) {
|
|
|
99
95
|
};
|
|
100
96
|
|
|
101
97
|
//-------------------------------------------------------------------------
|
|
102
|
-
publicAPI.setScrollListener =
|
|
103
|
-
let scale = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
|
|
104
|
-
let exponentialScroll = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
|
|
98
|
+
publicAPI.setScrollListener = (min, max, step, getValue, setValue, scale = 1, exponentialScroll = false) => {
|
|
105
99
|
if (step < 0) {
|
|
106
100
|
vtkWarningMacro('Value of step cannot be negative. If you want to invert the scrolling direction, use a negative scale value instead.');
|
|
107
101
|
}
|
|
@@ -265,8 +259,7 @@ const DEFAULT_VALUES = {
|
|
|
265
259
|
|
|
266
260
|
// ----------------------------------------------------------------------------
|
|
267
261
|
|
|
268
|
-
function extend(publicAPI, model) {
|
|
269
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
262
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
270
263
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
271
264
|
|
|
272
265
|
// Inheritance
|
|
@@ -50,8 +50,7 @@ const DEFAULT_VALUES = {
|
|
|
50
50
|
|
|
51
51
|
// ----------------------------------------------------------------------------
|
|
52
52
|
|
|
53
|
-
function extend(publicAPI, model) {
|
|
54
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
53
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
55
54
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
56
55
|
macro.obj(publicAPI, model);
|
|
57
56
|
vtkCompositeVRManipulator.extend(publicAPI, model, initialValues);
|
|
@@ -64,8 +64,7 @@ function addCameraToSynchronize(renderWindowInteractor, camera, onCameraUpdate)
|
|
|
64
64
|
}
|
|
65
65
|
return listenerId;
|
|
66
66
|
}
|
|
67
|
-
function removeCameraToSynchronize(id) {
|
|
68
|
-
let cancelAnimation = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
67
|
+
function removeCameraToSynchronize(id, cancelAnimation = true) {
|
|
69
68
|
const listener = listeners[id];
|
|
70
69
|
if (listener) {
|
|
71
70
|
listener.subscription.unsubscribe();
|
|
@@ -25,8 +25,7 @@ const DEFAULT_VALUES = {};
|
|
|
25
25
|
|
|
26
26
|
// ----------------------------------------------------------------------------
|
|
27
27
|
|
|
28
|
-
function extend(publicAPI, model) {
|
|
29
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
28
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
30
29
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
31
30
|
|
|
32
31
|
// Inheritance
|
|
@@ -253,8 +253,7 @@ const DEFAULT_VALUES = {
|
|
|
253
253
|
|
|
254
254
|
// ----------------------------------------------------------------------------
|
|
255
255
|
|
|
256
|
-
function extend(publicAPI, model) {
|
|
257
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
256
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
258
257
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
259
258
|
|
|
260
259
|
// Inheritance
|
|
@@ -169,12 +169,9 @@ function vtkInteractorStyleMPRSlice(publicAPI, model) {
|
|
|
169
169
|
};
|
|
170
170
|
|
|
171
171
|
// in world space
|
|
172
|
-
publicAPI.setSliceNormal =
|
|
172
|
+
publicAPI.setSliceNormal = (...normal) => {
|
|
173
173
|
const renderer = model._interactor.getCurrentRenderer();
|
|
174
174
|
const camera = renderer.getActiveCamera();
|
|
175
|
-
for (var _len = arguments.length, normal = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
176
|
-
normal[_key] = arguments[_key];
|
|
177
|
-
}
|
|
178
175
|
normalize(normal);
|
|
179
176
|
if (model.volumeMapper) {
|
|
180
177
|
const bounds = model.volumeMapper.getBounds();
|
|
@@ -215,8 +212,7 @@ const DEFAULT_VALUES = {};
|
|
|
215
212
|
|
|
216
213
|
// ----------------------------------------------------------------------------
|
|
217
214
|
|
|
218
|
-
function extend(publicAPI, model) {
|
|
219
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
215
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
220
216
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
221
217
|
|
|
222
218
|
// Inheritance
|
|
@@ -609,8 +609,7 @@ const defaultValues = initialValues => ({
|
|
|
609
609
|
|
|
610
610
|
// ----------------------------------------------------------------------------
|
|
611
611
|
|
|
612
|
-
function extend(publicAPI, model) {
|
|
613
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
612
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
614
613
|
Object.assign(model, defaultValues(initialValues));
|
|
615
614
|
|
|
616
615
|
// Inheritance
|
|
@@ -318,8 +318,7 @@ const DEFAULT_VALUES = {
|
|
|
318
318
|
|
|
319
319
|
// ----------------------------------------------------------------------------
|
|
320
320
|
|
|
321
|
-
function extend(publicAPI, model) {
|
|
322
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
321
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
323
322
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
324
323
|
|
|
325
324
|
// Inheritance
|
|
@@ -62,7 +62,6 @@ function vtkInteractorStyleTrackballCamera(publicAPI, model) {
|
|
|
62
62
|
// return;
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
|
-
|
|
66
65
|
publicAPI.handleMove3D = ed => {
|
|
67
66
|
switch (model.state) {
|
|
68
67
|
case States.IS_CAMERA_POSE:
|
|
@@ -340,8 +339,7 @@ const DEFAULT_VALUES = {
|
|
|
340
339
|
|
|
341
340
|
// ----------------------------------------------------------------------------
|
|
342
341
|
|
|
343
|
-
function extend(publicAPI, model) {
|
|
344
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
342
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
345
343
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
346
344
|
|
|
347
345
|
// Inheritance
|
|
@@ -44,8 +44,7 @@ const DEFAULT_VALUES = {};
|
|
|
44
44
|
|
|
45
45
|
// ----------------------------------------------------------------------------
|
|
46
46
|
|
|
47
|
-
function extend(publicAPI, model) {
|
|
48
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
47
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
49
48
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
50
49
|
|
|
51
50
|
// Inheritance
|
|
@@ -17,8 +17,7 @@ const KEY_MAPPING = {
|
|
|
17
17
|
// Static helpers
|
|
18
18
|
// ----------------------------------------------------------------------------
|
|
19
19
|
|
|
20
|
-
function get(path, obj) {
|
|
21
|
-
let fb = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : `$\{${path}}`;
|
|
20
|
+
function get(path, obj, fb = `$\{${path}}`) {
|
|
22
21
|
return path.split('.').reduce((res, key) => res[key] !== undefined ? res[key] : fb, obj);
|
|
23
22
|
}
|
|
24
23
|
|
|
@@ -128,8 +127,7 @@ const DEFAULT_VALUES = {
|
|
|
128
127
|
|
|
129
128
|
// ----------------------------------------------------------------------------
|
|
130
129
|
|
|
131
|
-
function extend(publicAPI, model) {
|
|
132
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
130
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
133
131
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
134
132
|
|
|
135
133
|
// Object methods
|
|
@@ -75,7 +75,6 @@ function vtkFPSMonitor(publicAPI, model) {
|
|
|
75
75
|
if (keys[i] === 'str') {
|
|
76
76
|
continue; // eslint-disable-line
|
|
77
77
|
}
|
|
78
|
-
|
|
79
78
|
if (stats[keys[i]]) {
|
|
80
79
|
infoItems.push(`<label class="${style.label}">${keys[i]}</label><span class="${style.value}">${formatNumbers(stats[keys[i]])}</span>`);
|
|
81
80
|
}
|
|
@@ -194,8 +193,7 @@ function vtkFPSMonitor(publicAPI, model) {
|
|
|
194
193
|
|
|
195
194
|
// --------------------------------------------------------------------------
|
|
196
195
|
|
|
197
|
-
publicAPI.setOrientation =
|
|
198
|
-
let mode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'horizontal';
|
|
196
|
+
publicAPI.setOrientation = (mode = 'horizontal') => {
|
|
199
197
|
if (mode === 'horizontal') {
|
|
200
198
|
publicAPI.setOrientationToHorizontal();
|
|
201
199
|
} else {
|
|
@@ -215,10 +213,7 @@ function vtkFPSMonitor(publicAPI, model) {
|
|
|
215
213
|
|
|
216
214
|
// --------------------------------------------------------------------------
|
|
217
215
|
|
|
218
|
-
publicAPI.setMonitorVisibility =
|
|
219
|
-
let title = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
220
|
-
let graph = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
221
|
-
let info = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
216
|
+
publicAPI.setMonitorVisibility = (title = true, graph = true, info = true) => {
|
|
222
217
|
publicAPI.setCanvasVisibility(graph);
|
|
223
218
|
publicAPI.setInfoVisibility(info);
|
|
224
219
|
publicAPI.setTitleVisibility(title);
|
|
@@ -256,8 +251,7 @@ const DEFAULT_VALUES = {
|
|
|
256
251
|
|
|
257
252
|
// ----------------------------------------------------------------------------
|
|
258
253
|
|
|
259
|
-
function extend(publicAPI, model) {
|
|
260
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
254
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
261
255
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
262
256
|
|
|
263
257
|
// Object methods
|
package/Interaction/UI/Slider.js
CHANGED
|
@@ -76,7 +76,6 @@ function vtkSlider(publicAPI, model) {
|
|
|
76
76
|
rootElm[method]('mouseup', onMouseUp);
|
|
77
77
|
/* eslint-enable no-use-before-define */
|
|
78
78
|
}
|
|
79
|
-
|
|
80
79
|
function onMouseMove(e) {
|
|
81
80
|
e.preventDefault();
|
|
82
81
|
if (isDragging) {
|
|
@@ -212,8 +211,7 @@ const DEFAULT_VALUES = {
|
|
|
212
211
|
|
|
213
212
|
// ----------------------------------------------------------------------------
|
|
214
213
|
|
|
215
|
-
function extend(publicAPI, model) {
|
|
216
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
214
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
217
215
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
218
216
|
|
|
219
217
|
// Object methods
|