@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
|
@@ -44,8 +44,7 @@ const DEFAULT_VALUES = {};
|
|
|
44
44
|
|
|
45
45
|
// ----------------------------------------------------------------------------
|
|
46
46
|
|
|
47
|
-
function extend(publicAPI, model) {
|
|
48
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
47
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
49
48
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
50
49
|
|
|
51
50
|
// Object methods
|
|
@@ -11,10 +11,7 @@ function sum(a, b) {
|
|
|
11
11
|
|
|
12
12
|
// ----------------------------------------------------------------------------
|
|
13
13
|
|
|
14
|
-
function mean() {
|
|
15
|
-
for (var _len = arguments.length, array = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
16
|
-
array[_key] = arguments[_key];
|
|
17
|
-
}
|
|
14
|
+
function mean(...array) {
|
|
18
15
|
return array.reduce(sum, 0) / array.length;
|
|
19
16
|
}
|
|
20
17
|
|
|
@@ -225,8 +222,7 @@ function vtkSliceRepresentationProxy(publicAPI, model) {
|
|
|
225
222
|
};
|
|
226
223
|
};
|
|
227
224
|
const parentSetColorBy = publicAPI.setColorBy;
|
|
228
|
-
publicAPI.setColorBy =
|
|
229
|
-
let componentIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : -1;
|
|
225
|
+
publicAPI.setColorBy = (arrayName, arrayLocation, componentIndex = -1) => {
|
|
230
226
|
if (arrayName === null) {
|
|
231
227
|
model.property.setRGBTransferFunction(null);
|
|
232
228
|
model.property.setPiecewiseFunction(null);
|
|
@@ -251,8 +247,7 @@ const DEFAULT_VALUES = {};
|
|
|
251
247
|
|
|
252
248
|
// ----------------------------------------------------------------------------
|
|
253
249
|
|
|
254
|
-
function extend(publicAPI, model) {
|
|
255
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
250
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
256
251
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
257
252
|
|
|
258
253
|
// Object methods
|
|
@@ -32,8 +32,7 @@ function vtkSlicedGeometryRepresentationProxy(publicAPI, model) {
|
|
|
32
32
|
model.sourceDependencies.push(model.cutter);
|
|
33
33
|
|
|
34
34
|
// API ----------------------------------------------------------------------
|
|
35
|
-
publicAPI.setSlice =
|
|
36
|
-
let slice = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
35
|
+
publicAPI.setSlice = (slice = 0) => {
|
|
37
36
|
const stateModified = model.slice !== slice;
|
|
38
37
|
model.slice = slice;
|
|
39
38
|
const n = model.plane.getNormal();
|
|
@@ -44,8 +43,7 @@ function vtkSlicedGeometryRepresentationProxy(publicAPI, model) {
|
|
|
44
43
|
}
|
|
45
44
|
return false;
|
|
46
45
|
};
|
|
47
|
-
publicAPI.setOffset =
|
|
48
|
-
let offset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
46
|
+
publicAPI.setOffset = (offset = 0) => {
|
|
49
47
|
const stateModified = model.offset !== offset;
|
|
50
48
|
model.offset = offset;
|
|
51
49
|
const normal = model.plane.getNormal();
|
|
@@ -98,8 +96,7 @@ const DEFAULT_VALUES = {
|
|
|
98
96
|
|
|
99
97
|
// ----------------------------------------------------------------------------
|
|
100
98
|
|
|
101
|
-
function extend(publicAPI, model) {
|
|
102
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
99
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
103
100
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
104
101
|
|
|
105
102
|
// Object methods
|
|
@@ -15,10 +15,7 @@ function sum(a, b) {
|
|
|
15
15
|
|
|
16
16
|
// ----------------------------------------------------------------------------
|
|
17
17
|
|
|
18
|
-
function mean() {
|
|
19
|
-
for (var _len = arguments.length, array = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
20
|
-
array[_key] = arguments[_key];
|
|
21
|
-
}
|
|
18
|
+
function mean(...array) {
|
|
22
19
|
return array.reduce(sum, 0) / array.length;
|
|
23
20
|
}
|
|
24
21
|
|
|
@@ -90,11 +87,10 @@ function updateDomains(dataset, dataArray, model, updateProp) {
|
|
|
90
87
|
|
|
91
88
|
// ----------------------------------------------------------------------------
|
|
92
89
|
|
|
93
|
-
function updateConfiguration(dataset, dataArray,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
} = _ref;
|
|
90
|
+
function updateConfiguration(dataset, dataArray, {
|
|
91
|
+
mapper,
|
|
92
|
+
property
|
|
93
|
+
}) {
|
|
98
94
|
// Configuration
|
|
99
95
|
// actor.getProperty().setInterpolationTypeToFastLinear();
|
|
100
96
|
property.setInterpolationTypeToLinear();
|
|
@@ -253,8 +249,7 @@ function vtkVolumeRepresentationProxy(publicAPI, model) {
|
|
|
253
249
|
}
|
|
254
250
|
};
|
|
255
251
|
publicAPI.getSliceVisibility = () => model.actorX.getVisibility() || model.actorY.getVisibility() || model.actorZ.getVisibility();
|
|
256
|
-
publicAPI.setSampleDistance =
|
|
257
|
-
let distance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0.4;
|
|
252
|
+
publicAPI.setSampleDistance = (distance = 0.4) => {
|
|
258
253
|
if (model.sampleDistance !== distance) {
|
|
259
254
|
model.sampleDistance = distance;
|
|
260
255
|
const sourceDS = publicAPI.getInputDataSet();
|
|
@@ -263,8 +258,7 @@ function vtkVolumeRepresentationProxy(publicAPI, model) {
|
|
|
263
258
|
publicAPI.modified();
|
|
264
259
|
}
|
|
265
260
|
};
|
|
266
|
-
publicAPI.setEdgeGradient =
|
|
267
|
-
let edgeGradient = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0.2;
|
|
261
|
+
publicAPI.setEdgeGradient = (edgeGradient = 0.2) => {
|
|
268
262
|
if (model.edgeGradient !== edgeGradient) {
|
|
269
263
|
model.edgeGradient = edgeGradient;
|
|
270
264
|
const dataArray = publicAPI.getDataArray();
|
|
@@ -290,8 +284,7 @@ function vtkVolumeRepresentationProxy(publicAPI, model) {
|
|
|
290
284
|
}
|
|
291
285
|
};
|
|
292
286
|
const parentSetColorBy = publicAPI.setColorBy;
|
|
293
|
-
publicAPI.setColorBy =
|
|
294
|
-
let componentIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : -1;
|
|
287
|
+
publicAPI.setColorBy = (arrayName, arrayLocation, componentIndex = -1) => {
|
|
295
288
|
parentSetColorBy(arrayName, arrayLocation, componentIndex);
|
|
296
289
|
const lutProxy = publicAPI.getLookupTableProxy(arrayName);
|
|
297
290
|
const pwfProxy = publicAPI.getPiecewiseFunctionProxy(arrayName);
|
|
@@ -313,8 +306,7 @@ const DEFAULT_VALUES = {
|
|
|
313
306
|
|
|
314
307
|
// ----------------------------------------------------------------------------
|
|
315
308
|
|
|
316
|
-
function extend(publicAPI, model) {
|
|
317
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
309
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
318
310
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
319
311
|
|
|
320
312
|
// Object methods
|
|
@@ -32,8 +32,7 @@ const DEFAULT_VALUES = {
|
|
|
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
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
38
37
|
|
|
39
38
|
// Build VTK API
|
|
@@ -91,8 +91,7 @@ const DEFAULT_VALUES = {
|
|
|
91
91
|
|
|
92
92
|
// ----------------------------------------------------------------------------
|
|
93
93
|
|
|
94
|
-
function extend(publicAPI, model) {
|
|
95
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
94
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
96
95
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
97
96
|
|
|
98
97
|
// Object methods
|
|
@@ -36,8 +36,7 @@ const defaultValues = initialValues => ({
|
|
|
36
36
|
|
|
37
37
|
// ----------------------------------------------------------------------------
|
|
38
38
|
|
|
39
|
-
function extend(publicAPI, model) {
|
|
40
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
39
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
41
40
|
Object.assign(model, defaultValues(initialValues));
|
|
42
41
|
// Inheritance
|
|
43
42
|
vtkAbstractMapper.extend(publicAPI, model, initialValues);
|
|
@@ -44,8 +44,7 @@ const DEFAULT_VALUES = {
|
|
|
44
44
|
|
|
45
45
|
// ----------------------------------------------------------------------------
|
|
46
46
|
|
|
47
|
-
function extend(publicAPI, model) {
|
|
48
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
47
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
49
48
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
50
49
|
|
|
51
50
|
// Build VTK API
|
package/Rendering/Core/Actor.js
CHANGED
|
@@ -93,8 +93,7 @@ const DEFAULT_VALUES = {
|
|
|
93
93
|
|
|
94
94
|
// ----------------------------------------------------------------------------
|
|
95
95
|
|
|
96
|
-
function extend(publicAPI, model) {
|
|
97
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
96
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
98
97
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
99
98
|
|
|
100
99
|
// Inheritance
|
|
@@ -130,8 +130,7 @@ const DEFAULT_VALUES = {
|
|
|
130
130
|
|
|
131
131
|
// ----------------------------------------------------------------------------
|
|
132
132
|
|
|
133
|
-
function extend(publicAPI, model) {
|
|
134
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
133
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
135
134
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
136
135
|
|
|
137
136
|
// Inheritance
|
|
@@ -53,8 +53,7 @@ function vtkAnnotatedCubeActor(publicAPI, model) {
|
|
|
53
53
|
|
|
54
54
|
// private methods
|
|
55
55
|
|
|
56
|
-
function updateFaceTexture(faceName) {
|
|
57
|
-
let newProp = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
56
|
+
function updateFaceTexture(faceName, newProp = null) {
|
|
58
57
|
if (newProp) {
|
|
59
58
|
Object.assign(model[`${faceName}FaceProperty`], newProp);
|
|
60
59
|
}
|
|
@@ -168,8 +167,7 @@ const DEFAULT_VALUES = {
|
|
|
168
167
|
|
|
169
168
|
// ----------------------------------------------------------------------------
|
|
170
169
|
|
|
171
|
-
function extend(publicAPI, model) {
|
|
172
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
170
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
173
171
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
174
172
|
|
|
175
173
|
// Inheritance
|
|
@@ -13,8 +13,7 @@ function centerDataSet(ds) {
|
|
|
13
13
|
const center = [-(bounds[0] + bounds[1]) * 0.5, -(bounds[2] + bounds[3]) * 0.5, -(bounds[4] + bounds[5]) * 0.5];
|
|
14
14
|
vtkMatrixBuilder.buildFromDegree().translate(...center).apply(ds.getPoints().getData());
|
|
15
15
|
}
|
|
16
|
-
function shiftDataset(ds, axis) {
|
|
17
|
-
let invert = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
16
|
+
function shiftDataset(ds, axis, invert = false) {
|
|
18
17
|
const bounds = ds.getPoints().getBounds();
|
|
19
18
|
const center = [0, 0, 0];
|
|
20
19
|
if (invert) {
|
|
@@ -160,8 +159,7 @@ function defaultValues(initialValues) {
|
|
|
160
159
|
|
|
161
160
|
// ----------------------------------------------------------------------------
|
|
162
161
|
|
|
163
|
-
function extend(publicAPI, model) {
|
|
164
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
162
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
165
163
|
// Inheritance
|
|
166
164
|
vtkActor.extend(publicAPI, model, defaultValues(initialValues));
|
|
167
165
|
macro.setGet(publicAPI, model, ['config', 'xConfig', 'yConfig', 'zConfig']);
|
package/Rendering/Core/Camera.js
CHANGED
|
@@ -274,9 +274,7 @@ function vtkCamera(publicAPI, model) {
|
|
|
274
274
|
publicAPI.setObliqueAngles = (alpha, beta) => {};
|
|
275
275
|
publicAPI.getOrientation = () => {};
|
|
276
276
|
publicAPI.getOrientationWXYZ = () => {};
|
|
277
|
-
publicAPI.getFrustumPlanes =
|
|
278
|
-
let aspect = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1.0;
|
|
279
|
-
let planes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Float64Array(24);
|
|
277
|
+
publicAPI.getFrustumPlanes = (aspect = 1.0, planes = new Float64Array(24)) => {
|
|
280
278
|
const normals = [
|
|
281
279
|
// Left
|
|
282
280
|
[1, 0, 0, 1],
|
|
@@ -428,7 +426,6 @@ function vtkCamera(publicAPI, model) {
|
|
|
428
426
|
// at
|
|
429
427
|
model.viewUp // up
|
|
430
428
|
);
|
|
431
|
-
|
|
432
429
|
mat4.transpose(tmpMatrix, tmpMatrix);
|
|
433
430
|
const result = new Float64Array(16);
|
|
434
431
|
if (model.modelTransformMatrix) {
|
|
@@ -636,8 +633,7 @@ const DEFAULT_VALUES = {
|
|
|
636
633
|
|
|
637
634
|
// ----------------------------------------------------------------------------
|
|
638
635
|
|
|
639
|
-
function extend(publicAPI, model) {
|
|
640
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
636
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
641
637
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
642
638
|
|
|
643
639
|
// Build VTK API
|
|
@@ -383,7 +383,6 @@ function vtkCellPicker(publicAPI, model) {
|
|
|
383
383
|
}
|
|
384
384
|
/* eslint-enable no-continue */
|
|
385
385
|
}
|
|
386
|
-
|
|
387
386
|
if (minCellId >= 0 && tMin < model.globalTMin) {
|
|
388
387
|
resetPickInfo();
|
|
389
388
|
const nbPointsInCell = minCell.getNumberOfPoints();
|
|
@@ -453,8 +452,7 @@ const DEFAULT_VALUES = {
|
|
|
453
452
|
|
|
454
453
|
// ----------------------------------------------------------------------------
|
|
455
454
|
|
|
456
|
-
function extend(publicAPI, model) {
|
|
457
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
455
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
458
456
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
459
457
|
|
|
460
458
|
// Inheritance
|
|
@@ -20,17 +20,14 @@ const luminanceWeights = [0.213, 0.715, 0.072];
|
|
|
20
20
|
function createCSSFilter() {
|
|
21
21
|
return new Array(25);
|
|
22
22
|
}
|
|
23
|
-
function createIdentityFilter() {
|
|
24
|
-
let outFilter = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : createCSSFilter();
|
|
23
|
+
function createIdentityFilter(outFilter = createCSSFilter()) {
|
|
25
24
|
return identity(5, outFilter);
|
|
26
25
|
}
|
|
27
|
-
function combineFilters(baseFilter, newFilter) {
|
|
28
|
-
let outFilter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : createCSSFilter();
|
|
26
|
+
function combineFilters(baseFilter, newFilter, outFilter = createCSSFilter()) {
|
|
29
27
|
multiplyMatrix(newFilter, baseFilter, 5, 5, 5, 5, outFilter);
|
|
30
28
|
return outFilter;
|
|
31
29
|
}
|
|
32
|
-
function applyFilter(filter, r, g, b) {
|
|
33
|
-
let a = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
|
|
30
|
+
function applyFilter(filter, r, g, b, a = 1) {
|
|
34
31
|
const vec = [r, g, b, a, 1];
|
|
35
32
|
multiplyMatrix(filter, vec, 5, 5, 5, 1, vec);
|
|
36
33
|
// Clamp R, G, B, A
|
|
@@ -47,8 +44,7 @@ function applyFilter(filter, r, g, b) {
|
|
|
47
44
|
}
|
|
48
45
|
return output;
|
|
49
46
|
}
|
|
50
|
-
function createLinearFilter(slope, intercept) {
|
|
51
|
-
let outFilter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : createCSSFilter();
|
|
47
|
+
function createLinearFilter(slope, intercept, outFilter = createCSSFilter()) {
|
|
52
48
|
createIdentityFilter(outFilter);
|
|
53
49
|
for (let row = 0; row < 3; ++row) {
|
|
54
50
|
outFilter[row * 5 + row] = slope;
|
|
@@ -59,8 +55,7 @@ function createLinearFilter(slope, intercept) {
|
|
|
59
55
|
|
|
60
56
|
// https://www.w3.org/TR/filter-effects-1/#contrastEquivalent
|
|
61
57
|
// https://www.w3.org/TR/filter-effects-1/#attr-valuedef-type-linear
|
|
62
|
-
function createContrastFilter(contrast) {
|
|
63
|
-
let outFilter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : createCSSFilter();
|
|
58
|
+
function createContrastFilter(contrast, outFilter = createCSSFilter()) {
|
|
64
59
|
const slope = contrast;
|
|
65
60
|
const intercept = -(0.5 * contrast) + 0.5;
|
|
66
61
|
return createLinearFilter(slope, intercept, outFilter);
|
|
@@ -68,8 +63,7 @@ function createContrastFilter(contrast) {
|
|
|
68
63
|
|
|
69
64
|
// https://www.w3.org/TR/filter-effects-1/#saturateEquivalent
|
|
70
65
|
// https://www.w3.org/TR/filter-effects-1/#ref-for-attr-valuedef-type-saturate
|
|
71
|
-
function createSaturateFilter(saturate) {
|
|
72
|
-
let outFilter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : createCSSFilter();
|
|
66
|
+
function createSaturateFilter(saturate, outFilter = createCSSFilter()) {
|
|
73
67
|
createIdentityFilter(outFilter);
|
|
74
68
|
for (let col = 0; col < 3; ++col) {
|
|
75
69
|
const columnLuminance = luminanceWeights[col];
|
|
@@ -84,8 +78,7 @@ function createSaturateFilter(saturate) {
|
|
|
84
78
|
|
|
85
79
|
// https://www.w3.org/TR/filter-effects-1/#brightnessEquivalent
|
|
86
80
|
// https://www.w3.org/TR/filter-effects-1/#attr-valuedef-type-linear
|
|
87
|
-
function createBrightnessFilter(brightness) {
|
|
88
|
-
let outFilter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : createCSSFilter();
|
|
81
|
+
function createBrightnessFilter(brightness, outFilter = createCSSFilter()) {
|
|
89
82
|
const slope = brightness;
|
|
90
83
|
const intercept = 0;
|
|
91
84
|
return createLinearFilter(slope, intercept, outFilter);
|
|
@@ -93,8 +86,7 @@ function createBrightnessFilter(brightness) {
|
|
|
93
86
|
|
|
94
87
|
// https://www.w3.org/TR/filter-effects-1/#invertEquivalent
|
|
95
88
|
// https://www.w3.org/TR/filter-effects-1/#attr-valuedef-type-table
|
|
96
|
-
function createInvertFilter(invert) {
|
|
97
|
-
let outFilter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : createCSSFilter();
|
|
89
|
+
function createInvertFilter(invert, outFilter = createCSSFilter()) {
|
|
98
90
|
const slope = 1 - 2 * invert;
|
|
99
91
|
const intercept = invert;
|
|
100
92
|
return createLinearFilter(slope, intercept, outFilter);
|
|
@@ -142,9 +142,7 @@ function vtkColorTransferFunction(publicAPI, model) {
|
|
|
142
142
|
|
|
143
143
|
//----------------------------------------------------------------------------
|
|
144
144
|
// Add a point defined in RGB
|
|
145
|
-
publicAPI.addRGBPointLong =
|
|
146
|
-
let midpoint = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0.5;
|
|
147
|
-
let sharpness = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0.0;
|
|
145
|
+
publicAPI.addRGBPointLong = (x, r, g, b, midpoint = 0.5, sharpness = 0.0) => {
|
|
148
146
|
// Error check
|
|
149
147
|
if (midpoint < 0.0 || midpoint > 1.0) {
|
|
150
148
|
vtkErrorMacro('Midpoint outside range [0.0, 1.0]');
|
|
@@ -197,9 +195,7 @@ function vtkColorTransferFunction(publicAPI, model) {
|
|
|
197
195
|
|
|
198
196
|
//----------------------------------------------------------------------------
|
|
199
197
|
// Add a point defined in HSV
|
|
200
|
-
publicAPI.addHSVPointLong =
|
|
201
|
-
let midpoint = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0.5;
|
|
202
|
-
let sharpness = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0.0;
|
|
198
|
+
publicAPI.addHSVPointLong = (x, h, s, v, midpoint = 0.5, sharpness = 0.0) => {
|
|
203
199
|
const rgb = [];
|
|
204
200
|
const hsv = [h, s, v];
|
|
205
201
|
hsv2rgb(hsv, rgb);
|
|
@@ -758,8 +754,7 @@ function vtkColorTransferFunction(publicAPI, model) {
|
|
|
758
754
|
};
|
|
759
755
|
|
|
760
756
|
//----------------------------------------------------------------------------
|
|
761
|
-
publicAPI.getUint8Table =
|
|
762
|
-
let withAlpha = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
757
|
+
publicAPI.getUint8Table = (xStart, xEnd, size, withAlpha = false) => {
|
|
763
758
|
if (publicAPI.getMTime() <= model.buildTime && model.tableSize === size && model.tableWithAlpha !== withAlpha) {
|
|
764
759
|
return model.table;
|
|
765
760
|
}
|
|
@@ -1165,8 +1160,7 @@ const DEFAULT_VALUES = {
|
|
|
1165
1160
|
|
|
1166
1161
|
// ----------------------------------------------------------------------------
|
|
1167
1162
|
|
|
1168
|
-
function extend(publicAPI, model) {
|
|
1169
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1163
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
1170
1164
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
1171
1165
|
|
|
1172
1166
|
// Inheritance
|
|
@@ -16,14 +16,11 @@ const {
|
|
|
16
16
|
function vtkCoordinate(publicAPI, model) {
|
|
17
17
|
// Set our className
|
|
18
18
|
model.classHierarchy.push('vtkCoordinate');
|
|
19
|
-
publicAPI.setValue =
|
|
19
|
+
publicAPI.setValue = (...args) => {
|
|
20
20
|
if (model.deleted) {
|
|
21
21
|
vtkErrorMacro('instance deleted - cannot call any method');
|
|
22
22
|
return false;
|
|
23
23
|
}
|
|
24
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
25
|
-
args[_key] = arguments[_key];
|
|
26
|
-
}
|
|
27
24
|
let array = args;
|
|
28
25
|
// allow an array passed as a single arg.
|
|
29
26
|
if (array.length === 1 && Array.isArray(array[0])) {
|
|
@@ -394,8 +391,7 @@ const DEFAULT_VALUES = {
|
|
|
394
391
|
|
|
395
392
|
// ----------------------------------------------------------------------------
|
|
396
393
|
|
|
397
|
-
function extend(publicAPI, model) {
|
|
398
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
394
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
399
395
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
400
396
|
macro.obj(publicAPI, model);
|
|
401
397
|
|
|
@@ -253,10 +253,9 @@ function vtkCubeAxesActorHelper(publicAPI, model) {
|
|
|
253
253
|
publicAPI.updateTexturePolyData();
|
|
254
254
|
};
|
|
255
255
|
}
|
|
256
|
-
const newCubeAxesActorHelper = macro.newInstance(
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
};
|
|
256
|
+
const newCubeAxesActorHelper = macro.newInstance((publicAPI, model, initialValues = {
|
|
257
|
+
renderable: null
|
|
258
|
+
}) => {
|
|
260
259
|
Object.assign(model, {}, initialValues);
|
|
261
260
|
|
|
262
261
|
// Inheritance
|
|
@@ -713,8 +712,7 @@ function defaultValues(publicAPI, model, initialValues) {
|
|
|
713
712
|
|
|
714
713
|
// ----------------------------------------------------------------------------
|
|
715
714
|
|
|
716
|
-
function extend(publicAPI, model) {
|
|
717
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
715
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
718
716
|
// Inheritance
|
|
719
717
|
vtkActor.extend(publicAPI, model, defaultValues(publicAPI, model, initialValues));
|
|
720
718
|
|
|
@@ -91,8 +91,7 @@ const DEFAULT_VALUES = {
|
|
|
91
91
|
|
|
92
92
|
// ----------------------------------------------------------------------------
|
|
93
93
|
|
|
94
|
-
function extend(publicAPI, model) {
|
|
95
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
94
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
96
95
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
97
96
|
|
|
98
97
|
// Inheritance
|
|
@@ -266,8 +266,7 @@ const DEFAULT_VALUES = {
|
|
|
266
266
|
|
|
267
267
|
// ----------------------------------------------------------------------------
|
|
268
268
|
|
|
269
|
-
function extend(publicAPI, model) {
|
|
270
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
269
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
271
270
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
272
271
|
|
|
273
272
|
// Inheritance
|
|
@@ -37,8 +37,7 @@ const DEFAULT_VALUES = {
|
|
|
37
37
|
|
|
38
38
|
// ----------------------------------------------------------------------------
|
|
39
39
|
|
|
40
|
-
function extend(publicAPI, model) {
|
|
41
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
40
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
42
41
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
43
42
|
|
|
44
43
|
// Inheritance
|
|
@@ -64,13 +64,11 @@ function vtkImageArrayMapper(publicAPI, model) {
|
|
|
64
64
|
_superSetInputData(inputData);
|
|
65
65
|
_computeSliceToSubSliceMap();
|
|
66
66
|
};
|
|
67
|
-
publicAPI.setInputConnection =
|
|
68
|
-
let port = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
67
|
+
publicAPI.setInputConnection = (outputPort, port = 0) => {
|
|
69
68
|
_superSetInputConnection(outputPort, port);
|
|
70
69
|
_computeSliceToSubSliceMap();
|
|
71
70
|
};
|
|
72
|
-
publicAPI.getImage =
|
|
73
|
-
let slice = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : publicAPI.getSlice();
|
|
71
|
+
publicAPI.getImage = (slice = publicAPI.getSlice()) => {
|
|
74
72
|
const inputCollection = publicAPI.getInputData();
|
|
75
73
|
if (!inputCollection) {
|
|
76
74
|
vtkWarningMacro('No input set.');
|
|
@@ -98,9 +96,7 @@ function vtkImageArrayMapper(publicAPI, model) {
|
|
|
98
96
|
ex[5] = nSlice;
|
|
99
97
|
return image.extentToBounds(ex);
|
|
100
98
|
};
|
|
101
|
-
publicAPI.getBoundsForSlice =
|
|
102
|
-
let slice = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : publicAPI.getSlice();
|
|
103
|
-
let halfThickness = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
99
|
+
publicAPI.getBoundsForSlice = (slice = publicAPI.getSlice(), halfThickness = 0) => {
|
|
104
100
|
const image = publicAPI.getImage(slice);
|
|
105
101
|
if (!image) {
|
|
106
102
|
return createUninitializedBounds();
|
|
@@ -152,13 +148,11 @@ function vtkImageArrayMapper(publicAPI, model) {
|
|
|
152
148
|
_computeSliceToSubSliceMap();
|
|
153
149
|
return model.sliceToSubSliceMap.findIndex(x => x.imageIndex === imageIndex && x.subSlice === subSlice);
|
|
154
150
|
};
|
|
155
|
-
publicAPI.getImageIndex =
|
|
156
|
-
let slice = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : publicAPI.getSlice();
|
|
151
|
+
publicAPI.getImageIndex = (slice = publicAPI.getSlice()) => {
|
|
157
152
|
_computeSliceToSubSliceMap();
|
|
158
153
|
return model.sliceToSubSliceMap[slice]?.imageIndex;
|
|
159
154
|
};
|
|
160
|
-
publicAPI.getSubSlice =
|
|
161
|
-
let slice = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : publicAPI.getSlice();
|
|
155
|
+
publicAPI.getSubSlice = (slice = publicAPI.getSlice()) => {
|
|
162
156
|
_computeSliceToSubSliceMap();
|
|
163
157
|
return model.sliceToSubSliceMap[slice]?.subSlice;
|
|
164
158
|
};
|
|
@@ -172,8 +166,7 @@ const DEFAULT_VALUES = {
|
|
|
172
166
|
slicingMode: SlicingMode.K,
|
|
173
167
|
sliceToSubSliceMap: []
|
|
174
168
|
};
|
|
175
|
-
function extend(publicAPI, model) {
|
|
176
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
169
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
177
170
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
178
171
|
|
|
179
172
|
// Build VTK API
|
|
@@ -288,8 +288,7 @@ const defaultValues = initialValues => ({
|
|
|
288
288
|
|
|
289
289
|
// ----------------------------------------------------------------------------
|
|
290
290
|
|
|
291
|
-
function extend(publicAPI, model) {
|
|
292
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
291
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
293
292
|
Object.assign(model, defaultValues(initialValues));
|
|
294
293
|
|
|
295
294
|
// Inheritance
|
|
@@ -219,9 +219,7 @@ function vtkImageMapper(publicAPI, model) {
|
|
|
219
219
|
}
|
|
220
220
|
return image.extentToBounds(ex);
|
|
221
221
|
};
|
|
222
|
-
publicAPI.getBoundsForSlice =
|
|
223
|
-
let slice = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : model.slice;
|
|
224
|
-
let halfThickness = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
222
|
+
publicAPI.getBoundsForSlice = (slice = model.slice, halfThickness = 0) => {
|
|
225
223
|
const image = publicAPI.getCurrentImage();
|
|
226
224
|
if (!image) {
|
|
227
225
|
return createUninitializedBounds();
|
|
@@ -273,8 +271,7 @@ const DEFAULT_VALUES = {
|
|
|
273
271
|
|
|
274
272
|
// ----------------------------------------------------------------------------
|
|
275
273
|
|
|
276
|
-
function extend(publicAPI, model) {
|
|
277
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
274
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
278
275
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
279
276
|
|
|
280
277
|
// Build VTK API
|