@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
package/IO/Geometry/STLReader.js
CHANGED
|
@@ -50,7 +50,6 @@ function readTriangle(lines, offset, points, cellArray, cellNormals) {
|
|
|
50
50
|
if (normalLine.indexOf('facet') === -1) {
|
|
51
51
|
return offset + 1; // Move to next line
|
|
52
52
|
}
|
|
53
|
-
|
|
54
53
|
let nbVertex = 0;
|
|
55
54
|
let nbConsumedLines = 2;
|
|
56
55
|
const firstVertexIndex = points.length / 3;
|
|
@@ -88,8 +87,7 @@ function vtkSTLReader(publicAPI, model) {
|
|
|
88
87
|
}
|
|
89
88
|
|
|
90
89
|
// Internal method to fetch Array
|
|
91
|
-
function fetchData(url) {
|
|
92
|
-
let option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
90
|
+
function fetchData(url, option = {}) {
|
|
93
91
|
const compression = option.compression !== undefined ? option.compression : model.compression;
|
|
94
92
|
const progressCallback = option.progressCallback !== undefined ? option.progressCallback : model.progressCallback;
|
|
95
93
|
if (option.binary) {
|
|
@@ -154,10 +152,9 @@ function vtkSTLReader(publicAPI, model) {
|
|
|
154
152
|
}
|
|
155
153
|
|
|
156
154
|
// Set DataSet url
|
|
157
|
-
publicAPI.setUrl =
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
};
|
|
155
|
+
publicAPI.setUrl = (url, option = {
|
|
156
|
+
binary: true
|
|
157
|
+
}) => {
|
|
161
158
|
model.url = url;
|
|
162
159
|
|
|
163
160
|
// Remove the file in the URL
|
|
@@ -170,8 +167,7 @@ function vtkSTLReader(publicAPI, model) {
|
|
|
170
167
|
};
|
|
171
168
|
|
|
172
169
|
// Fetch the actual data arrays
|
|
173
|
-
publicAPI.loadData =
|
|
174
|
-
let option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
170
|
+
publicAPI.loadData = (option = {}) => {
|
|
175
171
|
const promise = fetchData(model.url, option);
|
|
176
172
|
promise.then(publicAPI.parse);
|
|
177
173
|
return promise;
|
|
@@ -355,8 +351,7 @@ const DEFAULT_VALUES = {
|
|
|
355
351
|
|
|
356
352
|
// ----------------------------------------------------------------------------
|
|
357
353
|
|
|
358
|
-
function extend(publicAPI, model) {
|
|
359
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
354
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
360
355
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
361
356
|
|
|
362
357
|
// Build VTK API
|
package/IO/Geometry/STLWriter.js
CHANGED
|
@@ -49,7 +49,6 @@ const binaryWriter = () => {
|
|
|
49
49
|
offset = writeVectorBinary(dataView, offset, v3);
|
|
50
50
|
offset += 2; // unused 'attribute byte count' is a Uint16
|
|
51
51
|
},
|
|
52
|
-
|
|
53
52
|
writeFooter: polyData => {},
|
|
54
53
|
getOutputData: () => dataView
|
|
55
54
|
};
|
|
@@ -76,9 +75,7 @@ const asciiWriter = () => {
|
|
|
76
75
|
getOutputData: () => file
|
|
77
76
|
};
|
|
78
77
|
};
|
|
79
|
-
function writeSTL(polyData) {
|
|
80
|
-
let format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : FormatTypes.BINARY;
|
|
81
|
-
let transform = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
78
|
+
function writeSTL(polyData, format = FormatTypes.BINARY, transform = null) {
|
|
82
79
|
let writer = null;
|
|
83
80
|
if (format === FormatTypes.BINARY) {
|
|
84
81
|
writer = binaryWriter();
|
|
@@ -158,8 +155,7 @@ const DEFAULT_VALUES = {
|
|
|
158
155
|
|
|
159
156
|
// ----------------------------------------------------------------------------
|
|
160
157
|
|
|
161
|
-
function extend(publicAPI, model) {
|
|
162
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
158
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
163
159
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
164
160
|
|
|
165
161
|
// Make this a VTK object
|
|
@@ -25,8 +25,7 @@ function readLine(uint8array, startIndex) {
|
|
|
25
25
|
* @param {Array} floats The output array
|
|
26
26
|
* @param {number} exposure The exposure value
|
|
27
27
|
*/
|
|
28
|
-
function rgbe2float(rgbe, exposure) {
|
|
29
|
-
let floats = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
28
|
+
function rgbe2float(rgbe, exposure, floats = []) {
|
|
30
29
|
if (rgbe[3] > 0) {
|
|
31
30
|
/* nonzero pixel */
|
|
32
31
|
const f = ldexp(1.0, rgbe[3] - (128 + 8)) / exposure;
|
package/IO/Image/HDRReader.js
CHANGED
|
@@ -71,7 +71,6 @@ function vtkHDRReader(publicAPI, model) {
|
|
|
71
71
|
// eslint-disable-next-line no-continue
|
|
72
72
|
continue; // comment line
|
|
73
73
|
}
|
|
74
|
-
|
|
75
74
|
match = line.match(Patterns.gamma);
|
|
76
75
|
if (match) {
|
|
77
76
|
header.gamma = parseFloat(match[1]);
|
|
@@ -248,7 +247,7 @@ function vtkHDRReader(publicAPI, model) {
|
|
|
248
247
|
}
|
|
249
248
|
|
|
250
249
|
// Internal method to fetch Array
|
|
251
|
-
function fetchData(url) {
|
|
250
|
+
function fetchData(url, option = {}) {
|
|
252
251
|
const {
|
|
253
252
|
compression,
|
|
254
253
|
progressCallback
|
|
@@ -260,10 +259,9 @@ function vtkHDRReader(publicAPI, model) {
|
|
|
260
259
|
}
|
|
261
260
|
|
|
262
261
|
// Set DataSet url
|
|
263
|
-
publicAPI.setUrl =
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
};
|
|
262
|
+
publicAPI.setUrl = (url, option = {
|
|
263
|
+
binary: true
|
|
264
|
+
}) => {
|
|
267
265
|
model.url = url;
|
|
268
266
|
|
|
269
267
|
// Remove the file in the URL
|
|
@@ -279,8 +277,8 @@ function vtkHDRReader(publicAPI, model) {
|
|
|
279
277
|
};
|
|
280
278
|
|
|
281
279
|
// Fetch the actual data arrays
|
|
282
|
-
publicAPI.loadData =
|
|
283
|
-
const promise = fetchData(model.url);
|
|
280
|
+
publicAPI.loadData = (option = {}) => {
|
|
281
|
+
const promise = fetchData(model.url, option);
|
|
284
282
|
promise.then(publicAPI.parse);
|
|
285
283
|
return promise;
|
|
286
284
|
};
|
|
@@ -335,8 +333,7 @@ const DEFAULT_VALUES = {
|
|
|
335
333
|
|
|
336
334
|
// ----------------------------------------------------------------------------
|
|
337
335
|
|
|
338
|
-
function extend(publicAPI, model) {
|
|
339
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
336
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
340
337
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
341
338
|
|
|
342
339
|
// Make this a VTK object
|
package/IO/Image/TGAReader.js
CHANGED
|
@@ -167,7 +167,7 @@ function vtkTGAReader(publicAPI, model) {
|
|
|
167
167
|
};
|
|
168
168
|
|
|
169
169
|
// Internal method to fetch Array
|
|
170
|
-
function fetchData(url) {
|
|
170
|
+
function fetchData(url, option = {}) {
|
|
171
171
|
const {
|
|
172
172
|
compression,
|
|
173
173
|
progressCallback
|
|
@@ -179,10 +179,9 @@ function vtkTGAReader(publicAPI, model) {
|
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
// Set DataSet url
|
|
182
|
-
publicAPI.setUrl =
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
};
|
|
182
|
+
publicAPI.setUrl = (url, option = {
|
|
183
|
+
binary: true
|
|
184
|
+
}) => {
|
|
186
185
|
model.url = url;
|
|
187
186
|
|
|
188
187
|
// Remove the file in the URL
|
|
@@ -198,8 +197,8 @@ function vtkTGAReader(publicAPI, model) {
|
|
|
198
197
|
};
|
|
199
198
|
|
|
200
199
|
// Fetch the actual data arrays
|
|
201
|
-
publicAPI.loadData =
|
|
202
|
-
const promise = fetchData(model.url);
|
|
200
|
+
publicAPI.loadData = (option = {}) => {
|
|
201
|
+
const promise = fetchData(model.url, option);
|
|
203
202
|
promise.then(publicAPI.parse);
|
|
204
203
|
return promise;
|
|
205
204
|
};
|
|
@@ -380,8 +379,7 @@ const DEFAULT_VALUES = {};
|
|
|
380
379
|
|
|
381
380
|
// ----------------------------------------------------------------------------
|
|
382
381
|
|
|
383
|
-
function extend(publicAPI, model) {
|
|
384
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
382
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
385
383
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
386
384
|
|
|
387
385
|
// Make this a VTK object
|
package/IO/Image/TIFFReader.js
CHANGED
|
@@ -19,7 +19,7 @@ function vtkTIFFReader(publicAPI, model) {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
// Internal method to fetch Array
|
|
22
|
-
function fetchData(url) {
|
|
22
|
+
function fetchData(url, option = {}) {
|
|
23
23
|
const {
|
|
24
24
|
compression,
|
|
25
25
|
progressCallback
|
|
@@ -31,10 +31,9 @@ function vtkTIFFReader(publicAPI, model) {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
// Set DataSet url
|
|
34
|
-
publicAPI.setUrl =
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
};
|
|
34
|
+
publicAPI.setUrl = (url, option = {
|
|
35
|
+
binary: true
|
|
36
|
+
}) => {
|
|
38
37
|
model.url = url;
|
|
39
38
|
|
|
40
39
|
// Remove the file in the URL
|
|
@@ -50,8 +49,8 @@ function vtkTIFFReader(publicAPI, model) {
|
|
|
50
49
|
};
|
|
51
50
|
|
|
52
51
|
// Fetch the actual data arrays
|
|
53
|
-
publicAPI.loadData =
|
|
54
|
-
const promise = fetchData(model.url);
|
|
52
|
+
publicAPI.loadData = (option = {}) => {
|
|
53
|
+
const promise = fetchData(model.url, option);
|
|
55
54
|
promise.then(publicAPI.parse);
|
|
56
55
|
return promise;
|
|
57
56
|
};
|
|
@@ -82,7 +81,6 @@ function vtkTIFFReader(publicAPI, model) {
|
|
|
82
81
|
}
|
|
83
82
|
}
|
|
84
83
|
}
|
|
85
|
-
|
|
86
84
|
const dataExtent = [0, width - 1, 0, height - 1];
|
|
87
85
|
const dataSpacing = [1, 1, 1];
|
|
88
86
|
const imageData = vtkImageData.newInstance();
|
|
@@ -114,8 +112,7 @@ const DEFAULT_VALUES = {
|
|
|
114
112
|
|
|
115
113
|
// ----------------------------------------------------------------------------
|
|
116
114
|
|
|
117
|
-
function extend(publicAPI, model) {
|
|
118
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
115
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
119
116
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
120
117
|
|
|
121
118
|
// Make this a VTK object
|
|
@@ -240,8 +240,7 @@ function getParser(line, dataModel) {
|
|
|
240
240
|
const tokens = line.split(' ');
|
|
241
241
|
return TYPE_PARSER[tokens[0]];
|
|
242
242
|
}
|
|
243
|
-
function parseLegacyASCII(content) {
|
|
244
|
-
let dataModel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
243
|
+
function parseLegacyASCII(content, dataModel = {}) {
|
|
245
244
|
let parser = null;
|
|
246
245
|
const separatorRegExp = /\r?\n/;
|
|
247
246
|
const separatorRes = separatorRegExp.exec(content);
|
|
@@ -21,7 +21,7 @@ function vtkPolyDataReader(publicAPI, model) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
// Internal method to fetch Array
|
|
24
|
-
function fetchData(url) {
|
|
24
|
+
function fetchData(url, option = {}) {
|
|
25
25
|
const {
|
|
26
26
|
compression,
|
|
27
27
|
progressCallback
|
|
@@ -33,8 +33,7 @@ function vtkPolyDataReader(publicAPI, model) {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
// Set DataSet url
|
|
36
|
-
publicAPI.setUrl =
|
|
37
|
-
let option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
36
|
+
publicAPI.setUrl = (url, option = {}) => {
|
|
38
37
|
model.url = url;
|
|
39
38
|
|
|
40
39
|
// Remove the file in the URL
|
|
@@ -50,8 +49,8 @@ function vtkPolyDataReader(publicAPI, model) {
|
|
|
50
49
|
};
|
|
51
50
|
|
|
52
51
|
// Fetch the actual data arrays
|
|
53
|
-
publicAPI.loadData =
|
|
54
|
-
const promise = fetchData(model.url);
|
|
52
|
+
publicAPI.loadData = (option = {}) => {
|
|
53
|
+
const promise = fetchData(model.url, option);
|
|
55
54
|
promise.then(publicAPI.parseAsText);
|
|
56
55
|
return promise;
|
|
57
56
|
};
|
|
@@ -84,8 +83,7 @@ const DEFAULT_VALUES = {
|
|
|
84
83
|
|
|
85
84
|
// ----------------------------------------------------------------------------
|
|
86
85
|
|
|
87
|
-
function extend(publicAPI, model) {
|
|
88
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
86
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
89
87
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
90
88
|
|
|
91
89
|
// Build VTK API
|
|
@@ -127,8 +127,7 @@ const DEFAULT_VALUES = {
|
|
|
127
127
|
|
|
128
128
|
// ----------------------------------------------------------------------------
|
|
129
129
|
|
|
130
|
-
function extend(publicAPI, model) {
|
|
131
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
130
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
132
131
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
133
132
|
|
|
134
133
|
// Build VTK API
|
package/IO/Misc/GCodeReader.js
CHANGED
|
@@ -34,13 +34,11 @@ function vtkGCodeReader(publicAPI, model) {
|
|
|
34
34
|
// G21 is default
|
|
35
35
|
lastZ: 0 // Track Z changes for layer detection
|
|
36
36
|
};
|
|
37
|
-
|
|
38
37
|
model.classHierarchy.push('vtkGCodeReader');
|
|
39
38
|
if (!model.dataAccessHelper) {
|
|
40
39
|
model.dataAccessHelper = DataAccessHelper.get('http');
|
|
41
40
|
}
|
|
42
|
-
function fetchData(url) {
|
|
43
|
-
let option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
41
|
+
function fetchData(url, option = {}) {
|
|
44
42
|
const {
|
|
45
43
|
compression,
|
|
46
44
|
progressCallback
|
|
@@ -168,10 +166,9 @@ function vtkGCodeReader(publicAPI, model) {
|
|
|
168
166
|
}
|
|
169
167
|
|
|
170
168
|
// Public methods
|
|
171
|
-
publicAPI.setUrl =
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
};
|
|
169
|
+
publicAPI.setUrl = (url, option = {
|
|
170
|
+
binary: true
|
|
171
|
+
}) => {
|
|
175
172
|
model.url = url;
|
|
176
173
|
const path = url.split('/');
|
|
177
174
|
path.pop();
|
|
@@ -182,8 +179,7 @@ function vtkGCodeReader(publicAPI, model) {
|
|
|
182
179
|
binary: !!option.binary
|
|
183
180
|
});
|
|
184
181
|
};
|
|
185
|
-
publicAPI.loadData =
|
|
186
|
-
let option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
182
|
+
publicAPI.loadData = (option = {}) => {
|
|
187
183
|
const promise = fetchData(model.url, option);
|
|
188
184
|
promise.then(publicAPI.parse);
|
|
189
185
|
return promise;
|
|
@@ -215,8 +211,7 @@ const DEFAULT_VALUES = {
|
|
|
215
211
|
// dataAccessHelper: null,
|
|
216
212
|
// url: null,
|
|
217
213
|
};
|
|
218
|
-
function extend(publicAPI, model) {
|
|
219
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
214
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
220
215
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
221
216
|
|
|
222
217
|
// Build VTK API
|
|
@@ -99,8 +99,7 @@ const DEFAULT_VALUES = {
|
|
|
99
99
|
|
|
100
100
|
// ----------------------------------------------------------------------------
|
|
101
101
|
|
|
102
|
-
function extend(publicAPI, model) {
|
|
103
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
102
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
104
103
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
105
104
|
macro.obj(publicAPI, model);
|
|
106
105
|
|
|
@@ -18,20 +18,14 @@ function setReadImageArrayBufferFromITK(fn) {
|
|
|
18
18
|
// by an updated function signature.
|
|
19
19
|
if (readImageArrayBuffer.length === 4) {
|
|
20
20
|
// first arg is a webworker if reuse is desired.
|
|
21
|
-
readImageArrayBuffer =
|
|
22
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23
|
-
args[_key] = arguments[_key];
|
|
24
|
-
}
|
|
25
|
-
return fn(null, ...args);
|
|
26
|
-
};
|
|
21
|
+
readImageArrayBuffer = (...args) => fn(null, ...args);
|
|
27
22
|
|
|
28
23
|
// an object is now passed out which includes a webworker which we
|
|
29
24
|
// should terminate
|
|
30
|
-
resultPreprocessor =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
} = _ref;
|
|
25
|
+
resultPreprocessor = ({
|
|
26
|
+
webWorker,
|
|
27
|
+
image
|
|
28
|
+
}) => {
|
|
35
29
|
webWorker.terminate();
|
|
36
30
|
return image;
|
|
37
31
|
};
|
|
@@ -77,8 +71,7 @@ const DEFAULT_VALUES = {
|
|
|
77
71
|
|
|
78
72
|
// ----------------------------------------------------------------------------
|
|
79
73
|
|
|
80
|
-
function extend(publicAPI, model) {
|
|
81
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
74
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
82
75
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
83
76
|
|
|
84
77
|
// Build VTK API
|
|
@@ -7,20 +7,14 @@ function setReadPolyDataArrayBufferFromITK(fn) {
|
|
|
7
7
|
readPolyDataArrayBuffer = fn;
|
|
8
8
|
|
|
9
9
|
// first arg is a webworker if reuse is desired.
|
|
10
|
-
readPolyDataArrayBuffer =
|
|
11
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
12
|
-
args[_key] = arguments[_key];
|
|
13
|
-
}
|
|
14
|
-
return fn(null, ...args);
|
|
15
|
-
};
|
|
10
|
+
readPolyDataArrayBuffer = (...args) => fn(null, ...args);
|
|
16
11
|
|
|
17
12
|
// an object is now passed out which includes a webworker which we
|
|
18
13
|
// should terminate
|
|
19
|
-
resultPreprocessor =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
} = _ref;
|
|
14
|
+
resultPreprocessor = ({
|
|
15
|
+
webWorker,
|
|
16
|
+
polyData
|
|
17
|
+
}) => {
|
|
24
18
|
webWorker.terminate();
|
|
25
19
|
return polyData;
|
|
26
20
|
};
|
|
@@ -62,8 +56,7 @@ const DEFAULT_VALUES = {
|
|
|
62
56
|
|
|
63
57
|
// ----------------------------------------------------------------------------
|
|
64
58
|
|
|
65
|
-
function extend(publicAPI, model) {
|
|
66
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
59
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
67
60
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
68
61
|
|
|
69
62
|
// Build VTK API
|
|
@@ -77,8 +77,7 @@ const DEFAULT_VALUES = {
|
|
|
77
77
|
|
|
78
78
|
// ----------------------------------------------------------------------------
|
|
79
79
|
|
|
80
|
-
function extend(publicAPI, model) {
|
|
81
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
80
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
82
81
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
83
82
|
|
|
84
83
|
// Build VTK API
|
package/IO/Misc/JSONReader.js
CHANGED
|
@@ -9,14 +9,12 @@ function vtkJSONReader(publicAPI, model) {
|
|
|
9
9
|
model.classHierarchy.push('vtkJSONReader');
|
|
10
10
|
|
|
11
11
|
// Internal method to fetch Array
|
|
12
|
-
function fetchData(url) {
|
|
13
|
-
let option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
12
|
+
function fetchData(url, option = {}) {
|
|
14
13
|
return model.dataAccessHelper.fetchText(publicAPI, url, option);
|
|
15
14
|
}
|
|
16
15
|
|
|
17
16
|
// Set DataSet url
|
|
18
|
-
publicAPI.setUrl =
|
|
19
|
-
let option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
17
|
+
publicAPI.setUrl = (url, option = {}) => {
|
|
20
18
|
model.url = url;
|
|
21
19
|
|
|
22
20
|
// Fetch metadata
|
|
@@ -24,10 +22,7 @@ function vtkJSONReader(publicAPI, model) {
|
|
|
24
22
|
};
|
|
25
23
|
|
|
26
24
|
// Fetch the actual data arrays
|
|
27
|
-
publicAPI.loadData =
|
|
28
|
-
let option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
29
|
-
return fetchData(model.url, option).then(publicAPI.parseAsText);
|
|
30
|
-
};
|
|
25
|
+
publicAPI.loadData = (option = {}) => fetchData(model.url, option).then(publicAPI.parseAsText);
|
|
31
26
|
publicAPI.parseAsText = content => {
|
|
32
27
|
if (!content) {
|
|
33
28
|
return false;
|
|
@@ -55,8 +50,7 @@ const DEFAULT_VALUES = {
|
|
|
55
50
|
|
|
56
51
|
// ----------------------------------------------------------------------------
|
|
57
52
|
|
|
58
|
-
function extend(publicAPI, model) {
|
|
59
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
53
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
60
54
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
61
55
|
|
|
62
56
|
// Build VTK API
|
package/IO/Misc/MTLReader.js
CHANGED
|
@@ -57,8 +57,7 @@ function vtkMTLReader(publicAPI, model) {
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
// Set DataSet url
|
|
60
|
-
publicAPI.setUrl =
|
|
61
|
-
let option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
60
|
+
publicAPI.setUrl = (url, option = {}) => {
|
|
62
61
|
if (url.indexOf('.mtl') === -1 && !option.fullpath) {
|
|
63
62
|
model.baseURL = url;
|
|
64
63
|
model.url = `${url}/index.mtl`;
|
|
@@ -148,8 +147,7 @@ const DEFAULT_VALUES = {
|
|
|
148
147
|
|
|
149
148
|
// ----------------------------------------------------------------------------
|
|
150
149
|
|
|
151
|
-
function extend(publicAPI, model) {
|
|
152
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
150
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
153
151
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
154
152
|
|
|
155
153
|
// Build VTK API
|
package/IO/Misc/OBJReader.js
CHANGED
|
@@ -273,14 +273,12 @@ function vtkOBJReader(publicAPI, model) {
|
|
|
273
273
|
}
|
|
274
274
|
|
|
275
275
|
// Internal method to fetch Array
|
|
276
|
-
function fetchData(url) {
|
|
277
|
-
let option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
276
|
+
function fetchData(url, option = {}) {
|
|
278
277
|
return model.dataAccessHelper.fetchText(publicAPI, url, option);
|
|
279
278
|
}
|
|
280
279
|
|
|
281
280
|
// Set DataSet url
|
|
282
|
-
publicAPI.setUrl =
|
|
283
|
-
let option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
281
|
+
publicAPI.setUrl = (url, option = {}) => {
|
|
284
282
|
if (url.indexOf('.obj') === -1 && !option.fullpath) {
|
|
285
283
|
model.baseURL = url;
|
|
286
284
|
model.url = `${url}/index.obj`;
|
|
@@ -298,10 +296,7 @@ function vtkOBJReader(publicAPI, model) {
|
|
|
298
296
|
};
|
|
299
297
|
|
|
300
298
|
// Fetch the actual data arrays
|
|
301
|
-
publicAPI.loadData =
|
|
302
|
-
let option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
303
|
-
return fetchData(model.url, option).then(content => publicAPI.isDeleted() ? false : publicAPI.parseAsText(content));
|
|
304
|
-
};
|
|
299
|
+
publicAPI.loadData = (option = {}) => fetchData(model.url, option).then(content => publicAPI.isDeleted() ? false : publicAPI.parseAsText(content));
|
|
305
300
|
publicAPI.parseAsText = content => {
|
|
306
301
|
if (!content) {
|
|
307
302
|
return true;
|
|
@@ -341,8 +336,7 @@ const DEFAULT_VALUES = {
|
|
|
341
336
|
|
|
342
337
|
// ----------------------------------------------------------------------------
|
|
343
338
|
|
|
344
|
-
function extend(publicAPI, model) {
|
|
345
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
339
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
346
340
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
347
341
|
|
|
348
342
|
// Build VTK API
|
package/IO/Misc/OBJWriter.js
CHANGED
|
@@ -206,8 +206,7 @@ const DEFAULT_VALUES = {
|
|
|
206
206
|
|
|
207
207
|
// ----------------------------------------------------------------------------
|
|
208
208
|
|
|
209
|
-
function extend(publicAPI, model) {
|
|
210
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
209
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
211
210
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
212
211
|
|
|
213
212
|
// Make this a VTK object
|
package/IO/Misc/PDBReader.js
CHANGED
|
@@ -159,8 +159,7 @@ const DEFAULT_VALUES = {
|
|
|
159
159
|
|
|
160
160
|
// ----------------------------------------------------------------------------
|
|
161
161
|
|
|
162
|
-
function extend(publicAPI, model) {
|
|
163
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
162
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
164
163
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
165
164
|
|
|
166
165
|
// Build VTK API
|
package/IO/Misc/SkyboxReader.js
CHANGED
|
@@ -12,7 +12,7 @@ function vtkSkyboxReader(publicAPI, model) {
|
|
|
12
12
|
model.classHierarchy.push('vtkSkyboxReader');
|
|
13
13
|
|
|
14
14
|
// Internal method to fetch Array
|
|
15
|
-
function fetchData(url) {
|
|
15
|
+
function fetchData(url, option = {}) {
|
|
16
16
|
const {
|
|
17
17
|
compression,
|
|
18
18
|
progressCallback
|
|
@@ -24,8 +24,7 @@ function vtkSkyboxReader(publicAPI, model) {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
// Set DataSet url
|
|
27
|
-
publicAPI.setUrl =
|
|
28
|
-
let option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
27
|
+
publicAPI.setUrl = (url, option = {}) => {
|
|
29
28
|
model.url = url;
|
|
30
29
|
|
|
31
30
|
// Fetch metadata
|
|
@@ -33,9 +32,7 @@ function vtkSkyboxReader(publicAPI, model) {
|
|
|
33
32
|
};
|
|
34
33
|
|
|
35
34
|
// Fetch the actual data arrays
|
|
36
|
-
publicAPI.loadData =
|
|
37
|
-
return fetchData(model.url).then(publicAPI.parseAsArrayBuffer);
|
|
38
|
-
};
|
|
35
|
+
publicAPI.loadData = (option = {}) => fetchData(model.url, option).then(publicAPI.parseAsArrayBuffer);
|
|
39
36
|
publicAPI.parseAsArrayBuffer = content => {
|
|
40
37
|
if (!content) {
|
|
41
38
|
return false;
|
|
@@ -84,8 +81,7 @@ function vtkSkyboxReader(publicAPI, model) {
|
|
|
84
81
|
const decompressedFiles = unzipSync(new Uint8Array(content));
|
|
85
82
|
const pending = [];
|
|
86
83
|
// Find root index.json
|
|
87
|
-
Object.entries(decompressedFiles).forEach(
|
|
88
|
-
let [relativePath, fileData] = _ref;
|
|
84
|
+
Object.entries(decompressedFiles).forEach(([relativePath, fileData]) => {
|
|
89
85
|
if (relativePath.match(/index.json$/)) {
|
|
90
86
|
const txt = strFromU8(fileData);
|
|
91
87
|
const config = JSON.parse(txt);
|
|
@@ -194,8 +190,7 @@ const DEFAULT_VALUES = {
|
|
|
194
190
|
|
|
195
191
|
// ----------------------------------------------------------------------------
|
|
196
192
|
|
|
197
|
-
function extend(publicAPI, model) {
|
|
198
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
193
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
199
194
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
200
195
|
|
|
201
196
|
// Build VTK API
|
|
@@ -47,8 +47,7 @@ const DEFAULT_VALUES = {
|
|
|
47
47
|
|
|
48
48
|
// ----------------------------------------------------------------------------
|
|
49
49
|
|
|
50
|
-
function extend(publicAPI, model) {
|
|
51
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
50
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
52
51
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
53
52
|
vtkXMLReader.extend(publicAPI, model, initialValues);
|
|
54
53
|
vtkXMLImageDataReader(publicAPI, model);
|
|
@@ -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
|
vtkXMLWriter.extend(publicAPI, model, initialValues);
|
|
51
50
|
vtkXMLImageDataWriter(publicAPI, model);
|
|
@@ -75,8 +75,7 @@ const DEFAULT_VALUES = {
|
|
|
75
75
|
|
|
76
76
|
// ----------------------------------------------------------------------------
|
|
77
77
|
|
|
78
|
-
function extend(publicAPI, model) {
|
|
79
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
78
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
80
79
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
81
80
|
vtkXMLReader.extend(publicAPI, model, initialValues);
|
|
82
81
|
vtkXMLPolyDataReader(publicAPI, model);
|
|
@@ -82,8 +82,7 @@ const DEFAULT_VALUES = {
|
|
|
82
82
|
|
|
83
83
|
// ----------------------------------------------------------------------------
|
|
84
84
|
|
|
85
|
-
function extend(publicAPI, model) {
|
|
86
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
85
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
87
86
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
88
87
|
vtkXMLWriter.extend(publicAPI, model, initialValues);
|
|
89
88
|
vtkXMLPolyDataWriter(publicAPI, model);
|