@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
|
@@ -78,8 +78,7 @@ function vtkKochanekSpline1D(publicAPI, model) {
|
|
|
78
78
|
|
|
79
79
|
// --------------------------------------------------------------------------
|
|
80
80
|
|
|
81
|
-
publicAPI.computeOpenCoefficients =
|
|
82
|
-
let options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
|
|
81
|
+
publicAPI.computeOpenCoefficients = (size, work, x, y, options = {}) => {
|
|
83
82
|
if (!model.coefficients || model.coefficients.length !== 4 * size) {
|
|
84
83
|
model.coefficients = new Float32Array(4 * size);
|
|
85
84
|
}
|
|
@@ -192,8 +191,7 @@ const DEFAULT_VALUES = {
|
|
|
192
191
|
|
|
193
192
|
// ----------------------------------------------------------------------------
|
|
194
193
|
|
|
195
|
-
function extend(publicAPI, model) {
|
|
196
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
194
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
197
195
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
198
196
|
vtkSpline1D.extend(publicAPI, model, initialValues);
|
|
199
197
|
|
package/Common/DataModel/Line.js
CHANGED
|
@@ -11,8 +11,7 @@ const {
|
|
|
11
11
|
// ----------------------------------------------------------------------------
|
|
12
12
|
// Global methods
|
|
13
13
|
// ----------------------------------------------------------------------------
|
|
14
|
-
function distanceToLine(x, p1, p2) {
|
|
15
|
-
let closestPoint = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
14
|
+
function distanceToLine(x, p1, p2, closestPoint = null) {
|
|
16
15
|
const outObj = {
|
|
17
16
|
t: Number.MIN_VALUE,
|
|
18
17
|
distance: 0
|
|
@@ -236,8 +235,7 @@ const DEFAULT_VALUES = {
|
|
|
236
235
|
|
|
237
236
|
// ----------------------------------------------------------------------------
|
|
238
237
|
|
|
239
|
-
function extend(publicAPI, model) {
|
|
240
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
238
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
241
239
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
242
240
|
vtkCell.extend(publicAPI, model, initialValues);
|
|
243
241
|
macro.setGet(publicAPI, model, ['orientations']);
|
|
@@ -22,8 +22,7 @@ const DEFAULT_VALUES = {
|
|
|
22
22
|
|
|
23
23
|
// ----------------------------------------------------------------------------
|
|
24
24
|
|
|
25
|
-
function extend(publicAPI, model) {
|
|
26
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
25
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
27
26
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
28
27
|
|
|
29
28
|
// Make this a VTK object
|
|
@@ -105,8 +105,7 @@ function defaultValues(initialValues) {
|
|
|
105
105
|
|
|
106
106
|
// ----------------------------------------------------------------------------
|
|
107
107
|
|
|
108
|
-
function extend(publicAPI, model) {
|
|
109
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
108
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
110
109
|
vtkPointLocator.extend(publicAPI, model, defaultValues(initialValues));
|
|
111
110
|
|
|
112
111
|
// Make this a VTK object
|
|
@@ -29,8 +29,7 @@ const DEFAULT_VALUES = {
|
|
|
29
29
|
|
|
30
30
|
// ----------------------------------------------------------------------------
|
|
31
31
|
|
|
32
|
-
function extend(publicAPI, model) {
|
|
33
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
32
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
34
33
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
35
34
|
|
|
36
35
|
// Object methods
|
|
@@ -382,8 +382,7 @@ function vtkPiecewiseFunction(publicAPI, model) {
|
|
|
382
382
|
// Returns a table of function values evaluated at regular intervals
|
|
383
383
|
/* eslint-disable prefer-destructuring */
|
|
384
384
|
/* eslint-disable no-continue */
|
|
385
|
-
publicAPI.getTable =
|
|
386
|
-
let stride = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
|
|
385
|
+
publicAPI.getTable = (xStart, xEnd, size, table, stride = 1) => {
|
|
387
386
|
let i;
|
|
388
387
|
let idx = 0;
|
|
389
388
|
const numNodes = model.nodes.length;
|
|
@@ -543,8 +542,7 @@ const DEFAULT_VALUES = {
|
|
|
543
542
|
|
|
544
543
|
// ----------------------------------------------------------------------------
|
|
545
544
|
|
|
546
|
-
function extend(publicAPI, model) {
|
|
547
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
545
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
548
546
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
549
547
|
|
|
550
548
|
// Inheritance
|
|
@@ -231,8 +231,7 @@ const DEFAULT_VALUES = {
|
|
|
231
231
|
|
|
232
232
|
// ----------------------------------------------------------------------------
|
|
233
233
|
|
|
234
|
-
function extend(publicAPI, model) {
|
|
235
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
234
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
236
235
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
237
236
|
|
|
238
237
|
// Object methods
|
|
@@ -229,8 +229,7 @@ function vtkPlanes(publicAPI, model) {
|
|
|
229
229
|
* @param {vtkPlane} plane the vtkPlane instance to fill
|
|
230
230
|
* @returns {vtkPlane} the plane instance
|
|
231
231
|
*/
|
|
232
|
-
publicAPI.getPlane =
|
|
233
|
-
let plane = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : model.plane;
|
|
232
|
+
publicAPI.getPlane = (i, plane = model.plane) => {
|
|
234
233
|
if (i >= 0 && i < publicAPI.getNumberOfPlanes()) {
|
|
235
234
|
const normal = model.normals.getTuple(i);
|
|
236
235
|
const point = model.points.getPoint(i);
|
|
@@ -254,8 +253,7 @@ const DEFAULT_VALUES = {
|
|
|
254
253
|
|
|
255
254
|
// ----------------------------------------------------------------------------
|
|
256
255
|
|
|
257
|
-
function extend(publicAPI, model) {
|
|
258
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
256
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
259
257
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
260
258
|
|
|
261
259
|
// Build VTK API
|
|
@@ -166,7 +166,6 @@ function vtkPointLocator(publicAPI, model) {
|
|
|
166
166
|
if (!model.hashTable.has(key)) {
|
|
167
167
|
model.hashTable.set(key, []); // Initialize bucket if it doesn't exist
|
|
168
168
|
}
|
|
169
|
-
|
|
170
169
|
const bucket = model.hashTable.get(key);
|
|
171
170
|
bucket.push(i);
|
|
172
171
|
}
|
|
@@ -182,8 +181,7 @@ function vtkPointLocator(publicAPI, model) {
|
|
|
182
181
|
* @param {Bounds} bounds The bounds for the points
|
|
183
182
|
* @param {Number} estNumPts Estimated number of points for insertion
|
|
184
183
|
*/
|
|
185
|
-
publicAPI.initPointInsertion =
|
|
186
|
-
let estNumPts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
184
|
+
publicAPI.initPointInsertion = (points, bounds, estNumPts = 0) => {
|
|
187
185
|
if (points == null) {
|
|
188
186
|
vtkErrorMacro('A valid vtkPoints object is required for point insertion');
|
|
189
187
|
return false;
|
|
@@ -377,8 +375,7 @@ function vtkPointLocator(publicAPI, model) {
|
|
|
377
375
|
* @param {Number} inputDataLength The length of the input data
|
|
378
376
|
* @returns {IFindClosestPointResult} The closest point result
|
|
379
377
|
*/
|
|
380
|
-
publicAPI.findClosestPointWithinRadius =
|
|
381
|
-
let inputDataLength = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
378
|
+
publicAPI.findClosestPointWithinRadius = (radius, x, inputDataLength = 0) => {
|
|
382
379
|
publicAPI.buildLocator();
|
|
383
380
|
let closest = -1;
|
|
384
381
|
const radius2 = radius * radius;
|
|
@@ -726,8 +723,7 @@ function defaultValues(initialValues) {
|
|
|
726
723
|
...initialValues
|
|
727
724
|
};
|
|
728
725
|
}
|
|
729
|
-
function extend(publicAPI, model) {
|
|
730
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
726
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
731
727
|
vtkAbstractPointLocator.extend(publicAPI, model, defaultValues(initialValues));
|
|
732
728
|
macro.setGet(publicAPI, model, ['numberOfPointsPerBucket', 'points']);
|
|
733
729
|
macro.setGetArray(publicAPI, model, ['divisions'], 3);
|
|
@@ -27,8 +27,7 @@ function vtkPointSet(publicAPI, model) {
|
|
|
27
27
|
publicAPI.getBounds();
|
|
28
28
|
};
|
|
29
29
|
const superShallowCopy = publicAPI.shallowCopy;
|
|
30
|
-
publicAPI.shallowCopy =
|
|
31
|
-
let debug = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
30
|
+
publicAPI.shallowCopy = (other, debug = false) => {
|
|
32
31
|
superShallowCopy(other, debug);
|
|
33
32
|
model.points = vtkPoints.newInstance();
|
|
34
33
|
model.points.shallowCopy(other.getPoints());
|
|
@@ -55,8 +54,7 @@ const DEFAULT_VALUES = {
|
|
|
55
54
|
|
|
56
55
|
// ----------------------------------------------------------------------------
|
|
57
56
|
|
|
58
|
-
function extend(publicAPI, model) {
|
|
59
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
57
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
60
58
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
61
59
|
|
|
62
60
|
// Inheritance
|
|
@@ -53,8 +53,7 @@ function vtkPolyData(publicAPI, model) {
|
|
|
53
53
|
});
|
|
54
54
|
publicAPI.getNumberOfCells = () => POLYDATA_FIELDS.reduce((num, cellType) => num + model[cellType].getNumberOfCells(), 0);
|
|
55
55
|
const superShallowCopy = publicAPI.shallowCopy;
|
|
56
|
-
publicAPI.shallowCopy =
|
|
57
|
-
let debug = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
56
|
+
publicAPI.shallowCopy = (other, debug = false) => {
|
|
58
57
|
superShallowCopy(other, debug);
|
|
59
58
|
POLYDATA_FIELDS.forEach(type => {
|
|
60
59
|
model[type] = vtkCellArray.newInstance();
|
|
@@ -155,8 +154,7 @@ function vtkPolyData(publicAPI, model) {
|
|
|
155
154
|
* Create upward links from points to cells that use each point. Enables
|
|
156
155
|
* topologically complex queries.
|
|
157
156
|
*/
|
|
158
|
-
publicAPI.buildLinks =
|
|
159
|
-
let initialSize = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
157
|
+
publicAPI.buildLinks = (initialSize = 0) => {
|
|
160
158
|
if (model.cells == null) {
|
|
161
159
|
publicAPI.buildCells();
|
|
162
160
|
}
|
|
@@ -213,8 +211,7 @@ function vtkPolyData(publicAPI, model) {
|
|
|
213
211
|
/**
|
|
214
212
|
* If you know the type of cell, you may provide it to improve performances.
|
|
215
213
|
*/
|
|
216
|
-
publicAPI.getCell =
|
|
217
|
-
let cellHint = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
214
|
+
publicAPI.getCell = (cellId, cellHint = null) => {
|
|
218
215
|
const cellInfo = publicAPI.getCellPoints(cellId);
|
|
219
216
|
const cell = cellHint || CELL_FACTORY[cellInfo.cellType].newInstance();
|
|
220
217
|
cell.initialize(publicAPI.getPoints(), cellInfo.cellPointIds);
|
|
@@ -238,8 +235,7 @@ const DEFAULT_VALUES = {
|
|
|
238
235
|
|
|
239
236
|
// ----------------------------------------------------------------------------
|
|
240
237
|
|
|
241
|
-
function extend(publicAPI, model) {
|
|
242
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
238
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
243
239
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
244
240
|
|
|
245
241
|
// Inheritance
|
|
@@ -111,8 +111,7 @@ const DEFAULT_VALUES = {
|
|
|
111
111
|
|
|
112
112
|
// ----------------------------------------------------------------------------
|
|
113
113
|
|
|
114
|
-
function extend(publicAPI, model) {
|
|
115
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
114
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
116
115
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
117
116
|
vtkCell.extend(publicAPI, model, initialValues);
|
|
118
117
|
macro.setGet(publicAPI, model, ['orientations', 'distanceFunction']);
|
|
@@ -194,8 +194,7 @@ function getNormal(poly, points, normal) {
|
|
|
194
194
|
* @param {Vector3} [centroid] - Optional output array (length 3)
|
|
195
195
|
* @returns {Vector3} The centroid as [x, y, z]
|
|
196
196
|
*/
|
|
197
|
-
function computeCentroid(poly, points) {
|
|
198
|
-
let centroid = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [0, 0, 0];
|
|
197
|
+
function computeCentroid(poly, points, centroid = [0, 0, 0]) {
|
|
199
198
|
centroid[0] = 0;
|
|
200
199
|
centroid[1] = 0;
|
|
201
200
|
centroid[2] = 0;
|
|
@@ -390,8 +389,7 @@ const DEFAULT_VALUES = {
|
|
|
390
389
|
|
|
391
390
|
// ----------------------------------------------------------------------------
|
|
392
391
|
|
|
393
|
-
function extend(publicAPI, model) {
|
|
394
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
392
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
395
393
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
396
394
|
|
|
397
395
|
// Build VTK API
|
package/Common/DataModel/Quad.js
CHANGED
|
@@ -175,8 +175,7 @@ const DEFAULT_VALUES = {};
|
|
|
175
175
|
|
|
176
176
|
// ----------------------------------------------------------------------------
|
|
177
177
|
|
|
178
|
-
function extend(publicAPI, model) {
|
|
179
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
178
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
180
179
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
181
180
|
vtkCell.extend(publicAPI, model, initialValues);
|
|
182
181
|
vtkQuad(publicAPI, model);
|
|
@@ -24,8 +24,7 @@ const DEFAULT_VALUES = {
|
|
|
24
24
|
|
|
25
25
|
// ----------------------------------------------------------------------------
|
|
26
26
|
|
|
27
|
-
function extend(publicAPI, model) {
|
|
28
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
27
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
29
28
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
30
29
|
|
|
31
30
|
// Inheritance
|
|
@@ -47,8 +47,7 @@ const DEFAULT_VALUES = {
|
|
|
47
47
|
|
|
48
48
|
// ----------------------------------------------------------------------------
|
|
49
49
|
|
|
50
|
-
function extend(publicAPI, model) {
|
|
51
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
50
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
52
51
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
53
52
|
|
|
54
53
|
// Object methods
|
|
@@ -20,7 +20,7 @@ function vtkSpline1D(publicAPI, model) {
|
|
|
20
20
|
|
|
21
21
|
// --------------------------------------------------------------------------
|
|
22
22
|
|
|
23
|
-
publicAPI.computeOpenCoefficients =
|
|
23
|
+
publicAPI.computeOpenCoefficients = (size, work, x, y, options = {}) => {
|
|
24
24
|
vtkErrorMacro(`${model.classHierarchy.slice(-1)[0]} should implement computeOpenCoefficients`);
|
|
25
25
|
};
|
|
26
26
|
|
|
@@ -39,8 +39,7 @@ const DEFAULT_VALUES = {};
|
|
|
39
39
|
|
|
40
40
|
// ----------------------------------------------------------------------------
|
|
41
41
|
|
|
42
|
-
function extend(publicAPI, model) {
|
|
43
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
42
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
44
43
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
45
44
|
|
|
46
45
|
// Build VTK API
|
|
@@ -112,8 +112,7 @@ const DEFAULT_VALUES = {
|
|
|
112
112
|
|
|
113
113
|
// ----------------------------------------------------------------------------
|
|
114
114
|
|
|
115
|
-
function extend(publicAPI, model) {
|
|
116
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
115
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
117
116
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
118
117
|
|
|
119
118
|
// Build VTK API
|
|
@@ -41,8 +41,7 @@ function interpolationDerivs(derivs) {
|
|
|
41
41
|
derivs[4] = 0.0;
|
|
42
42
|
derivs[5] = 1.0;
|
|
43
43
|
}
|
|
44
|
-
function intersectWithTriangle(p1, q1, r1, p2, q2, r2) {
|
|
45
|
-
let tolerance = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 1e-6;
|
|
44
|
+
function intersectWithTriangle(p1, q1, r1, p2, q2, r2, tolerance = 1e-6) {
|
|
46
45
|
let coplanar = false;
|
|
47
46
|
const pt1 = [];
|
|
48
47
|
const pt2 = [];
|
|
@@ -205,7 +204,6 @@ function intersectWithTriangle(p1, q1, r1, p2, q2, r2) {
|
|
|
205
204
|
surfaceId
|
|
206
205
|
}; // No overlap
|
|
207
206
|
}
|
|
208
|
-
|
|
209
207
|
if (t1[0] < t2[0]) {
|
|
210
208
|
if (t1[1] < t2[1]) {
|
|
211
209
|
// First point on surface 2, second point on surface 1
|
|
@@ -673,7 +671,6 @@ function vtkTriangle(publicAPI, model) {
|
|
|
673
671
|
if (pcoords[0] < 0.0 || pcoords[1] < 0.0 || pcoords[0] > 1.0 || pcoords[1] > 1.0 || 1.0 - pcoords[0] - pcoords[1] < 0.0) {
|
|
674
672
|
return false; // outside of triangle
|
|
675
673
|
}
|
|
676
|
-
|
|
677
674
|
return true; // inside triangle
|
|
678
675
|
};
|
|
679
676
|
}
|
|
@@ -686,8 +683,7 @@ const DEFAULT_VALUES = {};
|
|
|
686
683
|
|
|
687
684
|
// ----------------------------------------------------------------------------
|
|
688
685
|
|
|
689
|
-
function extend(publicAPI, model) {
|
|
690
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
686
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
691
687
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
692
688
|
vtkCell.extend(publicAPI, model, initialValues);
|
|
693
689
|
vtkTriangle(publicAPI, model);
|
|
@@ -364,8 +364,7 @@ const DEFAULT_VALUES = {
|
|
|
364
364
|
|
|
365
365
|
// ----------------------------------------------------------------------------
|
|
366
366
|
|
|
367
|
-
function extend(publicAPI, model) {
|
|
368
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
367
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
369
368
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
370
369
|
|
|
371
370
|
// Inheritance
|
|
@@ -267,8 +267,7 @@ const DEFAULT_VALUES = {
|
|
|
267
267
|
|
|
268
268
|
// ----------------------------------------------------------------------------
|
|
269
269
|
|
|
270
|
-
function extend(publicAPI, model) {
|
|
271
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
270
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
272
271
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
273
272
|
macro.obj(publicAPI, model);
|
|
274
273
|
|
|
@@ -196,8 +196,7 @@ function vtkTransform(publicAPI, model) {
|
|
|
196
196
|
* @param {vec3} outNormal The output vector
|
|
197
197
|
* @returns {vec3} The transformed normal vector
|
|
198
198
|
*/
|
|
199
|
-
publicAPI.transformNormal =
|
|
200
|
-
let outNormal = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
199
|
+
publicAPI.transformNormal = (inNormal, outNormal = []) => {
|
|
201
200
|
const matrix3x3 = mat3.fromMat4(mat3.create(), model.matrix);
|
|
202
201
|
// Invert the upper 3x3 part of the matrix
|
|
203
202
|
const invMat3 = mat3.create();
|
|
@@ -250,9 +249,7 @@ function vtkTransform(publicAPI, model) {
|
|
|
250
249
|
* @param {mat3} [matrix=null] if null (default), the Transform matrix is being used.
|
|
251
250
|
* @returns {vec3} The transformed vector
|
|
252
251
|
*/
|
|
253
|
-
publicAPI.transformVector =
|
|
254
|
-
let outVector = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
255
|
-
let matrix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
252
|
+
publicAPI.transformVector = (inVector, outVector = [], matrix = null) => {
|
|
256
253
|
const matrix3x3 = matrix || mat3.fromMat4(mat3.create(), model.matrix);
|
|
257
254
|
vec3.transformMat3(outVector, inVector, matrix3x3);
|
|
258
255
|
return outVector;
|
|
@@ -291,9 +288,7 @@ function vtkTransform(publicAPI, model) {
|
|
|
291
288
|
* @param {Array<vtkDataArray>} inVectorsArr Optional input vector arrays
|
|
292
289
|
* @param {Array<vtkDataArray>} outVectorsArr Optional output vector arrays
|
|
293
290
|
*/
|
|
294
|
-
publicAPI.transformPointsNormalsVectors =
|
|
295
|
-
let inVectorsArr = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
|
|
296
|
-
let outVectorsArr = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : null;
|
|
291
|
+
publicAPI.transformPointsNormalsVectors = (inPoints, outPoints, inNormals, outNormals, inVectors, outVectors, inVectorsArr = null, outVectorsArr = null) => {
|
|
297
292
|
const n = inPoints.getNumberOfPoints();
|
|
298
293
|
const nOptionalVectors = inVectorsArr?.length ?? 0;
|
|
299
294
|
const point = new Float64Array(3);
|
|
@@ -391,8 +386,7 @@ const DEFAULT_VALUES = {
|
|
|
391
386
|
|
|
392
387
|
// ----------------------------------------------------------------------------
|
|
393
388
|
|
|
394
|
-
function extend(publicAPI, model) {
|
|
395
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
389
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
396
390
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
397
391
|
macro.obj(publicAPI, model);
|
|
398
392
|
macro.setGet(publicAPI, model, ['preMultiplyFlag']);
|
|
@@ -365,8 +365,7 @@ const DEFAULT_VALUES = {
|
|
|
365
365
|
|
|
366
366
|
// ----------------------------------------------------------------------------
|
|
367
367
|
|
|
368
|
-
function extend(publicAPI, model) {
|
|
369
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
368
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
370
369
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
371
370
|
|
|
372
371
|
// Make this a VTK object
|
package/Filters/Core/Cutter.js
CHANGED
|
@@ -190,7 +190,6 @@ function vtkCutter(publicAPI, model) {
|
|
|
190
190
|
const scalar2 = data[n * pointID2 + j];
|
|
191
191
|
computedIntersectedArray.push(scalar1 + t * (scalar2 - scalar1)); // FIXME: won't work when the array contains "normals" or "IDs"
|
|
192
192
|
}
|
|
193
|
-
|
|
194
193
|
computedIntersectedArrays[name] = computedIntersectedArray;
|
|
195
194
|
}
|
|
196
195
|
|
|
@@ -306,8 +305,7 @@ const DEFAULT_VALUES = {
|
|
|
306
305
|
|
|
307
306
|
// ----------------------------------------------------------------------------
|
|
308
307
|
|
|
309
|
-
function extend(publicAPI, model) {
|
|
310
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
308
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
311
309
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
312
310
|
|
|
313
311
|
// Make this a VTK object
|
|
@@ -27,7 +27,6 @@ function vtkPolyDataNormals(publicAPI, model) {
|
|
|
27
27
|
if (numberOfPoints < 3) {
|
|
28
28
|
continue; // eslint-disable-line
|
|
29
29
|
}
|
|
30
|
-
|
|
31
30
|
for (let i = 1; i <= 3; ++i) {
|
|
32
31
|
cellPointIds[i - 1] = 3 * polysData[c + i];
|
|
33
32
|
}
|
|
@@ -112,8 +111,7 @@ function defaultValues(initialValues) {
|
|
|
112
111
|
}
|
|
113
112
|
|
|
114
113
|
// ----------------------------------------------------------------------------
|
|
115
|
-
function extend(publicAPI, model) {
|
|
116
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
114
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
117
115
|
Object.assign(model, defaultValues(initialValues));
|
|
118
116
|
|
|
119
117
|
/* Make this a VTK object */
|
|
@@ -175,8 +175,7 @@ function vtkThresholdPoints(publicAPI, model) {
|
|
|
175
175
|
|
|
176
176
|
// ----------------------------------------------------------------------------
|
|
177
177
|
|
|
178
|
-
function defaultValues(publicAPI, model) {
|
|
179
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
178
|
+
function defaultValues(publicAPI, model, initialValues = {}) {
|
|
180
179
|
return {
|
|
181
180
|
criterias: [],
|
|
182
181
|
// arrayName: string, fieldAssociation: string, operation: string, value: number
|
|
@@ -186,8 +185,7 @@ function defaultValues(publicAPI, model) {
|
|
|
186
185
|
|
|
187
186
|
// ----------------------------------------------------------------------------
|
|
188
187
|
|
|
189
|
-
function extend(publicAPI, model) {
|
|
190
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
188
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
191
189
|
Object.assign(model, defaultValues(publicAPI, model, initialValues));
|
|
192
190
|
|
|
193
191
|
// Build VTK API
|
|
@@ -79,8 +79,7 @@ const DEFAULT_VALUES = {
|
|
|
79
79
|
|
|
80
80
|
// ----------------------------------------------------------------------------
|
|
81
81
|
|
|
82
|
-
function extend(publicAPI, model) {
|
|
83
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
82
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
84
83
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
85
84
|
|
|
86
85
|
// Make this a VTK object
|
|
@@ -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
|
|
@@ -38,54 +38,48 @@ function vtkCalculator(publicAPI, model) {
|
|
|
38
38
|
// cells or graph edges.
|
|
39
39
|
return arraysOut;
|
|
40
40
|
};
|
|
41
|
-
publicAPI.createSimpleFormulaObject =
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
const
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
41
|
+
publicAPI.createSimpleFormulaObject = (locn, arrNames, resultName, singleValueFormula, options = {}) => ({
|
|
42
|
+
getArrays: inData => ({
|
|
43
|
+
// don't augment input data array in case of structured input dataset
|
|
44
|
+
input: inData[0]?.isA('vtkImageData') ? arrNames.map(x => ({
|
|
45
|
+
location: locn,
|
|
46
|
+
name: x
|
|
47
|
+
})) : publicAPI.augmentInputArrays(locn, arrNames.map(x => ({
|
|
48
|
+
location: locn,
|
|
49
|
+
name: x
|
|
50
|
+
}))),
|
|
51
|
+
output: [{
|
|
52
|
+
location: locn,
|
|
53
|
+
name: resultName,
|
|
54
|
+
attribute: 'outputAttributeType' in options ? options.outputAttributeType : AttributeTypes.SCALARS,
|
|
55
|
+
numberOfComponents: 'numberOfOutputComponents' in options ? options.numberOfOutputComponents : 1
|
|
56
|
+
}]
|
|
57
|
+
}),
|
|
58
|
+
evaluate: (arraysIn, arraysOut) => {
|
|
59
|
+
const tuples = new Array(arraysIn.length);
|
|
60
|
+
const arrayInAccessors = arraysIn.map((x, jj) => {
|
|
61
|
+
const nc = x.getNumberOfComponents();
|
|
62
|
+
const rawData = x.getData();
|
|
63
|
+
return nc === 1 ? ii => rawData[ii] : ii => x.getTuple(ii, tuples[jj]);
|
|
64
|
+
});
|
|
65
|
+
const arrayOut = arraysOut[0];
|
|
66
|
+
const arrayOutRaw = arrayOut.getData();
|
|
67
|
+
const nc = arrayOut.getNumberOfComponents();
|
|
68
|
+
let tupleOut = new Array(nc);
|
|
69
|
+
if (nc === 1) {
|
|
70
|
+
arrayOutRaw.forEach((xxx, ii) => {
|
|
71
|
+
arrayOutRaw[ii] = singleValueFormula(...arrayInAccessors.map(x => x(ii)), ii, tupleOut);
|
|
66
72
|
});
|
|
67
|
-
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
arrayOutRaw.forEach((xxx, ii) => {
|
|
73
|
-
arrayOutRaw[ii] = singleValueFormula(...arrayInAccessors.map(x => x(ii)), ii, tupleOut);
|
|
74
|
-
});
|
|
75
|
-
} else {
|
|
76
|
-
const nt = arrayOut.getNumberOfTuples();
|
|
77
|
-
for (let ii = 0; ii < nt; ++ii) {
|
|
78
|
-
tupleOut = singleValueFormula(...arrayInAccessors.map(x => x(ii)), ii, tupleOut);
|
|
79
|
-
arrayOut.setTuple(ii, tupleOut);
|
|
80
|
-
}
|
|
73
|
+
} else {
|
|
74
|
+
const nt = arrayOut.getNumberOfTuples();
|
|
75
|
+
for (let ii = 0; ii < nt; ++ii) {
|
|
76
|
+
tupleOut = singleValueFormula(...arrayInAccessors.map(x => x(ii)), ii, tupleOut);
|
|
77
|
+
arrayOut.setTuple(ii, tupleOut);
|
|
81
78
|
}
|
|
82
79
|
}
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
publicAPI.setFormulaSimple =
|
|
86
|
-
let options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
|
|
87
|
-
return publicAPI.setFormula(publicAPI.createSimpleFormulaObject(locn, arrNames, resultName, formula, options));
|
|
88
|
-
};
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
publicAPI.setFormulaSimple = (locn, arrNames, resultName, formula, options = {}) => publicAPI.setFormula(publicAPI.createSimpleFormulaObject(locn, arrNames, resultName, formula, options));
|
|
89
83
|
publicAPI.prepareArrays = (arraySpec, inData, outData) => {
|
|
90
84
|
const arraysIn = [];
|
|
91
85
|
const arraysOut = [];
|
|
@@ -199,8 +193,7 @@ const DEFAULT_VALUES = {
|
|
|
199
193
|
|
|
200
194
|
// ----------------------------------------------------------------------------
|
|
201
195
|
|
|
202
|
-
function extend(publicAPI, model) {
|
|
203
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
196
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
204
197
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
205
198
|
|
|
206
199
|
// Make this a VTK object
|
|
@@ -531,7 +531,6 @@ function vtkClipClosedSurface(publicAPI, model) {
|
|
|
531
531
|
inPointData = input.getPointData();
|
|
532
532
|
// pointData.interpolateAllocate(inPointData, numPts, 0);
|
|
533
533
|
}
|
|
534
|
-
|
|
535
534
|
const point = [];
|
|
536
535
|
for (let ptId = 0; ptId < numPts; ptId++) {
|
|
537
536
|
inputPoints.getPoint(ptId, point);
|
|
@@ -831,7 +830,6 @@ function vtkClipClosedSurface(publicAPI, model) {
|
|
|
831
830
|
// TODO: Check
|
|
832
831
|
// output.squeeze();
|
|
833
832
|
};
|
|
834
|
-
|
|
835
833
|
Object.keys(ScalarMode).forEach(key => {
|
|
836
834
|
const name = capitalize(key.toLowerCase());
|
|
837
835
|
publicAPI[`setScalarModeTo${name}`] = () => {
|
|
@@ -866,8 +864,7 @@ const DEFAULT_VALUES = {
|
|
|
866
864
|
|
|
867
865
|
// ----------------------------------------------------------------------------
|
|
868
866
|
|
|
869
|
-
function extend(publicAPI, model) {
|
|
870
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
867
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
871
868
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
872
869
|
|
|
873
870
|
// Make this a VTK object
|