@kitware/vtk.js 34.16.3 → 34.16.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +8 -8
- package/Common/Core/CellArray.d.ts +5 -1
- package/Common/Core/CellArray.js +6 -10
- package/Common/Core/DataArray.js +9 -23
- package/Common/Core/ImageHelper.d.ts +2 -2
- package/Common/Core/ImageHelper.js +6 -8
- package/Common/Core/LookupTable.js +1 -3
- package/Common/Core/Math/index.js +19 -47
- package/Common/Core/MatrixBuilder.js +2 -5
- package/Common/Core/Points.js +3 -8
- package/Common/Core/PriorityQueue.js +4 -8
- package/Common/Core/ProgressHandler.js +4 -7
- package/Common/Core/ScalarsToColors.js +1 -2
- package/Common/Core/StringArray.js +4 -12
- package/Common/Core/URLExtract.js +1 -3
- package/Common/Core/VariantArray.js +4 -12
- package/Common/DataModel/AbstractPointLocator.js +1 -2
- package/Common/DataModel/BoundingBox.js +6 -16
- package/Common/DataModel/Box.js +7 -11
- package/Common/DataModel/CardinalSpline1D.js +2 -4
- package/Common/DataModel/Cell.js +2 -4
- package/Common/DataModel/CellLinks.js +2 -4
- package/Common/DataModel/CellTypes.js +2 -5
- package/Common/DataModel/Collection.js +1 -2
- package/Common/DataModel/Cone.js +1 -2
- package/Common/DataModel/Cylinder.js +1 -2
- package/Common/DataModel/DataSet/Constants.js +0 -1
- package/Common/DataModel/DataSet.js +2 -4
- package/Common/DataModel/DataSetAttributes/Constants.js +0 -4
- package/Common/DataModel/DataSetAttributes/FieldData.js +3 -11
- package/Common/DataModel/DataSetAttributes.js +1 -2
- package/Common/DataModel/EdgeLocator.js +2 -4
- package/Common/DataModel/ITKHelper.js +4 -8
- package/Common/DataModel/ImageData.js +17 -33
- package/Common/DataModel/ImplicitBoolean.js +1 -2
- package/Common/DataModel/ImplicitFunction.js +1 -2
- package/Common/DataModel/IncrementalOctreeNode.js +1 -2
- package/Common/DataModel/IncrementalOctreePointLocator.js +2 -3
- package/Common/DataModel/KochanekSpline1D.js +2 -4
- package/Common/DataModel/Line.js +2 -4
- package/Common/DataModel/Locator.js +1 -2
- package/Common/DataModel/MergePoints.js +1 -2
- package/Common/DataModel/Molecule.js +1 -2
- package/Common/DataModel/PiecewiseFunction.js +2 -4
- package/Common/DataModel/Plane.js +1 -2
- package/Common/DataModel/Planes.js +2 -4
- package/Common/DataModel/PointLocator.js +3 -7
- package/Common/DataModel/PointSet.js +2 -4
- package/Common/DataModel/PolyData.js +4 -8
- package/Common/DataModel/PolyLine.js +1 -2
- package/Common/DataModel/Polygon.js +2 -4
- package/Common/DataModel/Quad.js +1 -2
- package/Common/DataModel/SelectionNode.js +1 -2
- package/Common/DataModel/Sphere.js +1 -2
- package/Common/DataModel/Spline1D.js +2 -3
- package/Common/DataModel/Spline3D.js +1 -2
- package/Common/DataModel/Triangle.js +2 -6
- package/Common/DataModel/TriangleStrip.js +1 -2
- package/Common/Transform/LandmarkTransform.js +1 -2
- package/Common/Transform/Transform.js +4 -10
- package/Filters/Core/CleanPolyData.js +1 -2
- package/Filters/Core/Cutter.js +1 -3
- package/Filters/Core/PolyDataNormals.js +1 -3
- package/Filters/Core/ThresholdPoints.js +2 -4
- package/Filters/Cornerstone/ImageDataToCornerstoneImage.js +1 -2
- package/Filters/General/AppendPolyData.js +1 -2
- package/Filters/General/Calculator.js +40 -47
- package/Filters/General/ClipClosedSurface.js +1 -4
- package/Filters/General/ClosedPolyLineToSurfaceFilter.js +1 -2
- package/Filters/General/ContourLoopExtraction.js +1 -2
- package/Filters/General/ContourTriangulator/helper.js +1 -5
- package/Filters/General/ContourTriangulator.js +2 -4
- package/Filters/General/ImageCropFilter.js +1 -2
- package/Filters/General/ImageDataOutlineFilter.js +1 -2
- package/Filters/General/ImageMarchingCubes/caseTable.js +0 -1
- package/Filters/General/ImageMarchingCubes.js +1 -4
- package/Filters/General/ImageMarchingSquares/caseTable.js +0 -1
- package/Filters/General/ImageMarchingSquares.js +1 -4
- package/Filters/General/ImageOutlineFilter.js +1 -2
- package/Filters/General/ImageSliceFilter.js +1 -2
- package/Filters/General/ImageStreamline.js +1 -3
- package/Filters/General/LineFilter.js +1 -2
- package/Filters/General/MoleculeToRepresentation.js +2 -5
- package/Filters/General/OBBTree/OBBNode.js +1 -2
- package/Filters/General/OBBTree.js +2 -6
- package/Filters/General/OutlineFilter.js +1 -2
- package/Filters/General/PaintFilter/PaintFilter.worker.js +20 -25
- package/Filters/General/PaintFilter.js +1 -2
- package/Filters/General/ScalarToRGBA.js +1 -2
- package/Filters/General/ShrinkPolyData.js +2 -4
- package/Filters/General/TransformPolyDataFilter.js +1 -2
- package/Filters/General/TriangleFilter.js +1 -2
- package/Filters/General/TubeFilter.js +2 -6
- package/Filters/General/WarpScalar.js +1 -2
- package/Filters/General/WindowedSincPolyDataFilter.js +1 -2
- package/Filters/Sources/ArcSource.js +1 -2
- package/Filters/Sources/Arrow2DSource.js +1 -2
- package/Filters/Sources/ArrowSource.js +1 -2
- package/Filters/Sources/CircleSource.d.ts +2 -3
- package/Filters/Sources/CircleSource.js +1 -2
- package/Filters/Sources/ConcentricCylinderSource.js +2 -6
- package/Filters/Sources/ConeSource.js +1 -2
- package/Filters/Sources/CubeSource.js +6 -7
- package/Filters/Sources/Cursor3D.js +1 -2
- package/Filters/Sources/CylinderSource.js +1 -2
- package/Filters/Sources/DiskSource.js +1 -2
- package/Filters/Sources/EllipseArcSource.js +1 -2
- package/Filters/Sources/FrustumSource.js +1 -2
- package/Filters/Sources/ImageGridSource.js +1 -2
- package/Filters/Sources/LineSource.js +1 -2
- package/Filters/Sources/PlaneSource.js +21 -22
- package/Filters/Sources/PlatonicSolidSource.js +1 -2
- package/Filters/Sources/PointSource.js +1 -2
- package/Filters/Sources/RTAnalyticSource.js +1 -2
- package/Filters/Sources/SLICSource.js +1 -2
- package/Filters/Sources/SphereSource.js +1 -2
- package/Filters/Sources/TorusSource.js +1 -2
- package/Filters/Sources/ViewFinderSource.js +1 -2
- package/Filters/Texture/TextureMapToPlane.js +1 -2
- package/Filters/Texture/TextureMapToSphere.js +1 -2
- package/IO/Core/BinaryHelper.js +1 -2
- package/IO/Core/DataAccessHelper/HtmlDataAccessHelper.js +4 -5
- package/IO/Core/DataAccessHelper/HttpDataAccessHelper.js +7 -16
- package/IO/Core/DataAccessHelper/JSZipDataAccessHelper.js +5 -9
- package/IO/Core/DataAccessHelper/LiteHttpDataAccessHelper.js +7 -16
- package/IO/Core/DataAccessHelper.js +1 -3
- package/IO/Core/HttpDataSetReader.js +10 -16
- package/IO/Core/HttpDataSetSeriesReader.js +4 -8
- package/IO/Core/HttpSceneLoader.js +3 -8
- package/IO/Core/ImageStream/DefaultProtocol.js +12 -42
- package/IO/Core/ImageStream/ViewStream.js +5 -8
- package/IO/Core/ImageStream.js +4 -9
- package/IO/Core/Serializer/ArraySerializer.js +1 -2
- package/IO/Core/WSLinkClient.js +14 -25
- package/IO/Core/ZipMultiDataSetReader.js +5 -12
- package/IO/Core/ZipMultiDataSetWriter.js +1 -2
- package/IO/Geometry/DracoReader.js +6 -10
- package/IO/Geometry/GLTFImporter/Animations.js +9 -14
- package/IO/Geometry/GLTFImporter/Constants.js +0 -1
- package/IO/Geometry/GLTFImporter/Parser.js +1 -3
- package/IO/Geometry/GLTFImporter/Reader.js +2 -5
- package/IO/Geometry/GLTFImporter.js +7 -12
- package/IO/Geometry/IFCImporter.d.ts +1 -1
- package/IO/Geometry/IFCImporter.js +6 -10
- package/IO/Geometry/PLYReader.js +6 -11
- package/IO/Geometry/PLYWriter.js +1 -2
- package/IO/Geometry/STLReader.js +6 -11
- package/IO/Geometry/STLWriter.js +2 -6
- package/IO/Image/HDRReader/Utils.js +1 -2
- package/IO/Image/HDRReader.js +7 -10
- package/IO/Image/TGAReader.js +7 -9
- package/IO/Image/TIFFReader.js +7 -10
- package/IO/Legacy/LegacyAsciiParser.js +1 -2
- package/IO/Legacy/PolyDataReader.js +5 -7
- package/IO/Misc/ElevationReader.js +1 -2
- package/IO/Misc/GCodeReader.js +6 -11
- package/IO/Misc/HttpDataSetLODsLoader.js +1 -2
- package/IO/Misc/ITKImageReader.js +6 -13
- package/IO/Misc/ITKPolyDataReader.js +6 -13
- package/IO/Misc/JSONNucleoReader.js +1 -2
- package/IO/Misc/JSONReader.js +4 -10
- package/IO/Misc/MTLReader.js +2 -4
- package/IO/Misc/OBJReader.js +4 -10
- package/IO/Misc/OBJWriter.js +1 -2
- package/IO/Misc/PDBReader.js +1 -2
- package/IO/Misc/SkyboxReader.js +5 -10
- package/IO/XML/XMLImageDataReader.js +1 -2
- package/IO/XML/XMLImageDataWriter.js +1 -2
- package/IO/XML/XMLPolyDataReader.js +1 -2
- package/IO/XML/XMLPolyDataWriter.js +1 -2
- package/IO/XML/XMLReader.js +4 -10
- package/IO/XML/XMLWriter.js +2 -4
- package/Imaging/Core/AbstractImageInterpolator.js +1 -3
- package/Imaging/Core/ImageInterpolator.js +1 -3
- package/Imaging/Core/ImagePointDataIterator.js +2 -6
- package/Imaging/Core/ImageReslice.js +1 -3
- package/Imaging/Hybrid/SampleFunction.js +1 -2
- package/Interaction/Animations/TimeStepBasedAnimationHandler.js +1 -2
- package/Interaction/Manipulators/3DControllerModelSelectorManipulator/index.js +1 -2
- package/Interaction/Manipulators/CompositeCameraManipulator.js +1 -2
- package/Interaction/Manipulators/CompositeGestureManipulator.js +1 -2
- package/Interaction/Manipulators/CompositeKeyboardManipulator.js +1 -2
- package/Interaction/Manipulators/CompositeMouseManipulator.js +1 -2
- package/Interaction/Manipulators/CompositeVRManipulator.js +1 -2
- package/Interaction/Manipulators/GestureCameraManipulator.js +1 -2
- package/Interaction/Manipulators/KeyboardCameraManipulator.js +1 -2
- package/Interaction/Manipulators/MouseBoxSelectorManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraAxisRotateManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraSliceManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraTrackballFirstPersonManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraTrackballMultiRotateManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraTrackballPanManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraTrackballPanManipulatorAutoCenter.js +1 -2
- package/Interaction/Manipulators/MouseCameraTrackballRollManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraTrackballRotateManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraTrackballZoomManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraTrackballZoomToMouseManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraUnicamManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraUnicamRotateManipulator.js +1 -2
- package/Interaction/Manipulators/MouseRangeManipulator.js +4 -11
- package/Interaction/Manipulators/VRButtonPanManipulator.js +1 -2
- package/Interaction/Misc/DeviceOrientationToCamera.js +1 -2
- package/Interaction/Style/InteractorStyleHMDXR.js +1 -2
- package/Interaction/Style/InteractorStyleImage.js +1 -2
- package/Interaction/Style/InteractorStyleMPRSlice.js +2 -6
- package/Interaction/Style/InteractorStyleManipulator.js +1 -2
- package/Interaction/Style/InteractorStyleRemoteMouse.js +1 -2
- package/Interaction/Style/InteractorStyleTrackballCamera.js +1 -3
- package/Interaction/Style/InteractorStyleUnicam.js +1 -2
- package/Interaction/UI/CornerAnnotation.js +2 -4
- package/Interaction/UI/FPSMonitor.js +3 -9
- package/Interaction/UI/Slider.js +1 -3
- package/Interaction/UI/VolumeController.js +2 -5
- package/Interaction/Widgets/OrientationMarkerWidget.js +1 -2
- package/Interaction/Widgets/PiecewiseGaussianWidget.js +42 -59
- package/Proxy/Animation/AbstractAnimationProxy.js +1 -2
- package/Proxy/Animation/AnimationProxyManager.js +1 -2
- package/Proxy/Animation/TimeStepBasedAnimationHandlerProxy.js +1 -2
- package/Proxy/Core/AbstractRepresentationProxy.js +3 -6
- package/Proxy/Core/LookupTableProxy.js +1 -3
- package/Proxy/Core/PiecewiseFunctionProxy.js +3 -11
- package/Proxy/Core/ProxyManager/state.js +171 -182
- package/Proxy/Core/ProxyManager/view.js +3 -6
- package/Proxy/Core/ProxyManager.js +1 -2
- package/Proxy/Core/SourceProxy.js +2 -6
- package/Proxy/Core/View2DProxy.js +2 -4
- package/Proxy/Core/ViewProxy.js +20 -37
- package/Proxy/Representations/GeometryRepresentationProxy.js +1 -2
- package/Proxy/Representations/GlyphRepresentationProxy.js +1 -2
- package/Proxy/Representations/MoleculeRepresentationProxy.js +1 -2
- package/Proxy/Representations/ResliceRepresentationProxy.js +3 -8
- package/Proxy/Representations/SkyboxRepresentationProxy.js +1 -2
- package/Proxy/Representations/SliceRepresentationProxy.js +3 -8
- package/Proxy/Representations/SlicedGeometryRepresentationProxy.js +3 -6
- package/Proxy/Representations/VolumeRepresentationProxy.js +9 -17
- package/Rendering/Core/AbstractImageMapper.js +1 -2
- package/Rendering/Core/AbstractMapper.js +1 -2
- package/Rendering/Core/AbstractMapper3D.js +1 -2
- package/Rendering/Core/AbstractPicker.js +1 -2
- package/Rendering/Core/Actor.js +1 -2
- package/Rendering/Core/Actor2D.js +1 -2
- package/Rendering/Core/AnnotatedCubeActor.js +2 -4
- package/Rendering/Core/AxesActor.js +2 -4
- package/Rendering/Core/Camera.js +2 -6
- package/Rendering/Core/CellPicker.js +1 -3
- package/Rendering/Core/ColorTransferFunction/CssFilters.js +8 -16
- package/Rendering/Core/ColorTransferFunction.js +4 -10
- package/Rendering/Core/Coordinate.js +2 -6
- package/Rendering/Core/CubeAxesActor.js +4 -6
- package/Rendering/Core/Follower.js +1 -2
- package/Rendering/Core/Glyph3DMapper.js +1 -2
- package/Rendering/Core/HardwareSelector.js +1 -2
- package/Rendering/Core/ImageArrayMapper.js +6 -13
- package/Rendering/Core/ImageCPRMapper.js +1 -2
- package/Rendering/Core/ImageMapper.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 +22 -15
|
@@ -66,8 +66,7 @@ function defaultValues(initialValues) {
|
|
|
66
66
|
|
|
67
67
|
// ----------------------------------------------------------------------------
|
|
68
68
|
|
|
69
|
-
function extend(publicAPI, model) {
|
|
70
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
69
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
71
70
|
vtkGlyphRepresentation.extend(publicAPI, model, defaultValues(initialValues));
|
|
72
71
|
macro.setGet(publicAPI, model, ['glyphResolution', 'drawFace', 'drawBorder']);
|
|
73
72
|
macro.get(publicAPI, model._pipeline, ['glyph', 'mapper', 'actor']);
|
|
@@ -21,8 +21,7 @@ const DEFAULT_VALUES = {
|
|
|
21
21
|
|
|
22
22
|
// ----------------------------------------------------------------------------
|
|
23
23
|
|
|
24
|
-
function extend(publicAPI, model) {
|
|
25
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
24
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
26
25
|
const newDefault = {
|
|
27
26
|
...DEFAULT_VALUES,
|
|
28
27
|
...initialValues
|
|
@@ -86,10 +86,7 @@ function vtkConvexFaceContextRepresentation(publicAPI, model) {
|
|
|
86
86
|
// --------------------------------------------------------------------------
|
|
87
87
|
|
|
88
88
|
const superUpdateActorVisibility = publicAPI.updateActorVisibility;
|
|
89
|
-
publicAPI.updateActorVisibility =
|
|
90
|
-
let renderingType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : RenderingTypes.FRONT_BUFFER;
|
|
91
|
-
let ctxVisible = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
92
|
-
let handleVisible = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
89
|
+
publicAPI.updateActorVisibility = (renderingType = RenderingTypes.FRONT_BUFFER, ctxVisible = true, handleVisible = true) => {
|
|
93
90
|
switch (model.behavior) {
|
|
94
91
|
case Behavior.HANDLE:
|
|
95
92
|
if (renderingType === RenderingTypes.PICKING_BUFFER) {
|
|
@@ -118,8 +115,7 @@ const DEFAULT_VALUES = {
|
|
|
118
115
|
|
|
119
116
|
// ----------------------------------------------------------------------------
|
|
120
117
|
|
|
121
|
-
function extend(publicAPI, model) {
|
|
122
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
118
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
123
119
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
124
120
|
vtkContextRepresentation.extend(publicAPI, model, initialValues);
|
|
125
121
|
macro.setGetArray(publicAPI, model, ['defaultColor'], 3);
|
|
@@ -74,8 +74,7 @@ const DEFAULT_VALUES = {
|
|
|
74
74
|
|
|
75
75
|
// ----------------------------------------------------------------------------
|
|
76
76
|
|
|
77
|
-
function extend(publicAPI, model) {
|
|
78
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
77
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
79
78
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
80
79
|
vtkContextRepresentation.extend(publicAPI, model, initialValues);
|
|
81
80
|
macro.setGetArray(publicAPI, model, ['edgeColor'], 3);
|
|
@@ -24,8 +24,7 @@ function defaultValues(initialValues) {
|
|
|
24
24
|
...initialValues
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
function extend(publicAPI, model) {
|
|
28
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
27
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
29
28
|
vtkGlyphRepresentation.extend(publicAPI, model, defaultValues(initialValues));
|
|
30
29
|
|
|
31
30
|
// Object specific methods
|
|
@@ -145,10 +145,7 @@ function vtkGlyphRepresentation(publicAPI, model) {
|
|
|
145
145
|
const internalPolyData = vtkPolyData.newInstance({
|
|
146
146
|
mtime: 0
|
|
147
147
|
});
|
|
148
|
-
function hasMixin(states) {
|
|
149
|
-
for (var _len = arguments.length, requiredMixins = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
150
|
-
requiredMixins[_key - 1] = arguments[_key];
|
|
151
|
-
}
|
|
148
|
+
function hasMixin(states, ...requiredMixins) {
|
|
152
149
|
return requiredMixins.every(requiredMixin => states[0]?.[`get${macro.capitalize(requiredMixin)}`]?.() != null);
|
|
153
150
|
}
|
|
154
151
|
// --------------------------------------------------------------------------
|
|
@@ -157,10 +154,7 @@ function vtkGlyphRepresentation(publicAPI, model) {
|
|
|
157
154
|
|
|
158
155
|
// --------------------------------------------------------------------------
|
|
159
156
|
|
|
160
|
-
publicAPI.getRepresentationStates =
|
|
161
|
-
let input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : model.inputData[0];
|
|
162
|
-
return superClass.getRepresentationStates(input).filter(state => state.getOrigin?.() && (state.isVisible?.() ?? true));
|
|
163
|
-
};
|
|
157
|
+
publicAPI.getRepresentationStates = (input = model.inputData[0]) => superClass.getRepresentationStates(input).filter(state => state.getOrigin?.() && (state.isVisible?.() ?? true));
|
|
164
158
|
|
|
165
159
|
// --------------------------------------------------------------------------
|
|
166
160
|
publicAPI.getMixins = states => {
|
|
@@ -231,7 +225,6 @@ function defaultValues(publicAPI, model, initialValues) {
|
|
|
231
225
|
}),
|
|
232
226
|
...initialValues._pipeline // in case there is something else to add to pipeline
|
|
233
227
|
},
|
|
234
|
-
|
|
235
228
|
applyMixin: {
|
|
236
229
|
origin: initialValues.applyMixin?.origin ?? origin(publicAPI, model),
|
|
237
230
|
noPosition: initialValues.applyMixin?.noPosition ?? noPosition(),
|
|
@@ -250,8 +243,7 @@ function defaultValues(publicAPI, model, initialValues) {
|
|
|
250
243
|
|
|
251
244
|
// ----------------------------------------------------------------------------
|
|
252
245
|
|
|
253
|
-
function extend(publicAPI, model) {
|
|
254
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
246
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
255
247
|
if (initialValues.behavior === Behavior.CONTEXT) {
|
|
256
248
|
vtkContextRepresentation.extend(publicAPI, model, defaultValues(publicAPI, model, initialValues));
|
|
257
249
|
} else {
|
|
@@ -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
|
const newDefault = {
|
|
29
28
|
...DEFAULT_VALUES,
|
|
30
29
|
...initialValues
|
|
@@ -323,8 +323,7 @@ const DEFAULT_VALUES = {
|
|
|
323
323
|
|
|
324
324
|
// ----------------------------------------------------------------------------
|
|
325
325
|
|
|
326
|
-
function extend(publicAPI, model) {
|
|
327
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
326
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
328
327
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
329
328
|
vtkWidgetRepresentation.extend(publicAPI, model, initialValues);
|
|
330
329
|
macro.get(publicAPI, model, ['sphereResolution', 'representationStyle']);
|
|
@@ -155,8 +155,7 @@ function defaultValues(initialValues) {
|
|
|
155
155
|
|
|
156
156
|
// ----------------------------------------------------------------------------
|
|
157
157
|
|
|
158
|
-
function extend(publicAPI, model) {
|
|
159
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
158
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
160
159
|
vtkGlyphRepresentation.extend(publicAPI, model, defaultValues(initialValues));
|
|
161
160
|
macro.setGet(publicAPI, model, ['infiniteLine', 'glyphResolution', 'holeWidth']);
|
|
162
161
|
|
|
@@ -78,8 +78,7 @@ const DEFAULT_VALUES = {
|
|
|
78
78
|
|
|
79
79
|
// ----------------------------------------------------------------------------
|
|
80
80
|
|
|
81
|
-
function extend(publicAPI, model) {
|
|
82
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
81
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
83
82
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
84
83
|
vtkContextRepresentation.extend(publicAPI, model, initialValues);
|
|
85
84
|
macro.setGetArray(publicAPI, model, ['edgeColor'], 3);
|
|
@@ -26,8 +26,7 @@ function vtkPolyLineRepresentation(publicAPI, model) {
|
|
|
26
26
|
const internalPolyData = vtkPolyData.newInstance({
|
|
27
27
|
mtime: 0
|
|
28
28
|
});
|
|
29
|
-
function allocateSize(polyData, size) {
|
|
30
|
-
let closePolyLine = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
29
|
+
function allocateSize(polyData, size, closePolyLine = false) {
|
|
31
30
|
let points = null;
|
|
32
31
|
if (size < 2) {
|
|
33
32
|
// FIXME: Why 1 point and not 0 ?
|
|
@@ -152,8 +151,7 @@ const DEFAULT_VALUES = {
|
|
|
152
151
|
|
|
153
152
|
// ----------------------------------------------------------------------------
|
|
154
153
|
|
|
155
|
-
function extend(publicAPI, model) {
|
|
156
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
154
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
157
155
|
const newDefault = {
|
|
158
156
|
...DEFAULT_VALUES,
|
|
159
157
|
...initialValues
|
|
@@ -92,8 +92,7 @@ const DEFAULT_VALUES = {
|
|
|
92
92
|
|
|
93
93
|
// ----------------------------------------------------------------------------
|
|
94
94
|
|
|
95
|
-
function extend(publicAPI, model) {
|
|
96
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
95
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
97
96
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
98
97
|
vtkContextRepresentation.extend(publicAPI, model, initialValues);
|
|
99
98
|
macro.setGetArray(publicAPI, model, ['color'], 1);
|
|
@@ -24,8 +24,7 @@ function defaultValues(initialValues) {
|
|
|
24
24
|
...initialValues
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
function extend(publicAPI, model) {
|
|
28
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
27
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
29
28
|
vtkGlyphRepresentation.extend(publicAPI, model, defaultValues(initialValues));
|
|
30
29
|
|
|
31
30
|
// Object specific methods
|
|
@@ -35,8 +35,7 @@ function defaultValues(initialValues) {
|
|
|
35
35
|
...initialValues
|
|
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
|
vtkGlyphRepresentation.extend(publicAPI, model, defaultValues(initialValues));
|
|
41
40
|
|
|
42
41
|
// Object specific methods
|
|
@@ -35,8 +35,7 @@ function defaultValues(initialValues) {
|
|
|
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
|
vtkGlyphRepresentation.extend(publicAPI, model, defaultValues(initialValues));
|
|
41
40
|
macro.setGet(publicAPI, model, ['glyphResolution']);
|
|
42
41
|
vtkSphereContextRepresentation(publicAPI, model);
|
|
@@ -65,8 +65,7 @@ function vtkSphereHandleRepresentation(publicAPI, model) {
|
|
|
65
65
|
|
|
66
66
|
// ----------------------------------------------------------------------------
|
|
67
67
|
|
|
68
|
-
function extend(publicAPI, model) {
|
|
69
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
68
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
70
69
|
vtkGlyphRepresentation.extend(publicAPI, model, initialValues);
|
|
71
70
|
|
|
72
71
|
// Object specific methods
|
|
@@ -53,10 +53,7 @@ function vtkSplineContextRepresentation(publicAPI, model) {
|
|
|
53
53
|
|
|
54
54
|
// --------------------------------------------------------------------------
|
|
55
55
|
const superGetRepresentationStates = publicAPI.getRepresentationStates;
|
|
56
|
-
publicAPI.getRepresentationStates =
|
|
57
|
-
let input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : model.inputData[0];
|
|
58
|
-
return superGetRepresentationStates(input).filter(state => state.getOrigin?.() && state.isVisible?.());
|
|
59
|
-
};
|
|
56
|
+
publicAPI.getRepresentationStates = (input = model.inputData[0]) => superGetRepresentationStates(input).filter(state => state.getOrigin?.() && state.isVisible?.());
|
|
60
57
|
publicAPI.requestData = (inData, outData) => {
|
|
61
58
|
const widgetState = inData[0];
|
|
62
59
|
outData[0] = model.internalPolyData;
|
|
@@ -137,8 +134,7 @@ const DEFAULT_VALUES = {
|
|
|
137
134
|
|
|
138
135
|
// ----------------------------------------------------------------------------
|
|
139
136
|
|
|
140
|
-
function extend(publicAPI, model) {
|
|
141
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
137
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
142
138
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
143
139
|
vtkContextRepresentation.extend(publicAPI, model, initialValues);
|
|
144
140
|
macro.get(publicAPI, model, ['mapper']);
|
package/Widgets/Representations/TranslateTransformHandleRepresentation/TransformHandleSource.js
CHANGED
|
@@ -63,8 +63,7 @@ const DEFAULT_VALUES = {
|
|
|
63
63
|
|
|
64
64
|
// ----------------------------------------------------------------------------
|
|
65
65
|
|
|
66
|
-
function extend(publicAPI, model) {
|
|
67
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
66
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
68
67
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
69
68
|
vtkCylinderSource.extend(publicAPI, model, initialValues);
|
|
70
69
|
macro.algo(publicAPI, model, 2, 1);
|
|
@@ -35,8 +35,7 @@ function defaultValues(initialValues) {
|
|
|
35
35
|
...initialValues
|
|
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
|
vtkGlyphRepresentation.extend(publicAPI, model, defaultValues(initialValues));
|
|
41
40
|
|
|
42
41
|
// Object specific methods
|
|
@@ -32,10 +32,7 @@ function applyCoincidentTopologyParametersToMapper(mapper, parameters) {
|
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
function mergeStyles(elementNames) {
|
|
36
|
-
for (var _len = arguments.length, stylesToMerge = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
37
|
-
stylesToMerge[_key - 1] = arguments[_key];
|
|
38
|
-
}
|
|
35
|
+
function mergeStyles(elementNames, ...stylesToMerge) {
|
|
39
36
|
const newStyleObject = {
|
|
40
37
|
active: {},
|
|
41
38
|
inactive: {},
|
|
@@ -167,10 +164,7 @@ function vtkWidgetRepresentation(publicAPI, model) {
|
|
|
167
164
|
publicAPI.getNestedProps = publicAPI.getActors;
|
|
168
165
|
// --------------------------------------------------------------------------
|
|
169
166
|
|
|
170
|
-
publicAPI.setLabels =
|
|
171
|
-
for (var _len2 = arguments.length, labels = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
172
|
-
labels[_key2] = arguments[_key2];
|
|
173
|
-
}
|
|
167
|
+
publicAPI.setLabels = (...labels) => {
|
|
174
168
|
if (labels.length === 1) {
|
|
175
169
|
model.labels = [].concat(labels[0]);
|
|
176
170
|
} else {
|
|
@@ -178,8 +172,7 @@ function vtkWidgetRepresentation(publicAPI, model) {
|
|
|
178
172
|
}
|
|
179
173
|
publicAPI.modified();
|
|
180
174
|
};
|
|
181
|
-
publicAPI.getRepresentationStates =
|
|
182
|
-
let input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : model.inputData[0];
|
|
175
|
+
publicAPI.getRepresentationStates = (input = model.inputData[0]) => {
|
|
183
176
|
if (cache.mtimes.representation === publicAPI.getMTime() && cache.mtimes.input === input.getMTime()) {
|
|
184
177
|
return cache.states;
|
|
185
178
|
}
|
|
@@ -203,10 +196,7 @@ function vtkWidgetRepresentation(publicAPI, model) {
|
|
|
203
196
|
vtkErrorMacro(`Representation ${publicAPI.getClassName()} should implement getSelectedState(prop, compositeID) method.`);
|
|
204
197
|
return null;
|
|
205
198
|
};
|
|
206
|
-
publicAPI.updateActorVisibility =
|
|
207
|
-
let renderingType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : RenderingTypes.FRONT_BUFFER;
|
|
208
|
-
let ctxVisible = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
209
|
-
let handleVisible = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
199
|
+
publicAPI.updateActorVisibility = (renderingType = RenderingTypes.FRONT_BUFFER, ctxVisible = true, handleVisible = true) => {
|
|
210
200
|
let otherFlag = true;
|
|
211
201
|
switch (model.behavior) {
|
|
212
202
|
case Behavior.HANDLE:
|
|
@@ -235,11 +225,8 @@ function vtkWidgetRepresentation(publicAPI, model) {
|
|
|
235
225
|
};
|
|
236
226
|
|
|
237
227
|
// Add warning to model.actors.push
|
|
238
|
-
model.actors.push =
|
|
228
|
+
model.actors.push = (...args) => {
|
|
239
229
|
vtkWarningMacro('You should use publicAPI.addActor() to initialize the actor properly');
|
|
240
|
-
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
241
|
-
args[_key3] = arguments[_key3];
|
|
242
|
-
}
|
|
243
230
|
args.forEach(actor => publicAPI.addActor(actor));
|
|
244
231
|
};
|
|
245
232
|
publicAPI.addActor = actor => {
|
|
@@ -292,8 +279,7 @@ function defaultValues(initialValues) {
|
|
|
292
279
|
|
|
293
280
|
// ----------------------------------------------------------------------------
|
|
294
281
|
|
|
295
|
-
function extend(publicAPI, model) {
|
|
296
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
282
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
297
283
|
// Object methods
|
|
298
284
|
vtkProp.extend(publicAPI, model, defaultValues(initialValues));
|
|
299
285
|
macro.algo(publicAPI, model, 1, 1);
|
|
@@ -85,8 +85,7 @@ const defaultValues = initialValues => ({
|
|
|
85
85
|
|
|
86
86
|
// ----------------------------------------------------------------------------
|
|
87
87
|
|
|
88
|
-
function extend(publicAPI, model) {
|
|
89
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
88
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
90
89
|
Object.assign(model, defaultValues(initialValues));
|
|
91
90
|
vtkAbstractWidgetFactory.extend(publicAPI, model, initialValues);
|
|
92
91
|
macro.setGet(publicAPI, model, ['manipulator']);
|
|
@@ -69,8 +69,7 @@ function defaultValues(initialValues) {
|
|
|
69
69
|
|
|
70
70
|
// ----------------------------------------------------------------------------
|
|
71
71
|
|
|
72
|
-
function extend(publicAPI, model) {
|
|
73
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
72
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
74
73
|
vtkShapeWidget.extend(publicAPI, model, defaultValues(initialValues));
|
|
75
74
|
macro.setGet(publicAPI, model, ['widgetState']);
|
|
76
75
|
vtkEllipseWidget(publicAPI, model);
|
|
@@ -149,8 +149,7 @@ const defaultValues = initialValues => ({
|
|
|
149
149
|
|
|
150
150
|
// ----------------------------------------------------------------------------
|
|
151
151
|
|
|
152
|
-
function extend(publicAPI, model) {
|
|
153
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
152
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
154
153
|
Object.assign(model, defaultValues(initialValues));
|
|
155
154
|
vtkAbstractWidgetFactory.extend(publicAPI, model, initialValues);
|
|
156
155
|
macro.setGet(publicAPI, model, ['cornerManipulator', 'edgeManipulator', 'faceManipulator']);
|
|
@@ -58,7 +58,6 @@ function widgetBehavior(publicAPI, model) {
|
|
|
58
58
|
break;
|
|
59
59
|
// skip
|
|
60
60
|
}
|
|
61
|
-
|
|
62
61
|
if (activeManipulator) {
|
|
63
62
|
activeManipulator.handleEvent(callData, model._apiSpecificRenderWindow);
|
|
64
63
|
}
|
|
@@ -183,8 +182,7 @@ const defaultValues = initialValues => ({
|
|
|
183
182
|
|
|
184
183
|
// ----------------------------------------------------------------------------
|
|
185
184
|
|
|
186
|
-
function extend(publicAPI, model) {
|
|
187
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
185
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
188
186
|
Object.assign(model, defaultValues(initialValues));
|
|
189
187
|
vtkAbstractWidgetFactory.extend(publicAPI, model, initialValues);
|
|
190
188
|
vtkImplicitPlaneWidget(publicAPI, model);
|
|
@@ -42,13 +42,12 @@ function createInteractiveOrientationMarkerWidget(widgetManager, interactor, mai
|
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
function alignCameraOnViewWidgetOrientationChange(viewWidget, camera, orientationMarkerWidget, widgetManager, render) {
|
|
45
|
-
return viewWidget.onOrientationChange(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
} = _ref;
|
|
45
|
+
return viewWidget.onOrientationChange(({
|
|
46
|
+
up,
|
|
47
|
+
direction,
|
|
48
|
+
action,
|
|
49
|
+
event
|
|
50
|
+
}) => {
|
|
52
51
|
const focalPoint = camera.getFocalPoint();
|
|
53
52
|
const position = camera.getPosition();
|
|
54
53
|
const viewUp = camera.getViewUp();
|
|
@@ -114,8 +114,7 @@ const defaultValues = initialValues => ({
|
|
|
114
114
|
|
|
115
115
|
// ----------------------------------------------------------------------------
|
|
116
116
|
|
|
117
|
-
function extend(publicAPI, model) {
|
|
118
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
117
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
119
118
|
Object.assign(model, defaultValues(initialValues));
|
|
120
119
|
vtkAbstractWidgetFactory.extend(publicAPI, model, initialValues);
|
|
121
120
|
vtkInteractiveOrientationWidget(publicAPI, model);
|
|
@@ -62,8 +62,7 @@ function defaultValues(initialValues) {
|
|
|
62
62
|
|
|
63
63
|
// ----------------------------------------------------------------------------
|
|
64
64
|
|
|
65
|
-
function extend(publicAPI, model) {
|
|
66
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
65
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
67
66
|
Object.assign(model, defaultValues(initialValues));
|
|
68
67
|
vtkAbstractWidgetFactory.extend(publicAPI, model, initialValues);
|
|
69
68
|
macro.setGet(publicAPI, model, ['manipulator']);
|
|
@@ -86,8 +86,7 @@ function widgetBehavior(publicAPI, model) {
|
|
|
86
86
|
* @param {number} handleIndex 0 for handle1, 1 for handle2
|
|
87
87
|
* @param {object} callData if specified, uses mouse position as 2nd point
|
|
88
88
|
*/
|
|
89
|
-
function getHandleOrientation(handleIndex) {
|
|
90
|
-
let callData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
89
|
+
function getHandleOrientation(handleIndex, callData = null) {
|
|
91
90
|
const point1 = getPoint(handleIndex, model.widgetState);
|
|
92
91
|
const point2 = callData ? computeMousePosition(point1, callData) : getPoint(1 - handleIndex, model.widgetState);
|
|
93
92
|
return point1 && point2 ? getLineDirection(point1, point2) : null;
|
|
@@ -37,8 +37,7 @@ function isHandlePlaced(handleIndex, widgetState) {
|
|
|
37
37
|
* @param {object} widgetState state of line widget
|
|
38
38
|
* @param {bool} moveHandle Get move handle position if moveHandle is true and handle is not placed
|
|
39
39
|
*/
|
|
40
|
-
function getPoint(handleIndex, widgetState) {
|
|
41
|
-
let moveHandle = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
40
|
+
function getPoint(handleIndex, widgetState, moveHandle = true) {
|
|
42
41
|
const handle = moveHandle && !isHandlePlaced(handleIndex, widgetState) ? widgetState.getMoveHandle() : widgetState[`getHandle${handleIndex + 1}`]();
|
|
43
42
|
const origin = handle.getOrigin();
|
|
44
43
|
return origin || null;
|
|
@@ -165,8 +165,7 @@ const defaultValues = initialValues => ({
|
|
|
165
165
|
|
|
166
166
|
// ----------------------------------------------------------------------------
|
|
167
167
|
|
|
168
|
-
function extend(publicAPI, model) {
|
|
169
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
168
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
170
169
|
Object.assign(model, defaultValues(initialValues));
|
|
171
170
|
vtkAbstractWidgetFactory.extend(publicAPI, model, initialValues);
|
|
172
171
|
macro.setGet(publicAPI, model, ['manipulator']);
|
|
@@ -76,8 +76,7 @@ const defaultValues = initialValues => ({
|
|
|
76
76
|
|
|
77
77
|
// ----------------------------------------------------------------------------
|
|
78
78
|
|
|
79
|
-
function extend(publicAPI, model) {
|
|
80
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
79
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
81
80
|
Object.assign(model, defaultValues(initialValues));
|
|
82
81
|
vtkAbstractWidgetFactory.extend(publicAPI, model, initialValues);
|
|
83
82
|
macro.get(publicAPI, model, ['painting']);
|
|
@@ -137,10 +137,9 @@ function widgetBehavior(publicAPI, model) {
|
|
|
137
137
|
// Escape key: Release focus to switch to drag mode
|
|
138
138
|
// --------------------------------------------------------------------------
|
|
139
139
|
|
|
140
|
-
publicAPI.handleKeyDown =
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
} = _ref;
|
|
140
|
+
publicAPI.handleKeyDown = ({
|
|
141
|
+
key
|
|
142
|
+
}) => {
|
|
144
143
|
if (key === 'Escape') {
|
|
145
144
|
publicAPI.loseFocus();
|
|
146
145
|
}
|
|
@@ -71,8 +71,7 @@ const defaultValues = initialValues => ({
|
|
|
71
71
|
|
|
72
72
|
// ----------------------------------------------------------------------------
|
|
73
73
|
|
|
74
|
-
function extend(publicAPI, model) {
|
|
75
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
74
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
76
75
|
Object.assign(model, defaultValues(initialValues));
|
|
77
76
|
vtkAbstractWidgetFactory.extend(publicAPI, model, initialValues);
|
|
78
77
|
macro.setGet(publicAPI, model, ['manipulator']);
|
|
@@ -69,8 +69,7 @@ function defaultValues(initialValues) {
|
|
|
69
69
|
|
|
70
70
|
// ----------------------------------------------------------------------------
|
|
71
71
|
|
|
72
|
-
function extend(publicAPI, model) {
|
|
73
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
72
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
74
73
|
vtkShapeWidget.extend(publicAPI, model, defaultValues(initialValues));
|
|
75
74
|
macro.setGet(publicAPI, model, ['widgetState']);
|
|
76
75
|
vtkRectangleWidget(publicAPI, model);
|
|
@@ -25,7 +25,6 @@ function widgetBehavior(publicAPI, model) {
|
|
|
25
25
|
model.representations[0].setPickable(enable); // line handle
|
|
26
26
|
model.representations[2].setPickable(enable); // center handle
|
|
27
27
|
};
|
|
28
|
-
|
|
29
28
|
publicAPI.setEnableRotation = enable => {
|
|
30
29
|
model.representations[1].setPickable(enable); // rotation handle
|
|
31
30
|
};
|
|
@@ -4,7 +4,7 @@ import vtkCutter from '../../../Filters/Core/Cutter.js';
|
|
|
4
4
|
import vtkPlane from '../../../Common/DataModel/Plane.js';
|
|
5
5
|
import { s as subtract, l as normalize, j as cross, x as multiplyScalar, m as multiplyAccumulate, _ as signedAngleBetweenVectors } from '../../../Common/Core/Math/index.js';
|
|
6
6
|
import vtkMatrixBuilder from '../../../Common/Core/MatrixBuilder.js';
|
|
7
|
-
import { viewTypeToPlaneName,
|
|
7
|
+
import { viewTypeToPlaneName, planeNames, planeNameToViewType } from './Constants.js';
|
|
8
8
|
|
|
9
9
|
const EPSILON = 10e-7;
|
|
10
10
|
|
|
@@ -143,8 +143,7 @@ function getLineInPlaneName(lineName) {
|
|
|
143
143
|
* ['XinY', 'XinZ', 'YinX', 'YinZ', 'ZinX', 'ZinY'] if planes == ['X', 'Y', 'Z']
|
|
144
144
|
* @param {string} planes name of the planes (e.g. ['X', 'Y'])
|
|
145
145
|
*/
|
|
146
|
-
function getPlanesLineNames() {
|
|
147
|
-
let planes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : planeNames;
|
|
146
|
+
function getPlanesLineNames(planes = planeNames) {
|
|
148
147
|
const lines = [];
|
|
149
148
|
planes.forEach(plane => {
|
|
150
149
|
planes.forEach(inPlane => {
|
|
@@ -25,9 +25,7 @@ const viewsColor3 = {
|
|
|
25
25
|
// green
|
|
26
26
|
Z: [0, 0, 255] // blue
|
|
27
27
|
};
|
|
28
|
-
|
|
29
|
-
function generateState() {
|
|
30
|
-
let planes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : planeNames;
|
|
28
|
+
function generateState(planes = planeNames) {
|
|
31
29
|
const state = vtkStateBuilder.createBuilder().addField({
|
|
32
30
|
name: 'center',
|
|
33
31
|
initialValue: [0, 0, 0]
|
|
@@ -353,7 +353,6 @@ function vtkResliceCursorWidget(publicAPI, model) {
|
|
|
353
353
|
extentY <<= 1; // eslint-disable-line no-bitwise
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
|
-
|
|
357
356
|
const outputSpacingX = extentX === 0 ? 1.0 : planeSizeX / extentX;
|
|
358
357
|
const outputSpacingY = extentY === 0 ? 1.0 : planeSizeY / extentY;
|
|
359
358
|
let modified = imageReslice.setResliceAxes(newResliceAxes);
|
|
@@ -434,8 +433,7 @@ const defaultValues = initialValues => ({
|
|
|
434
433
|
|
|
435
434
|
// ----------------------------------------------------------------------------
|
|
436
435
|
|
|
437
|
-
function extend(publicAPI, model) {
|
|
438
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
436
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
439
437
|
Object.assign(model, defaultValues(initialValues));
|
|
440
438
|
vtkAbstractWidgetFactory.extend(publicAPI, model, initialValues);
|
|
441
439
|
macro.setGet(publicAPI, model, ['scaleInPixels', 'rotationHandlePosition', 'manipulator']);
|
|
@@ -27,8 +27,7 @@ const defaultValues = initialValues => ({
|
|
|
27
27
|
widgetState: stateGenerator(),
|
|
28
28
|
...initialValues
|
|
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, defaultValues(initialValues));
|
|
33
32
|
vtkAbstractWidgetFactory.extend(publicAPI, model, initialValues);
|
|
34
33
|
macro.setGet(publicAPI, model, ['manipulator', 'widgetState']);
|