@kitware/vtk.js 34.16.3 → 34.16.7
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.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 +1 -2
- package/Rendering/OpenGL/PolyDataMapper2D.js +1 -2
- package/Rendering/OpenGL/RadialDistortionPass.js +2 -3
- package/Rendering/OpenGL/RenderWindow.js +33 -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.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 +26 -19
|
@@ -38,9 +38,7 @@ function vtkImageProperty(publicAPI, model) {
|
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
// Set the color of a volume to an RGB transfer function
|
|
41
|
-
publicAPI.setRGBTransferFunction =
|
|
42
|
-
let index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
43
|
-
let func = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
41
|
+
publicAPI.setRGBTransferFunction = (index = 0, func = null) => {
|
|
44
42
|
// backwards compatible call without the component index
|
|
45
43
|
let idx = index;
|
|
46
44
|
let transferFunc = func;
|
|
@@ -57,15 +55,10 @@ function vtkImageProperty(publicAPI, model) {
|
|
|
57
55
|
};
|
|
58
56
|
|
|
59
57
|
// Get the currently set RGB transfer function.
|
|
60
|
-
publicAPI.getRGBTransferFunction =
|
|
61
|
-
let idx = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
62
|
-
return model.componentData[idx].rGBTransferFunction;
|
|
63
|
-
};
|
|
58
|
+
publicAPI.getRGBTransferFunction = (idx = 0) => model.componentData[idx].rGBTransferFunction;
|
|
64
59
|
|
|
65
60
|
// Set the piecewise function
|
|
66
|
-
publicAPI.setPiecewiseFunction =
|
|
67
|
-
let index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
68
|
-
let func = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
61
|
+
publicAPI.setPiecewiseFunction = (index = 0, func = null) => {
|
|
69
62
|
let idx = index;
|
|
70
63
|
let transferFunc = func;
|
|
71
64
|
if (!Number.isInteger(index)) {
|
|
@@ -81,15 +74,10 @@ function vtkImageProperty(publicAPI, model) {
|
|
|
81
74
|
};
|
|
82
75
|
|
|
83
76
|
// Get the component weighting function.
|
|
84
|
-
publicAPI.getPiecewiseFunction =
|
|
85
|
-
let idx = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
86
|
-
return model.componentData[idx].piecewiseFunction;
|
|
87
|
-
};
|
|
77
|
+
publicAPI.getPiecewiseFunction = (idx = 0) => model.componentData[idx].piecewiseFunction;
|
|
88
78
|
|
|
89
79
|
// Alias to set the piecewise function
|
|
90
|
-
publicAPI.setScalarOpacity =
|
|
91
|
-
let index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
92
|
-
let func = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
80
|
+
publicAPI.setScalarOpacity = (index = 0, func = null) => {
|
|
93
81
|
// backwards compatible call without the component index
|
|
94
82
|
let idx = index;
|
|
95
83
|
let transferFunc = func;
|
|
@@ -101,13 +89,8 @@ function vtkImageProperty(publicAPI, model) {
|
|
|
101
89
|
};
|
|
102
90
|
|
|
103
91
|
// Alias to get the piecewise function (backwards compatibility)
|
|
104
|
-
publicAPI.getScalarOpacity =
|
|
105
|
-
|
|
106
|
-
return publicAPI.getPiecewiseFunction(idx);
|
|
107
|
-
};
|
|
108
|
-
publicAPI.setComponentWeight = function () {
|
|
109
|
-
let index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
110
|
-
let value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
92
|
+
publicAPI.getScalarOpacity = (idx = 0) => publicAPI.getPiecewiseFunction(idx);
|
|
93
|
+
publicAPI.setComponentWeight = (index = 0, value = 1) => {
|
|
111
94
|
if (index < 0 || index >= VTK_MAX_VRCOMP) {
|
|
112
95
|
vtkErrorMacro('Invalid index');
|
|
113
96
|
return false;
|
|
@@ -120,8 +103,7 @@ function vtkImageProperty(publicAPI, model) {
|
|
|
120
103
|
}
|
|
121
104
|
return false;
|
|
122
105
|
};
|
|
123
|
-
publicAPI.getComponentWeight =
|
|
124
|
-
let index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
106
|
+
publicAPI.getComponentWeight = (index = 0) => {
|
|
125
107
|
if (index < 0 || index >= VTK_MAX_VRCOMP) {
|
|
126
108
|
vtkErrorMacro('Invalid index');
|
|
127
109
|
return 0.0;
|
|
@@ -154,8 +136,7 @@ const defaultValues = initialValues => ({
|
|
|
154
136
|
|
|
155
137
|
// ----------------------------------------------------------------------------
|
|
156
138
|
|
|
157
|
-
function extend(publicAPI, model) {
|
|
158
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
139
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
159
140
|
Object.assign(model, defaultValues(initialValues));
|
|
160
141
|
|
|
161
142
|
// Build VTK API
|
|
@@ -49,8 +49,7 @@ const defaultValues = initialValues => ({
|
|
|
49
49
|
|
|
50
50
|
// ----------------------------------------------------------------------------
|
|
51
51
|
|
|
52
|
-
function extend(publicAPI, model) {
|
|
53
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
52
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
54
53
|
Object.assign(model, defaultValues(initialValues));
|
|
55
54
|
|
|
56
55
|
// Build VTK API
|
|
@@ -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
|
|
@@ -146,8 +146,7 @@ const DEFAULT_VALUES = {
|
|
|
146
146
|
|
|
147
147
|
// ----------------------------------------------------------------------------
|
|
148
148
|
|
|
149
|
-
function extend(publicAPI, model) {
|
|
150
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
149
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
151
150
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
152
151
|
|
|
153
152
|
// Object methods
|
|
@@ -125,8 +125,7 @@ const DEFAULT_VALUES = {
|
|
|
125
125
|
|
|
126
126
|
// ----------------------------------------------------------------------------
|
|
127
127
|
|
|
128
|
-
function extend(publicAPI, model) {
|
|
129
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
128
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
130
129
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
131
130
|
|
|
132
131
|
// Inheritance
|
package/Rendering/Core/Light.js
CHANGED
|
@@ -91,8 +91,7 @@ const DEFAULT_VALUES = {
|
|
|
91
91
|
|
|
92
92
|
// ----------------------------------------------------------------------------
|
|
93
93
|
|
|
94
|
-
function extend(publicAPI, model) {
|
|
95
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
94
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
96
95
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
97
96
|
|
|
98
97
|
// Build VTK API
|
|
@@ -16,8 +16,7 @@ function setResolveCoincidentTopologyPolygonOffsetFaces(value) {
|
|
|
16
16
|
function getResolveCoincidentTopology() {
|
|
17
17
|
return resolveCoincidentTopology;
|
|
18
18
|
}
|
|
19
|
-
function setResolveCoincidentTopology() {
|
|
20
|
-
let mode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
19
|
+
function setResolveCoincidentTopology(mode = 0) {
|
|
21
20
|
const changed = resolveCoincidentTopology === mode;
|
|
22
21
|
resolveCoincidentTopology = mode;
|
|
23
22
|
return changed;
|
package/Rendering/Core/Mapper.js
CHANGED
|
@@ -284,14 +284,12 @@ function vtkMapper(publicAPI, model) {
|
|
|
284
284
|
model.forceCompileOnly = v;
|
|
285
285
|
// make sure we do NOT call modified()
|
|
286
286
|
};
|
|
287
|
-
|
|
288
287
|
publicAPI.setSelectionWebGLIdsToVTKIds = selectionWebGLIdsToVTKIds => {
|
|
289
288
|
model.selectionWebGLIdsToVTKIds = selectionWebGLIdsToVTKIds;
|
|
290
289
|
// make sure we do NOT call modified()
|
|
291
290
|
// this attribute is only used when processing a selection made with the hardware selector
|
|
292
291
|
// the mtime of the mapper doesn't need to be changed
|
|
293
292
|
};
|
|
294
|
-
|
|
295
293
|
publicAPI.createDefaultLookupTable = () => {
|
|
296
294
|
model.lookupTable = vtkLookupTable.newInstance();
|
|
297
295
|
};
|
|
@@ -498,7 +496,6 @@ function vtkMapper(publicAPI, model) {
|
|
|
498
496
|
if (cellFlag && !(model.colorMode === ColorMode.DIRECT_SCALARS)) {
|
|
499
497
|
return true; // cell data always use textures.
|
|
500
498
|
}
|
|
501
|
-
|
|
502
499
|
if (!model.interpolateScalarsBeforeMapping) {
|
|
503
500
|
return false; // user doesn't want us to use texture maps at all.
|
|
504
501
|
}
|
|
@@ -640,8 +637,7 @@ const DEFAULT_VALUES = {
|
|
|
640
637
|
|
|
641
638
|
// ----------------------------------------------------------------------------
|
|
642
639
|
|
|
643
|
-
function extend(publicAPI, model) {
|
|
644
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
640
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
645
641
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
646
642
|
|
|
647
643
|
// Inheritance
|
|
@@ -649,7 +645,6 @@ function extend(publicAPI, model) {
|
|
|
649
645
|
macro.get(publicAPI, model, ['areScalarsMappedFromCells', 'colorCoordinates', 'colorMapColors', 'colorTextureMap', 'numberOfColorsInRange', 'selectionWebGLIdsToVTKIds']);
|
|
650
646
|
macro.setGet(publicAPI, model, ['colorByArrayName', 'arrayAccessMode', 'colorMode', 'fieldDataTupleId', 'interpolateScalarsBeforeMapping', 'lookupTable', 'populateSelectionSettings', 'renderTime', 'scalarMode', 'scalarVisibility', 'static', 'useLookupTableScalarRange', 'customShaderAttributes' // point data array names that will be transferred to the VBO
|
|
651
647
|
]);
|
|
652
|
-
|
|
653
648
|
macro.setGetArray(publicAPI, model, ['scalarRange'], 2);
|
|
654
649
|
CoincidentTopologyHelper.implementCoincidentTopologyMethods(publicAPI, model);
|
|
655
650
|
|
|
@@ -505,8 +505,7 @@ const DEFAULT_VALUES = {
|
|
|
505
505
|
};
|
|
506
506
|
|
|
507
507
|
// ----------------------------------------------------------------------------
|
|
508
|
-
function extend(publicAPI, model) {
|
|
509
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
508
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
510
509
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
511
510
|
|
|
512
511
|
// Inheritance
|
|
@@ -514,7 +513,6 @@ function extend(publicAPI, model) {
|
|
|
514
513
|
macro.get(publicAPI, model, ['areScalarsMappedFromCells', 'colorCoordinates', 'colorTextureMap', 'colorMapColors']);
|
|
515
514
|
macro.setGet(publicAPI, model, ['arrayAccessMode', 'colorByArrayName', 'colorMode', 'lookupTable', 'renderTime', 'scalarMode', 'scalarVisibility', 'static', 'transformCoordinate', 'useLookupTableScalarRange', 'viewSpecificProperties', 'customShaderAttributes' // point data array names that will be transferred to the VBO
|
|
516
515
|
]);
|
|
517
|
-
|
|
518
516
|
macro.setGetArray(publicAPI, model, ['scalarRange'], 2);
|
|
519
517
|
if (!model.viewSpecificProperties) {
|
|
520
518
|
model.viewSpecificProperties = {};
|
package/Rendering/Core/Picker.js
CHANGED
|
@@ -300,8 +300,7 @@ const DEFAULT_VALUES = {
|
|
|
300
300
|
};
|
|
301
301
|
|
|
302
302
|
// ----------------------------------------------------------------------------
|
|
303
|
-
function extend(publicAPI, model) {
|
|
304
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
303
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
305
304
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
306
305
|
|
|
307
306
|
// Inheritance
|
|
@@ -53,8 +53,7 @@ const DEFAULT_VALUES = {
|
|
|
53
53
|
|
|
54
54
|
// ----------------------------------------------------------------------------
|
|
55
55
|
|
|
56
|
-
function extend(publicAPI, model) {
|
|
57
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
56
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
58
57
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
59
58
|
|
|
60
59
|
// Inheritance
|
|
@@ -140,8 +140,7 @@ const DEFAULT_VALUES = {
|
|
|
140
140
|
|
|
141
141
|
// ----------------------------------------------------------------------------
|
|
142
142
|
|
|
143
|
-
function extend(publicAPI, model) {
|
|
144
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
143
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
145
144
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
146
145
|
|
|
147
146
|
// Inheritance
|
package/Rendering/Core/Prop.js
CHANGED
|
@@ -98,8 +98,7 @@ const DEFAULT_VALUES = {
|
|
|
98
98
|
|
|
99
99
|
// ----------------------------------------------------------------------------
|
|
100
100
|
|
|
101
|
-
function extend(publicAPI, model) {
|
|
102
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
101
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
103
102
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
104
103
|
|
|
105
104
|
// Build VTK API
|
package/Rendering/Core/Prop3D.js
CHANGED
|
@@ -24,10 +24,7 @@ function vtkProp3D(publicAPI, model) {
|
|
|
24
24
|
const w = quat.getAxisAngle(oaxis, q);
|
|
25
25
|
return [degreesFromRadians(w), oaxis[0], oaxis[1], oaxis[2]];
|
|
26
26
|
};
|
|
27
|
-
publicAPI.getOrientationQuaternion =
|
|
28
|
-
let out = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
29
|
-
return mat4.getRotation(out, model.rotation);
|
|
30
|
-
};
|
|
27
|
+
publicAPI.getOrientationQuaternion = (out = []) => mat4.getRotation(out, model.rotation);
|
|
31
28
|
publicAPI.rotateX = val => {
|
|
32
29
|
if (val === 0.0) {
|
|
33
30
|
return;
|
|
@@ -189,8 +186,7 @@ function vtkProp3D(publicAPI, model) {
|
|
|
189
186
|
publicAPI.computeMatrix();
|
|
190
187
|
}
|
|
191
188
|
publicAPI.onModified(updateIdentityFlag);
|
|
192
|
-
publicAPI.getProperty =
|
|
193
|
-
let mapperInputPort = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
189
|
+
publicAPI.getProperty = (mapperInputPort = 0) => {
|
|
194
190
|
if (model.properties[mapperInputPort] == null) {
|
|
195
191
|
model.properties[mapperInputPort] = publicAPI.makeProperty?.();
|
|
196
192
|
}
|
|
@@ -247,8 +243,7 @@ const DEFAULT_VALUES = {
|
|
|
247
243
|
|
|
248
244
|
// ----------------------------------------------------------------------------
|
|
249
245
|
|
|
250
|
-
function extend(publicAPI, model) {
|
|
251
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
246
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
252
247
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
253
248
|
|
|
254
249
|
// Inheritance
|
|
@@ -101,8 +101,7 @@ const DEFAULT_VALUES = {
|
|
|
101
101
|
|
|
102
102
|
// ----------------------------------------------------------------------------
|
|
103
103
|
|
|
104
|
-
function extend(publicAPI, model) {
|
|
105
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
104
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
106
105
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
107
106
|
|
|
108
107
|
// Build VTK API
|
|
@@ -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
|
// Build VTK API
|
|
@@ -13,8 +13,7 @@ function registerViewConstructor(name, constructor) {
|
|
|
13
13
|
function listViewAPIs() {
|
|
14
14
|
return Object.keys(VIEW_CONSTRUCTORS);
|
|
15
15
|
}
|
|
16
|
-
function newAPISpecificView(name) {
|
|
17
|
-
let initialValues = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
16
|
+
function newAPISpecificView(name, initialValues = {}) {
|
|
18
17
|
return VIEW_CONSTRUCTORS[name] && VIEW_CONSTRUCTORS[name](initialValues);
|
|
19
18
|
}
|
|
20
19
|
|
|
@@ -52,10 +51,7 @@ function vtkRenderWindow(publicAPI, model) {
|
|
|
52
51
|
publicAPI.hasRenderer = ren => model.renderers.indexOf(ren) !== -1;
|
|
53
52
|
|
|
54
53
|
// get an API specific view of this data
|
|
55
|
-
publicAPI.newAPISpecificView =
|
|
56
|
-
let initialValues = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
57
|
-
return newAPISpecificView(name || model.defaultViewAPI, initialValues);
|
|
58
|
-
};
|
|
54
|
+
publicAPI.newAPISpecificView = (name, initialValues = {}) => newAPISpecificView(name || model.defaultViewAPI, initialValues);
|
|
59
55
|
|
|
60
56
|
// Add renderer
|
|
61
57
|
publicAPI.addView = view => {
|
|
@@ -130,9 +126,7 @@ function vtkRenderWindow(publicAPI, model) {
|
|
|
130
126
|
results.str = Object.keys(results).map(keyName => `${keyName}: ${results[keyName]}`).join('\n');
|
|
131
127
|
return results;
|
|
132
128
|
};
|
|
133
|
-
publicAPI.captureImages =
|
|
134
|
-
let format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'image/png';
|
|
135
|
-
let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
129
|
+
publicAPI.captureImages = (format = 'image/png', opts = {}) => {
|
|
136
130
|
macro.setImmediate(publicAPI.render);
|
|
137
131
|
return model._views.map(view => view.captureNextImage ? view.captureNextImage(format, opts) : undefined).filter(i => !!i);
|
|
138
132
|
};
|
|
@@ -171,8 +165,7 @@ const DEFAULT_VALUES = {
|
|
|
171
165
|
|
|
172
166
|
// ----------------------------------------------------------------------------
|
|
173
167
|
|
|
174
|
-
function extend(publicAPI, model) {
|
|
175
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
168
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
176
169
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
177
170
|
|
|
178
171
|
// Build VTK API
|
|
@@ -33,11 +33,10 @@ function preventDefault(event) {
|
|
|
33
33
|
}
|
|
34
34
|
function pointerCacheToPositions(cache) {
|
|
35
35
|
const positions = Object.create(null);
|
|
36
|
-
cache.forEach(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
} = _ref;
|
|
36
|
+
cache.forEach(({
|
|
37
|
+
pointerId,
|
|
38
|
+
position
|
|
39
|
+
}) => {
|
|
41
40
|
positions[pointerId] = position;
|
|
42
41
|
});
|
|
43
42
|
return positions;
|
|
@@ -449,8 +448,7 @@ function vtkRenderWindowInteractor(publicAPI, model) {
|
|
|
449
448
|
}
|
|
450
449
|
};
|
|
451
450
|
publicAPI.isAnimating = () => model.xrAnimation || model.animationRequest !== null;
|
|
452
|
-
publicAPI.cancelAnimation =
|
|
453
|
-
let skipWarning = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
451
|
+
publicAPI.cancelAnimation = (requestor, skipWarning = false) => {
|
|
454
452
|
if (!animationRequesters.has(requestor)) {
|
|
455
453
|
if (!skipWarning) {
|
|
456
454
|
const requestStr = requestor && requestor.getClassName ? requestor.getClassName() : requestor;
|
|
@@ -743,9 +741,7 @@ function vtkRenderWindowInteractor(publicAPI, model) {
|
|
|
743
741
|
publicAPI.modified();
|
|
744
742
|
};
|
|
745
743
|
publicAPI.getFirstRenderer = () => model._view?.getRenderable()?.getRenderersByReference()?.[0];
|
|
746
|
-
publicAPI.findPokedRenderer =
|
|
747
|
-
let x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
748
|
-
let y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
744
|
+
publicAPI.findPokedRenderer = (x = 0, y = 0) => {
|
|
749
745
|
if (!model._view) {
|
|
750
746
|
return null;
|
|
751
747
|
}
|
|
@@ -1054,8 +1050,7 @@ const DEFAULT_VALUES = {
|
|
|
1054
1050
|
|
|
1055
1051
|
// ----------------------------------------------------------------------------
|
|
1056
1052
|
|
|
1057
|
-
function extend(publicAPI, model) {
|
|
1058
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1053
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
1059
1054
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
1060
1055
|
|
|
1061
1056
|
// Object methods
|
|
@@ -324,8 +324,7 @@ function vtkRenderer(publicAPI, model) {
|
|
|
324
324
|
}
|
|
325
325
|
return model.allBounds;
|
|
326
326
|
};
|
|
327
|
-
publicAPI.resetCamera =
|
|
328
|
-
let bounds = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
327
|
+
publicAPI.resetCamera = (bounds = null) => {
|
|
329
328
|
const boundsToUse = bounds || publicAPI.computeVisiblePropBounds();
|
|
330
329
|
const center = [0, 0, 0];
|
|
331
330
|
if (!areBoundsInitialized(boundsToUse)) {
|
|
@@ -403,8 +402,7 @@ function vtkRenderer(publicAPI, model) {
|
|
|
403
402
|
publicAPI.invokeEvent(RESET_CAMERA_EVENT);
|
|
404
403
|
return true;
|
|
405
404
|
};
|
|
406
|
-
publicAPI.resetCameraClippingRange =
|
|
407
|
-
let bounds = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
405
|
+
publicAPI.resetCameraClippingRange = (bounds = null) => {
|
|
408
406
|
const boundsToUse = bounds || publicAPI.computeVisiblePropBounds();
|
|
409
407
|
if (!areBoundsInitialized(boundsToUse)) {
|
|
410
408
|
vtkDebugMacro('Cannot reset camera clipping range!');
|
|
@@ -540,8 +538,7 @@ const DEFAULT_VALUES = {
|
|
|
540
538
|
|
|
541
539
|
// ----------------------------------------------------------------------------
|
|
542
540
|
|
|
543
|
-
function extend(publicAPI, model) {
|
|
544
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
541
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
545
542
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
546
543
|
|
|
547
544
|
// Inheritance
|
|
@@ -666,10 +666,9 @@ function vtkScalarBarActorHelper(publicAPI, model) {
|
|
|
666
666
|
model.polyData.modified();
|
|
667
667
|
};
|
|
668
668
|
}
|
|
669
|
-
const newScalarBarActorHelper = macro.newInstance(
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
};
|
|
669
|
+
const newScalarBarActorHelper = macro.newInstance((publicAPI, model, initialValues = {
|
|
670
|
+
renderable: null
|
|
671
|
+
}) => {
|
|
673
672
|
Object.assign(model, {}, initialValues);
|
|
674
673
|
|
|
675
674
|
// Inheritance
|
|
@@ -790,8 +789,7 @@ function defaultValues(initialValues) {
|
|
|
790
789
|
|
|
791
790
|
// ----------------------------------------------------------------------------
|
|
792
791
|
|
|
793
|
-
function extend(publicAPI, model) {
|
|
794
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
792
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
795
793
|
Object.assign(model, defaultValues(initialValues));
|
|
796
794
|
if (!model.autoLayout) model.autoLayout = defaultAutoLayout(publicAPI, model);
|
|
797
795
|
if (!model.generateTicks) model.generateTicks = defaultGenerateTicks();
|
package/Rendering/Core/Skybox.js
CHANGED
|
@@ -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
|
// Inheritance
|
|
@@ -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
|
// Inheritance
|
|
@@ -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
|
// Inheritance
|
|
@@ -38,8 +38,7 @@ const DEFAULT_VALUES = {
|
|
|
38
38
|
rebuildNoiseTexture: false,
|
|
39
39
|
viewPortScale: 1.0
|
|
40
40
|
};
|
|
41
|
-
function extend(publicAPI, model) {
|
|
42
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
41
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
43
42
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
44
43
|
macro.obj(publicAPI, model);
|
|
45
44
|
macro.setGet(publicAPI, model, ['enableLIC', 'numberOfSteps', 'stepSize', 'normalizeVectors', 'transformVectors', 'maskOnSurface', 'maskThreshold', 'maskColor', 'maskIntensity', 'enhancedLIC', 'enhanceContrast', 'lowLICContrastEnhancementFactor', 'highLICContrastEnhancementFactor', 'lowColorContrastEnhancementFactor', 'highColorContrastEnhancementFactor', 'antiAlias', 'colorMode', 'LICIntensity', 'mapModeBias', 'noiseTextureSize', 'noiseTextureType', 'noiseGrainSize', 'minNoiseValue', 'maxNoiseValue', 'numberOfNoiseLevels', 'noiseImpulseProbability', 'noiseImpulseBackgroundValue', 'noiseGeneratorSeed', 'viewPortScale', 'rebuildNoiseTexture']);
|
|
@@ -27,8 +27,7 @@ const DEFAULT_VALUES = {
|
|
|
27
27
|
|
|
28
28
|
// ----------------------------------------------------------------------------
|
|
29
29
|
|
|
30
|
-
function extend(publicAPI, model) {
|
|
31
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
30
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
32
31
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
33
32
|
|
|
34
33
|
// Inheritance
|
|
@@ -112,8 +112,7 @@ const DEFAULT_VALUES = {
|
|
|
112
112
|
mapper: null,
|
|
113
113
|
property: null
|
|
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
|
// Inheritance
|
|
@@ -30,8 +30,7 @@ const DEFAULT_VALUES = {
|
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
// ----------------------------------------------------------------------------
|
|
33
|
-
function extend(publicAPI, model) {
|
|
34
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
33
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
35
34
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
36
35
|
|
|
37
36
|
// Inheritance
|
|
@@ -303,8 +303,7 @@ const DEFAULT_VALUES = {
|
|
|
303
303
|
|
|
304
304
|
// ----------------------------------------------------------------------------
|
|
305
305
|
|
|
306
|
-
function extend(publicAPI, model) {
|
|
307
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
306
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
308
307
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
309
308
|
|
|
310
309
|
// Build VTK API
|
|
@@ -436,29 +436,25 @@ function buildLidFaces(layers, faces, vlen, steps, bevelEnabled, bevelSegments,
|
|
|
436
436
|
if (bevelEnabled) {
|
|
437
437
|
let layer = 0;
|
|
438
438
|
let offset = vlen * layer; // Bottom faces
|
|
439
|
-
faces.forEach(
|
|
440
|
-
let [a, b, c] = _ref;
|
|
439
|
+
faces.forEach(([a, b, c]) => {
|
|
441
440
|
addTriangle(layers, c + offset, b + offset, a + offset, verticesArray, uvArray, colorArray, color);
|
|
442
441
|
});
|
|
443
442
|
layer = steps + bevelSegments * 2;
|
|
444
443
|
offset = vlen * layer;
|
|
445
444
|
|
|
446
445
|
// Top faces
|
|
447
|
-
faces.forEach(
|
|
448
|
-
let [a, b, c] = _ref2;
|
|
446
|
+
faces.forEach(([a, b, c]) => {
|
|
449
447
|
addTriangle(layers, a + offset, b + offset, c + offset, verticesArray, uvArray, colorArray, color);
|
|
450
448
|
});
|
|
451
449
|
} else {
|
|
452
450
|
// Bottom faces
|
|
453
|
-
faces.forEach(
|
|
454
|
-
let [a, b, c] = _ref3;
|
|
451
|
+
faces.forEach(([a, b, c]) => {
|
|
455
452
|
addTriangle(layers, c, b, a, verticesArray, uvArray, colorArray, color);
|
|
456
453
|
});
|
|
457
454
|
|
|
458
455
|
// Top faces
|
|
459
456
|
const offset = vlen * steps;
|
|
460
|
-
faces.forEach(
|
|
461
|
-
let [a, b, c] = _ref4;
|
|
457
|
+
faces.forEach(([a, b, c]) => {
|
|
462
458
|
addTriangle(layers, a + offset, b + offset, c + offset, verticesArray, uvArray, colorArray, color);
|
|
463
459
|
});
|
|
464
460
|
}
|
|
@@ -375,9 +375,7 @@ const DEFAULT_VALUES = {
|
|
|
375
375
|
text: null,
|
|
376
376
|
perLetterFaceColors: null // (letterIndex: number) => [r,g,b]
|
|
377
377
|
};
|
|
378
|
-
|
|
379
|
-
function extend(publicAPI, model) {
|
|
380
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
378
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
381
379
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
382
380
|
|
|
383
381
|
// Object methods
|
|
@@ -34,8 +34,7 @@ function vtkViewport(publicAPI, model) {
|
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
// this method get all the props including any nested props
|
|
37
|
-
function gatherProps(prop) {
|
|
38
|
-
let allProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
37
|
+
function gatherProps(prop, allProps = []) {
|
|
39
38
|
allProps.push(prop);
|
|
40
39
|
const children = prop.getNestedProps();
|
|
41
40
|
if (children && children.length) {
|
|
@@ -126,8 +125,7 @@ const DEFAULT_VALUES = {
|
|
|
126
125
|
|
|
127
126
|
// ----------------------------------------------------------------------------
|
|
128
127
|
|
|
129
|
-
function extend(publicAPI, model) {
|
|
130
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
128
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
131
129
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
132
130
|
|
|
133
131
|
// Build VTK API
|
package/Rendering/Core/Volume.js
CHANGED
|
@@ -37,8 +37,7 @@ const DEFAULT_VALUES = {
|
|
|
37
37
|
|
|
38
38
|
// ----------------------------------------------------------------------------
|
|
39
39
|
|
|
40
|
-
function extend(publicAPI, model) {
|
|
41
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
40
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
42
41
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
43
42
|
|
|
44
43
|
// Inheritance
|
|
@@ -100,8 +100,7 @@ const defaultValues = initialValues => ({
|
|
|
100
100
|
|
|
101
101
|
// ----------------------------------------------------------------------------
|
|
102
102
|
|
|
103
|
-
function extend(publicAPI, model) {
|
|
104
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
103
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
105
104
|
Object.assign(model, defaultValues(initialValues));
|
|
106
105
|
vtkAbstractMapper3D.extend(publicAPI, model, initialValues);
|
|
107
106
|
macro.setGet(publicAPI, model, ['sampleDistance', 'imageSampleDistance', 'maximumSamplesPerRay', 'autoAdjustSampleDistances', 'initialInteractionScale', 'interactionSampleDistanceFactor', 'blendMode', 'volumeShadowSamplingDistFactor', 'colorTextureWidth', 'opacityTextureWidth', 'labelOutlineTextureWidth']);
|