@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,9 +66,7 @@ function vtkVolumeController(publicAPI, model) {
|
|
|
66
66
|
}
|
|
67
67
|
model.renderWindow.render();
|
|
68
68
|
}
|
|
69
|
-
publicAPI.setupContent =
|
|
70
|
-
let useShadow = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '1';
|
|
71
|
-
let presetName = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'erdc_rainbow_bright';
|
|
69
|
+
publicAPI.setupContent = (renderWindow, actor, isBackgroundDark, useShadow = '1', presetName = 'erdc_rainbow_bright') => {
|
|
72
70
|
publicAPI.setActor(actor);
|
|
73
71
|
publicAPI.setRenderWindow(renderWindow);
|
|
74
72
|
const sourceDS = model.actor.getMapper().getInputData();
|
|
@@ -238,8 +236,7 @@ const DEFAULT_VALUES = {
|
|
|
238
236
|
|
|
239
237
|
// ----------------------------------------------------------------------------
|
|
240
238
|
|
|
241
|
-
function extend(publicAPI, model) {
|
|
242
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
239
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
243
240
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
244
241
|
|
|
245
242
|
// Object methods
|
|
@@ -242,8 +242,7 @@ const DEFAULT_VALUES = {
|
|
|
242
242
|
|
|
243
243
|
// ----------------------------------------------------------------------------
|
|
244
244
|
|
|
245
|
-
function extend(publicAPI, model) {
|
|
246
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
245
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
247
246
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
248
247
|
|
|
249
248
|
// Build VTK API
|
|
@@ -24,31 +24,28 @@ const TOUCH_CLICK = [];
|
|
|
24
24
|
// ----------------------------------------------------------------------------
|
|
25
25
|
|
|
26
26
|
const ACTIONS = {
|
|
27
|
-
adjustPosition(x, y,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
} = _ref;
|
|
27
|
+
adjustPosition(x, y, {
|
|
28
|
+
originalXY,
|
|
29
|
+
gaussian,
|
|
30
|
+
originalGaussian
|
|
31
|
+
}) {
|
|
33
32
|
const xOffset = originalGaussian.position - originalXY[0];
|
|
34
33
|
gaussian.position = x + xOffset;
|
|
35
34
|
return true;
|
|
36
35
|
},
|
|
37
|
-
adjustHeight(x, y,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
} = _ref2;
|
|
36
|
+
adjustHeight(x, y, {
|
|
37
|
+
model,
|
|
38
|
+
gaussian
|
|
39
|
+
}) {
|
|
42
40
|
gaussian.height = 1 - y;
|
|
43
41
|
gaussian.height = Math.min(1, Math.max(model.gaussianMinimumHeight, gaussian.height));
|
|
44
42
|
return true;
|
|
45
43
|
},
|
|
46
|
-
adjustBias(x, y,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
} = _ref3;
|
|
44
|
+
adjustBias(x, y, {
|
|
45
|
+
originalXY,
|
|
46
|
+
gaussian,
|
|
47
|
+
originalGaussian
|
|
48
|
+
}) {
|
|
52
49
|
gaussian.xBias = originalGaussian.xBias - (originalXY[0] - x) / gaussian.height;
|
|
53
50
|
gaussian.yBias = originalGaussian.yBias + 4 * (originalXY[1] - y) / gaussian.height;
|
|
54
51
|
// Clamps
|
|
@@ -56,24 +53,22 @@ const ACTIONS = {
|
|
|
56
53
|
gaussian.yBias = Math.max(0, Math.min(2, gaussian.yBias));
|
|
57
54
|
return true;
|
|
58
55
|
},
|
|
59
|
-
adjustWidth(x, y,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
} = _ref4;
|
|
56
|
+
adjustWidth(x, y, {
|
|
57
|
+
originalXY,
|
|
58
|
+
gaussian,
|
|
59
|
+
originalGaussian,
|
|
60
|
+
gaussianSide
|
|
61
|
+
}) {
|
|
66
62
|
gaussian.width = gaussianSide < 0 ? originalGaussian.width - (originalXY[0] - x) : originalGaussian.width + (originalXY[0] - x);
|
|
67
63
|
if (gaussian.width < MIN_GAUSSIAN_WIDTH) {
|
|
68
64
|
gaussian.width = MIN_GAUSSIAN_WIDTH;
|
|
69
65
|
}
|
|
70
66
|
return true;
|
|
71
67
|
},
|
|
72
|
-
adjustZoom(x, y,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
} = _ref5;
|
|
68
|
+
adjustZoom(x, y, {
|
|
69
|
+
rangeZoom,
|
|
70
|
+
publicAPI
|
|
71
|
+
}) {
|
|
77
72
|
const delta = rangeZoom[1] - rangeZoom[0];
|
|
78
73
|
const absNormX = (x - rangeZoom[0]) / delta;
|
|
79
74
|
const minDelta = Math.abs(absNormX - rangeZoom[0]);
|
|
@@ -97,8 +92,7 @@ const ACTIONS = {
|
|
|
97
92
|
|
|
98
93
|
// ----------------------------------------------------------------------------
|
|
99
94
|
|
|
100
|
-
function computeOpacities(gaussians) {
|
|
101
|
-
let sampling = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 256;
|
|
95
|
+
function computeOpacities(gaussians, sampling = 256) {
|
|
102
96
|
const opacities = [];
|
|
103
97
|
while (opacities.length < sampling) {
|
|
104
98
|
opacities.push(0);
|
|
@@ -192,11 +186,10 @@ function applyGaussianToPiecewiseFunction(gaussians, sampling, rangeToUse, piece
|
|
|
192
186
|
|
|
193
187
|
// ----------------------------------------------------------------------------
|
|
194
188
|
|
|
195
|
-
function drawChart(ctx, area, values
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
};
|
|
189
|
+
function drawChart(ctx, area, values, style = {
|
|
190
|
+
lineWidth: 1,
|
|
191
|
+
strokeStyle: '#000'
|
|
192
|
+
}) {
|
|
200
193
|
const verticalScale = area[3];
|
|
201
194
|
const horizontalScale = area[2] / (values.length - 1);
|
|
202
195
|
const fill = !!style.fillStyle;
|
|
@@ -254,8 +247,7 @@ function updateColorCanvasFromImage(img, width, canvas) {
|
|
|
254
247
|
|
|
255
248
|
// ----------------------------------------------------------------------------
|
|
256
249
|
|
|
257
|
-
function normalizeCoordinates(x, y, subRectangeArea) {
|
|
258
|
-
let zoomRange = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [0, 1];
|
|
250
|
+
function normalizeCoordinates(x, y, subRectangeArea, zoomRange = [0, 1]) {
|
|
259
251
|
return [zoomRange[0] + (x - subRectangeArea[0]) / subRectangeArea[2] * (zoomRange[1] - zoomRange[0]), (y - subRectangeArea[1]) / subRectangeArea[3]];
|
|
260
252
|
}
|
|
261
253
|
|
|
@@ -269,8 +261,7 @@ function findGaussian(x, gaussians) {
|
|
|
269
261
|
|
|
270
262
|
// ----------------------------------------------------------------------------
|
|
271
263
|
|
|
272
|
-
function createListener(callback) {
|
|
273
|
-
let preventDefault = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
264
|
+
function createListener(callback, preventDefault = true) {
|
|
274
265
|
return e => {
|
|
275
266
|
const {
|
|
276
267
|
offsetX,
|
|
@@ -285,11 +276,8 @@ function createListener(callback) {
|
|
|
285
276
|
|
|
286
277
|
// ----------------------------------------------------------------------------
|
|
287
278
|
|
|
288
|
-
function createTouchClickListener() {
|
|
279
|
+
function createTouchClickListener(...callbacks) {
|
|
289
280
|
const id = TOUCH_CLICK.length;
|
|
290
|
-
for (var _len = arguments.length, callbacks = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
291
|
-
callbacks[_key] = arguments[_key];
|
|
292
|
-
}
|
|
293
281
|
TOUCH_CLICK.push({
|
|
294
282
|
callbacks,
|
|
295
283
|
timeout: 0,
|
|
@@ -320,9 +308,7 @@ function processTouchClicks() {
|
|
|
320
308
|
|
|
321
309
|
// ----------------------------------------------------------------------------
|
|
322
310
|
|
|
323
|
-
function createTouchListener(id, callback) {
|
|
324
|
-
let nbTouches = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
|
325
|
-
let preventDefault = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
|
311
|
+
function createTouchListener(id, callback, nbTouches = 1, preventDefault = true) {
|
|
326
312
|
return e => {
|
|
327
313
|
const targetBounds = e.target.getBoundingClientRect();
|
|
328
314
|
const relativeTouches = Array.prototype.map.call(e.touches, t => [t.pageX - targetBounds.left, t.pageY - targetBounds.top]);
|
|
@@ -470,13 +456,12 @@ function vtkPiecewiseGaussianWidget(publicAPI, model) {
|
|
|
470
456
|
// information to choose which component you want to extract the histogram
|
|
471
457
|
// from.
|
|
472
458
|
|
|
473
|
-
publicAPI.setDataArray =
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
} = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
459
|
+
publicAPI.setDataArray = (array, {
|
|
460
|
+
numberOfBinToConsiders = 1,
|
|
461
|
+
numberOfBinsToSkip = 1,
|
|
462
|
+
numberOfComponents = 1,
|
|
463
|
+
component = 0
|
|
464
|
+
} = {}) => {
|
|
480
465
|
model.histogram = null;
|
|
481
466
|
model.histogramArray = array;
|
|
482
467
|
model.dataRange = arrayRange(array, component, numberOfComponents);
|
|
@@ -750,7 +735,6 @@ function vtkPiecewiseGaussianWidget(publicAPI, model) {
|
|
|
750
735
|
touchmove: listenerSelector(isDown, createTouchListener(touchId, publicAPI.onDrag), createTouchListener(touchId, publicAPI.onHover)),
|
|
751
736
|
touchend: createTouchListener(touchId, publicAPI.onUp, 0) // touchend have 0 touch event...
|
|
752
737
|
};
|
|
753
|
-
|
|
754
738
|
Object.keys(model.listeners).forEach(eventType => {
|
|
755
739
|
model.canvas.addEventListener(eventType, model.listeners[eventType], false);
|
|
756
740
|
});
|
|
@@ -968,8 +952,8 @@ function vtkPiecewiseGaussianWidget(publicAPI, model) {
|
|
|
968
952
|
return change;
|
|
969
953
|
};
|
|
970
954
|
const rangeZoom = publicAPI.setRangeZoom;
|
|
971
|
-
publicAPI.setRangeZoom =
|
|
972
|
-
const change = rangeZoom(...
|
|
955
|
+
publicAPI.setRangeZoom = (...v) => {
|
|
956
|
+
const change = rangeZoom(...v);
|
|
973
957
|
if (change) {
|
|
974
958
|
model.colorCanvasMTime = 0;
|
|
975
959
|
}
|
|
@@ -1023,8 +1007,7 @@ const DEFAULT_VALUES = {
|
|
|
1023
1007
|
|
|
1024
1008
|
// ----------------------------------------------------------------------------
|
|
1025
1009
|
|
|
1026
|
-
function extend(publicAPI, model) {
|
|
1027
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1010
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
1028
1011
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
1029
1012
|
|
|
1030
1013
|
// Object methods
|
|
@@ -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
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
27
26
|
macro.obj(publicAPI, model);
|
|
28
27
|
|
|
@@ -83,8 +83,7 @@ const DEFAULT_VALUES = {
|
|
|
83
83
|
|
|
84
84
|
// ----------------------------------------------------------------------------
|
|
85
85
|
|
|
86
|
-
function extend(publicAPI, model) {
|
|
87
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
86
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
88
87
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
89
88
|
macro.obj(publicAPI, model);
|
|
90
89
|
macro.get(publicAPI, model, ['frames', 'currentFrameIndex']);
|
|
@@ -33,8 +33,7 @@ const DEFAULT_VALUES = {
|
|
|
33
33
|
|
|
34
34
|
// ----------------------------------------------------------------------------
|
|
35
35
|
|
|
36
|
-
function extend(publicAPI, model) {
|
|
37
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
36
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
38
37
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
39
38
|
macro.obj(publicAPI, model);
|
|
40
39
|
macro.setGet(publicAPI, model, ['handler']);
|
|
@@ -77,8 +77,7 @@ function vtkAbstractRepresentationProxy(publicAPI, model) {
|
|
|
77
77
|
|
|
78
78
|
// In place edits, no need to re-assign it...
|
|
79
79
|
publicAPI.setPiecewiseFunctionProxy = () => {};
|
|
80
|
-
publicAPI.rescaleTransferFunctionToDataRange =
|
|
81
|
-
let c = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : -1;
|
|
80
|
+
publicAPI.rescaleTransferFunctionToDataRange = (n, l, c = -1) => {
|
|
82
81
|
const array = publicAPI.getDataArray(n, l);
|
|
83
82
|
const dataRange = array.getRange(c);
|
|
84
83
|
model.proxyManager.rescaleTransferFunctionToDataRange(n, dataRange);
|
|
@@ -106,8 +105,7 @@ function vtkAbstractRepresentationProxy(publicAPI, model) {
|
|
|
106
105
|
publicAPI.modified();
|
|
107
106
|
}
|
|
108
107
|
};
|
|
109
|
-
publicAPI.setColorBy =
|
|
110
|
-
let componentIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : -1;
|
|
108
|
+
publicAPI.setColorBy = (arrayName, arrayLocation, componentIndex = -1) => {
|
|
111
109
|
let colorMode = vtkMapper.ColorMode.DEFAULT;
|
|
112
110
|
let scalarMode = vtkMapper.ScalarMode.DEFAULT;
|
|
113
111
|
const colorByArrayName = arrayName;
|
|
@@ -261,8 +259,7 @@ const DEFAULT_VALUES = {
|
|
|
261
259
|
|
|
262
260
|
// ----------------------------------------------------------------------------
|
|
263
261
|
|
|
264
|
-
function extend(publicAPI, model) {
|
|
265
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
262
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
266
263
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
267
264
|
vtkProp.extend(publicAPI, model, initialValues);
|
|
268
265
|
setGet(publicAPI, model, ['rescaleOnColorBy']);
|
|
@@ -81,7 +81,6 @@ function vtkLookupTableProxy(publicAPI, model) {
|
|
|
81
81
|
break;
|
|
82
82
|
// noop
|
|
83
83
|
}
|
|
84
|
-
|
|
85
84
|
model.lookupTable.setMappingRange(model.dataRange[0], model.dataRange[1]);
|
|
86
85
|
model.lookupTable.updateRange();
|
|
87
86
|
publicAPI.modified();
|
|
@@ -118,8 +117,7 @@ const DEFAULT_VALUES = {
|
|
|
118
117
|
|
|
119
118
|
// ----------------------------------------------------------------------------
|
|
120
119
|
|
|
121
|
-
function extend(publicAPI, model) {
|
|
122
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
120
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
123
121
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
124
122
|
macro.obj(publicAPI, model);
|
|
125
123
|
macro.setGet(publicAPI, model, ['arrayName']);
|
|
@@ -12,15 +12,9 @@ const {
|
|
|
12
12
|
|
|
13
13
|
function applyPointsToPiecewiseFunction(points, range, pwf) {
|
|
14
14
|
const width = range[1] - range[0];
|
|
15
|
-
const rescaled = points.map(
|
|
16
|
-
let [x, y] = _ref;
|
|
17
|
-
return [x * width + range[0], y];
|
|
18
|
-
});
|
|
15
|
+
const rescaled = points.map(([x, y]) => [x * width + range[0], y]);
|
|
19
16
|
pwf.removeAllPoints();
|
|
20
|
-
rescaled.forEach(
|
|
21
|
-
let [x, y] = _ref2;
|
|
22
|
-
return pwf.addPoint(x, y);
|
|
23
|
-
});
|
|
17
|
+
rescaled.forEach(([x, y]) => pwf.addPoint(x, y));
|
|
24
18
|
}
|
|
25
19
|
|
|
26
20
|
// ----------------------------------------------------------------------------
|
|
@@ -102,7 +96,6 @@ function vtkPiecewiseFunctionProxy(publicAPI, model) {
|
|
|
102
96
|
// noop
|
|
103
97
|
}
|
|
104
98
|
};
|
|
105
|
-
|
|
106
99
|
publicAPI.getLookupTableProxy = () => model.proxyManager.getLookupTable(model.arrayName);
|
|
107
100
|
publicAPI.setDataRange = (min, max) => {
|
|
108
101
|
if (model.dataRange[0] !== min || model.dataRange[1] !== max) {
|
|
@@ -133,8 +126,7 @@ const DEFAULT_VALUES = {
|
|
|
133
126
|
|
|
134
127
|
// ----------------------------------------------------------------------------
|
|
135
128
|
|
|
136
|
-
function extend(publicAPI, model) {
|
|
137
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
129
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
138
130
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
139
131
|
macro.obj(publicAPI, model);
|
|
140
132
|
macro.setGet(publicAPI, model, ['arrayName']);
|