@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
|
@@ -17,8 +17,7 @@ function arraysEqual(a, b) {
|
|
|
17
17
|
function vtkWebGPUVertexInput(publicAPI, model) {
|
|
18
18
|
// Set our className
|
|
19
19
|
model.classHierarchy.push('vtkWebGPUVertexInput');
|
|
20
|
-
publicAPI.addBuffer =
|
|
21
|
-
let stepMode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'vertex';
|
|
20
|
+
publicAPI.addBuffer = (buffer, inames, stepMode = 'vertex') => {
|
|
22
21
|
let names = inames;
|
|
23
22
|
if (!Array.isArray(names)) {
|
|
24
23
|
names = [names];
|
|
@@ -155,8 +154,7 @@ const DEFAULT_VALUES = {
|
|
|
155
154
|
};
|
|
156
155
|
|
|
157
156
|
// ----------------------------------------------------------------------------
|
|
158
|
-
function extend(publicAPI, model) {
|
|
159
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
157
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
160
158
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
161
159
|
|
|
162
160
|
// Build VTK API
|
|
@@ -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
|
// Static class mapping shared across instances
|
|
@@ -97,8 +97,7 @@ const DEFAULT_VALUES = {
|
|
|
97
97
|
|
|
98
98
|
// ----------------------------------------------------------------------------
|
|
99
99
|
|
|
100
|
-
function extend(publicAPI, model) {
|
|
101
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
100
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
102
101
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
103
102
|
|
|
104
103
|
// Inheritance
|
|
@@ -628,8 +628,7 @@ const DEFAULT_VALUES = {
|
|
|
628
628
|
|
|
629
629
|
// ----------------------------------------------------------------------------
|
|
630
630
|
|
|
631
|
-
function extend(publicAPI, model) {
|
|
632
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
631
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
633
632
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
634
633
|
|
|
635
634
|
// Build VTK API
|
|
@@ -844,8 +844,7 @@ const DEFAULT_VALUES = {
|
|
|
844
844
|
|
|
845
845
|
// ----------------------------------------------------------------------------
|
|
846
846
|
|
|
847
|
-
function extend(publicAPI, model) {
|
|
848
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
847
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
849
848
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
850
849
|
|
|
851
850
|
// Inheritance
|
|
@@ -14,7 +14,6 @@ const DEFAULT_RESET_FACTORS = {
|
|
|
14
14
|
// isotropic scale factor reduces apparent size of objects
|
|
15
15
|
translateZ: -1.5 // default translation initializes object in front of camera
|
|
16
16
|
};
|
|
17
|
-
|
|
18
17
|
function createRay() {
|
|
19
18
|
const targetRayLineSource = vtkLineSource.newInstance();
|
|
20
19
|
const targetRayMapper = vtkMapper.newInstance();
|
|
@@ -112,9 +111,7 @@ function vtkWebXRRenderWindowHelper(publicAPI, model) {
|
|
|
112
111
|
throw new Error('Failed to enter XR with a null xrSession.');
|
|
113
112
|
}
|
|
114
113
|
};
|
|
115
|
-
publicAPI.resetXRScene =
|
|
116
|
-
let rescaleFactor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_RESET_FACTORS.rescaleFactor;
|
|
117
|
-
let translateZ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_RESET_FACTORS.translateZ;
|
|
114
|
+
publicAPI.resetXRScene = (rescaleFactor = DEFAULT_RESET_FACTORS.rescaleFactor, translateZ = DEFAULT_RESET_FACTORS.translateZ) => {
|
|
118
115
|
// Adjust world-to-physical parameters for different modalities
|
|
119
116
|
|
|
120
117
|
const ren = model.renderWindow.getRenderable().getRenderers()[0];
|
|
@@ -278,8 +275,7 @@ function defaultValues() {
|
|
|
278
275
|
|
|
279
276
|
// ----------------------------------------------------------------------------
|
|
280
277
|
|
|
281
|
-
function extend(publicAPI, model) {
|
|
282
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
278
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
283
279
|
Object.assign(model, defaultValues(), initialValues);
|
|
284
280
|
|
|
285
281
|
// Build VTK API
|
|
@@ -15,11 +15,10 @@ function vtkAbstractWidget(publicAPI, model) {
|
|
|
15
15
|
publicAPI.getNestedProps = () => model.representations;
|
|
16
16
|
// --------------------------------------------------------------------------
|
|
17
17
|
|
|
18
|
-
publicAPI.activateHandle =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} = _ref;
|
|
18
|
+
publicAPI.activateHandle = ({
|
|
19
|
+
selectedState,
|
|
20
|
+
representation
|
|
21
|
+
}) => {
|
|
23
22
|
model.widgetState.activateOnly(selectedState);
|
|
24
23
|
model.activeState = selectedState;
|
|
25
24
|
if (selectedState && selectedState.updateManipulator) {
|
|
@@ -66,8 +65,7 @@ function vtkAbstractWidget(publicAPI, model) {
|
|
|
66
65
|
|
|
67
66
|
// --------------------------------------------------------------------------
|
|
68
67
|
|
|
69
|
-
publicAPI.updateRepresentationForRender =
|
|
70
|
-
let renderingType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : RenderingTypes.FRONT_BUFFER;
|
|
68
|
+
publicAPI.updateRepresentationForRender = (renderingType = RenderingTypes.FRONT_BUFFER) => {
|
|
71
69
|
for (let i = 0; i < model.representations.length; i++) {
|
|
72
70
|
const representation = model.representations[i];
|
|
73
71
|
representation.updateActorVisibility(renderingType, model.contextVisibility, model.handleVisibility);
|
|
@@ -96,15 +94,13 @@ const DEFAULT_VALUES = {
|
|
|
96
94
|
* @param {object} initialValues Contains at least
|
|
97
95
|
* {viewType, _renderer, _camera, _openGLRenderWindow, _factory}
|
|
98
96
|
*/
|
|
99
|
-
function extend(publicAPI, model) {
|
|
100
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
97
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
101
98
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
102
99
|
vtkProp.extend(publicAPI, model, initialValues);
|
|
103
100
|
vtkInteractorObserver.extend(publicAPI, model, initialValues);
|
|
104
101
|
macro.setGet(publicAPI, model, ['contextVisibility', 'handleVisibility', '_widgetManager']);
|
|
105
102
|
macro.get(publicAPI, model, ['representations', 'widgetState', 'activeState' // stores the last activated sub state(handle)
|
|
106
103
|
]);
|
|
107
|
-
|
|
108
104
|
macro.moveToProtected(publicAPI, model, ['widgetManager']);
|
|
109
105
|
macro.event(publicAPI, model, 'ActivateHandle');
|
|
110
106
|
vtkAbstractWidget(publicAPI, model);
|
|
@@ -14,13 +14,12 @@ function vtkAbstractWidgetFactory(publicAPI, model) {
|
|
|
14
14
|
// DO NOT share on the model ------------------------------------------------
|
|
15
15
|
|
|
16
16
|
// Can be called with just ViewId after the widget has been registered
|
|
17
|
-
publicAPI.getWidgetForView =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
} = _ref;
|
|
17
|
+
publicAPI.getWidgetForView = ({
|
|
18
|
+
viewId,
|
|
19
|
+
renderer,
|
|
20
|
+
viewType,
|
|
21
|
+
initialValues
|
|
22
|
+
}) => {
|
|
24
23
|
if (!viewToWidget[viewId]) {
|
|
25
24
|
if (!renderer) {
|
|
26
25
|
return null;
|
|
@@ -53,19 +52,16 @@ function vtkAbstractWidgetFactory(publicAPI, model) {
|
|
|
53
52
|
// Create representations for that view
|
|
54
53
|
/* eslint-disable no-shadow */
|
|
55
54
|
const widgetInitialValues = initialValues; // Avoid shadowing
|
|
56
|
-
widgetModel.representations = publicAPI.getRepresentationsForViewType(viewType).map(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
...widgetInitialValues
|
|
67
|
-
});
|
|
68
|
-
});
|
|
55
|
+
widgetModel.representations = publicAPI.getRepresentationsForViewType(viewType).map(({
|
|
56
|
+
builder,
|
|
57
|
+
labels,
|
|
58
|
+
initialValues
|
|
59
|
+
}) => builder.newInstance({
|
|
60
|
+
_parentProp: widgetPublicAPI,
|
|
61
|
+
labels,
|
|
62
|
+
...initialValues,
|
|
63
|
+
...widgetInitialValues
|
|
64
|
+
}));
|
|
69
65
|
/* eslint-enable no-shadow */
|
|
70
66
|
|
|
71
67
|
widgetModel.representations.forEach(r => {
|
|
@@ -177,8 +173,7 @@ function vtkAbstractWidgetFactory(publicAPI, model) {
|
|
|
177
173
|
|
|
178
174
|
// ----------------------------------------------------------------------------
|
|
179
175
|
|
|
180
|
-
function extend(publicAPI, model) {
|
|
181
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
176
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
182
177
|
Object.assign(model, initialValues);
|
|
183
178
|
macro.obj(publicAPI, model);
|
|
184
179
|
macro.get(publicAPI, model, ['widgetState']);
|
|
@@ -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
|
macro.setGetArray(publicAPI, model, ['bounds'], 6);
|
|
54
53
|
macro.get(publicAPI, model, ['placeFactor']);
|
|
@@ -11,8 +11,7 @@ const DEFAULT_VALUES = {
|
|
|
11
11
|
|
|
12
12
|
// ----------------------------------------------------------------------------
|
|
13
13
|
|
|
14
|
-
function extend(publicAPI, model) {
|
|
15
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
14
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
16
15
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
17
16
|
macro.setGetArray(publicAPI, model, ['color3'], 3, 255);
|
|
18
17
|
macro.setGet(publicAPI, model, ['opacity']);
|
|
@@ -13,8 +13,7 @@ const DEFAULT_VALUES = {
|
|
|
13
13
|
|
|
14
14
|
// ----------------------------------------------------------------------------
|
|
15
15
|
|
|
16
|
-
function extend(publicAPI, model) {
|
|
17
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
16
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
18
17
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
19
18
|
macro.setGet(publicAPI, model, ['color']);
|
|
20
19
|
}
|
|
@@ -17,8 +17,7 @@ const DEFAULT_VALUES = {
|
|
|
17
17
|
|
|
18
18
|
// ----------------------------------------------------------------------------
|
|
19
19
|
|
|
20
|
-
function extend(publicAPI, model) {
|
|
21
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
20
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
22
21
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
23
22
|
macro.setGetArray(publicAPI, model, ['corner'], 3);
|
|
24
23
|
vtkCornerMixin(publicAPI);
|
|
@@ -31,8 +31,7 @@ const DEFAULT_VALUES = {
|
|
|
31
31
|
|
|
32
32
|
// ----------------------------------------------------------------------------
|
|
33
33
|
|
|
34
|
-
function extend(publicAPI, model) {
|
|
35
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
34
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
36
35
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
37
36
|
macro.setGetArray(publicAPI, model, ['direction'], 3);
|
|
38
37
|
vtkDirectionMixin(publicAPI, model);
|
|
@@ -40,8 +40,7 @@ const DEFAULT_VALUES = {
|
|
|
40
40
|
|
|
41
41
|
// ----------------------------------------------------------------------------
|
|
42
42
|
|
|
43
|
-
function extend(publicAPI, model) {
|
|
44
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
43
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
45
44
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
46
45
|
macro.setGet(publicAPI, model, ['manipulator']);
|
|
47
46
|
vtkManipulatorMixin(publicAPI, model);
|
|
@@ -6,8 +6,7 @@ const DEFAULT_VALUES = {
|
|
|
6
6
|
|
|
7
7
|
// ----------------------------------------------------------------------------
|
|
8
8
|
|
|
9
|
-
function extend(publicAPI, model) {
|
|
10
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
9
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
11
10
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
12
11
|
macro.setGet(publicAPI, model, ['name']);
|
|
13
12
|
}
|
|
@@ -61,8 +61,7 @@ const DEFAULT_VALUES = {
|
|
|
61
61
|
|
|
62
62
|
// ----------------------------------------------------------------------------
|
|
63
63
|
|
|
64
|
-
function extend(publicAPI, model) {
|
|
65
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
64
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
66
65
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
67
66
|
macro.setGetArray(publicAPI, model, ['up', 'right', 'direction'], 3);
|
|
68
67
|
vtkOrientationMixin(publicAPI, model);
|
|
@@ -40,8 +40,7 @@ const DEFAULT_VALUES = {
|
|
|
40
40
|
|
|
41
41
|
// ----------------------------------------------------------------------------
|
|
42
42
|
|
|
43
|
-
function extend(publicAPI, model) {
|
|
44
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
43
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
45
44
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
46
45
|
macro.setGetArray(publicAPI, model, ['origin', 'offset'], 3);
|
|
47
46
|
vtkOriginMixin(publicAPI, model);
|
|
@@ -6,8 +6,7 @@ const DEFAULT_VALUES = {
|
|
|
6
6
|
|
|
7
7
|
// ----------------------------------------------------------------------------
|
|
8
8
|
|
|
9
|
-
function extend(publicAPI, model) {
|
|
10
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
9
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
11
10
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
12
11
|
macro.setGet(publicAPI, model, ['scale1']);
|
|
13
12
|
}
|
|
@@ -6,8 +6,7 @@ const DEFAULT_VALUES = {
|
|
|
6
6
|
|
|
7
7
|
// ----------------------------------------------------------------------------
|
|
8
8
|
|
|
9
|
-
function extend(publicAPI, model) {
|
|
10
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
9
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
11
10
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
12
11
|
macro.setGetArray(publicAPI, model, ['scale3'], 3);
|
|
13
12
|
}
|
|
@@ -8,8 +8,7 @@ const DEFAULT_VALUES = {
|
|
|
8
8
|
|
|
9
9
|
// ----------------------------------------------------------------------------
|
|
10
10
|
|
|
11
|
-
function extend(publicAPI, model) {
|
|
12
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
11
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
13
12
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
14
13
|
macro.setGet(publicAPI, model, ['shape']);
|
|
15
14
|
}
|
|
@@ -6,8 +6,7 @@ const DEFAULT_VALUES = {
|
|
|
6
6
|
|
|
7
7
|
// ----------------------------------------------------------------------------
|
|
8
8
|
|
|
9
|
-
function extend(publicAPI, model) {
|
|
10
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
9
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
11
10
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
12
11
|
macro.setGet(publicAPI, model, ['text']);
|
|
13
12
|
}
|
|
@@ -6,8 +6,7 @@ const DEFAULT_VALUES = {
|
|
|
6
6
|
|
|
7
7
|
// ----------------------------------------------------------------------------
|
|
8
8
|
|
|
9
|
-
function extend(publicAPI, model) {
|
|
10
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
9
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
11
10
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
12
11
|
macro.setGet(publicAPI, model, ['visible']);
|
|
13
12
|
publicAPI.isVisible = publicAPI.getVisible;
|
|
@@ -42,10 +42,7 @@ const MIXINS = {
|
|
|
42
42
|
|
|
43
43
|
// ----------------------------------------------------------------------------
|
|
44
44
|
|
|
45
|
-
function newInstance(mixins, initialValues) {
|
|
46
|
-
let publicAPI = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
47
|
-
let model = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
48
|
-
let skipWidgetState = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
45
|
+
function newInstance(mixins, initialValues, publicAPI = {}, model = {}, skipWidgetState = false) {
|
|
49
46
|
if (!skipWidgetState) {
|
|
50
47
|
vtkWidgetState.extend(publicAPI, model, initialValues);
|
|
51
48
|
}
|
|
@@ -73,13 +70,12 @@ class Builder {
|
|
|
73
70
|
}
|
|
74
71
|
|
|
75
72
|
/* eslint-disable no-shadow */
|
|
76
|
-
addDynamicMixinState(
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
} = _ref;
|
|
73
|
+
addDynamicMixinState({
|
|
74
|
+
labels,
|
|
75
|
+
mixins,
|
|
76
|
+
name,
|
|
77
|
+
initialValues
|
|
78
|
+
}) {
|
|
83
79
|
const listName = `${name}List`;
|
|
84
80
|
this.model[listName] = [];
|
|
85
81
|
// Create new Instance method
|
|
@@ -117,35 +113,32 @@ class Builder {
|
|
|
117
113
|
};
|
|
118
114
|
return this;
|
|
119
115
|
}
|
|
120
|
-
addStateFromMixin(
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
} = _ref2;
|
|
116
|
+
addStateFromMixin({
|
|
117
|
+
labels,
|
|
118
|
+
mixins,
|
|
119
|
+
name,
|
|
120
|
+
initialValues
|
|
121
|
+
}) {
|
|
127
122
|
const instance = newInstance(mixins, initialValues);
|
|
128
123
|
this.model[name] = instance;
|
|
129
124
|
this.publicAPI.bindState(instance, labels);
|
|
130
125
|
macro.setGet(this.publicAPI, this.model, [name]);
|
|
131
126
|
return this;
|
|
132
127
|
}
|
|
133
|
-
addStateFromInstance(
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
} = _ref3;
|
|
128
|
+
addStateFromInstance({
|
|
129
|
+
labels,
|
|
130
|
+
name,
|
|
131
|
+
instance
|
|
132
|
+
}) {
|
|
139
133
|
this.model[name] = instance;
|
|
140
134
|
this.publicAPI.bindState(instance, labels);
|
|
141
135
|
macro.setGet(this.publicAPI, this.model, [name]);
|
|
142
136
|
return this;
|
|
143
137
|
}
|
|
144
|
-
addField(
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
} = _ref4;
|
|
138
|
+
addField({
|
|
139
|
+
name,
|
|
140
|
+
initialValue
|
|
141
|
+
}) {
|
|
149
142
|
if (Array.isArray(initialValue)) {
|
|
150
143
|
macro.setGetArray(this.publicAPI, this.model, [name], initialValue.length);
|
|
151
144
|
} else {
|
|
@@ -154,10 +147,7 @@ class Builder {
|
|
|
154
147
|
this.model[name] = initialValue;
|
|
155
148
|
return this;
|
|
156
149
|
}
|
|
157
|
-
build() {
|
|
158
|
-
for (var _len = arguments.length, mixins = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
159
|
-
mixins[_key] = arguments[_key];
|
|
160
|
-
}
|
|
150
|
+
build(...mixins) {
|
|
161
151
|
return newInstance(mixins, {}, this.publicAPI, this.model, true);
|
|
162
152
|
}
|
|
163
153
|
}
|
|
@@ -195,8 +195,7 @@ function vtkWidgetManager(publicAPI, model) {
|
|
|
195
195
|
}
|
|
196
196
|
if (wantRender) model._interactor.render();
|
|
197
197
|
};
|
|
198
|
-
const handleEvent = async
|
|
199
|
-
let fromTouchEvent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
198
|
+
const handleEvent = async (callData, fromTouchEvent = false) => {
|
|
200
199
|
if (!model.isAnimating && model.pickingEnabled && callData.pokedRenderer === model._renderer) {
|
|
201
200
|
const callID = Symbol('UpdateSelection');
|
|
202
201
|
model._currentUpdateSelectionCallID = callID;
|
|
@@ -423,37 +422,33 @@ function vtkWidgetManager(publicAPI, model) {
|
|
|
423
422
|
// Object factory
|
|
424
423
|
// ----------------------------------------------------------------------------
|
|
425
424
|
|
|
426
|
-
const defaultValues =
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
...initialValues
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
}
|
|
450
|
-
};
|
|
451
|
-
};
|
|
425
|
+
const defaultValues = (initialValues = {}) => ({
|
|
426
|
+
// _camera: null,
|
|
427
|
+
// _selector: null,
|
|
428
|
+
// _currentUpdateSelectionCallID: null,
|
|
429
|
+
viewId: null,
|
|
430
|
+
widgets: [],
|
|
431
|
+
activeWidget: null,
|
|
432
|
+
renderer: null,
|
|
433
|
+
viewType: ViewTypes.DEFAULT,
|
|
434
|
+
isAnimating: false,
|
|
435
|
+
pickingEnabled: true,
|
|
436
|
+
selections: null,
|
|
437
|
+
previousSelectedData: null,
|
|
438
|
+
widgetInFocus: null,
|
|
439
|
+
captureOn: CaptureOn.MOUSE_MOVE,
|
|
440
|
+
...initialValues,
|
|
441
|
+
cursorStyles: initialValues.cursorStyles ? {
|
|
442
|
+
...initialValues.cursorStyles
|
|
443
|
+
} : {
|
|
444
|
+
default: 'default',
|
|
445
|
+
hover: 'pointer'
|
|
446
|
+
}
|
|
447
|
+
});
|
|
452
448
|
|
|
453
449
|
// ----------------------------------------------------------------------------
|
|
454
450
|
|
|
455
|
-
function extend(publicAPI, model) {
|
|
456
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
451
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
457
452
|
Object.assign(model, defaultValues(initialValues));
|
|
458
453
|
macro.obj(publicAPI, model);
|
|
459
454
|
macro.setGet(publicAPI, model, ['captureOn', 'cursorStyles', {
|
|
@@ -21,8 +21,7 @@ function vtkWidgetState(publicAPI, model) {
|
|
|
21
21
|
// If nothing (or empty array) provided the default label will be used.
|
|
22
22
|
// --------------------------------------------------------------------------
|
|
23
23
|
|
|
24
|
-
publicAPI.bindState =
|
|
25
|
-
let labels = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [DEFAULT_LABEL];
|
|
24
|
+
publicAPI.bindState = (nested, labels = [DEFAULT_LABEL]) => {
|
|
26
25
|
model.nestedStates.push(nested);
|
|
27
26
|
subscriptions.push(nested.onModified(publicAPI.modified));
|
|
28
27
|
if (Array.isArray(labels) && labels.length) {
|
|
@@ -111,8 +110,7 @@ const DEFAULT_VALUES = {
|
|
|
111
110
|
|
|
112
111
|
// ----------------------------------------------------------------------------
|
|
113
112
|
|
|
114
|
-
function extend(publicAPI, model) {
|
|
115
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
113
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
116
114
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
117
115
|
macro.obj(publicAPI, model);
|
|
118
116
|
macro.setGet(publicAPI, model, ['active']);
|
|
@@ -60,8 +60,7 @@ const DEFAULT_VALUES = {
|
|
|
60
60
|
|
|
61
61
|
// ----------------------------------------------------------------------------
|
|
62
62
|
|
|
63
|
-
function extend(publicAPI, model) {
|
|
64
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
63
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
65
64
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
66
65
|
macro.obj(publicAPI, model);
|
|
67
66
|
macro.setGet(publicAPI, model, ['useCameraFocalPoint', 'useCameraNormal']);
|
|
@@ -99,8 +99,7 @@ function defaultValues(initialValues) {
|
|
|
99
99
|
|
|
100
100
|
// ----------------------------------------------------------------------------
|
|
101
101
|
|
|
102
|
-
function extend(publicAPI, model) {
|
|
103
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
102
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
104
103
|
vtkAbstractManipulator.extend(publicAPI, model, defaultValues(initialValues));
|
|
105
104
|
macro.setGet(publicAPI, model, ['distance', 'currentDistance', 'cprActor']);
|
|
106
105
|
macro.set(publicAPI, model, ['distanceStep']);
|
|
@@ -53,8 +53,7 @@ function defaultValues(initialValues) {
|
|
|
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
|
vtkAbstractManipulator.extend(publicAPI, model, defaultValues(initialValues));
|
|
59
58
|
vtkLineManipulator(publicAPI, model);
|
|
60
59
|
}
|
|
@@ -46,8 +46,7 @@ function defaultValues(initialValues) {
|
|
|
46
46
|
|
|
47
47
|
// ----------------------------------------------------------------------------
|
|
48
48
|
|
|
49
|
-
function extend(publicAPI, model) {
|
|
50
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
49
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
51
50
|
vtkAbstractManipulator.extend(publicAPI, model, defaultValues(initialValues));
|
|
52
51
|
macro.setGet(publicAPI, model, ['picker']);
|
|
53
52
|
vtkPickerManipulator(publicAPI, model);
|
|
@@ -32,8 +32,7 @@ function defaultValues(initialValues) {
|
|
|
32
32
|
|
|
33
33
|
// ----------------------------------------------------------------------------
|
|
34
34
|
|
|
35
|
-
function extend(publicAPI, model) {
|
|
36
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
35
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
37
36
|
vtkAbstractManipulator.extend(publicAPI, model, defaultValues(initialValues));
|
|
38
37
|
vtkPlaneManipulator(publicAPI, model);
|
|
39
38
|
}
|
|
@@ -58,8 +58,7 @@ function defaultValues(initialValues) {
|
|
|
58
58
|
|
|
59
59
|
// ----------------------------------------------------------------------------
|
|
60
60
|
|
|
61
|
-
function extend(publicAPI, model) {
|
|
62
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
61
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
63
62
|
vtkAbstractManipulator.extend(publicAPI, model, defaultValues(initialValues));
|
|
64
63
|
vtkTrackballManipulator(publicAPI, model);
|
|
65
64
|
}
|
|
@@ -239,10 +239,7 @@ function vtkArrowHandleRepresentation(publicAPI, model) {
|
|
|
239
239
|
}
|
|
240
240
|
return superClass.requestData(inData, outData);
|
|
241
241
|
};
|
|
242
|
-
publicAPI.updateActorVisibility =
|
|
243
|
-
let renderingType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : RenderingTypes.FRONT_BUFFER;
|
|
244
|
-
let ctxVisible = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
245
|
-
let handleVisible = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
242
|
+
publicAPI.updateActorVisibility = (renderingType = RenderingTypes.FRONT_BUFFER, ctxVisible = true, handleVisible = true) => {
|
|
246
243
|
const hasValidState = publicAPI.getRepresentationStates().length > 0;
|
|
247
244
|
superClass.updateActorVisibility(renderingType, ctxVisible, handleVisible && hasValidState);
|
|
248
245
|
};
|
|
@@ -272,8 +269,7 @@ function defaultValues(initialValues) {
|
|
|
272
269
|
|
|
273
270
|
// ----------------------------------------------------------------------------
|
|
274
271
|
|
|
275
|
-
function extend(publicAPI, model) {
|
|
276
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
272
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
277
273
|
Object.assign(model, defaultValues(initialValues));
|
|
278
274
|
vtkGlyphRepresentation.extend(publicAPI, model, initialValues);
|
|
279
275
|
macro.setGetArray(publicAPI, model, ['visibilityFlagArray'], 2);
|