@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
|
@@ -48,8 +48,7 @@ function getQuadPoly(openGLRenderWindow) {
|
|
|
48
48
|
});
|
|
49
49
|
return quad;
|
|
50
50
|
}
|
|
51
|
-
function allocateBuffer(openGLRenderWindow,
|
|
52
|
-
let [width, height] = _ref;
|
|
51
|
+
function allocateBuffer(openGLRenderWindow, [width, height], filter, wrapping) {
|
|
53
52
|
const gl = openGLRenderWindow.getContext();
|
|
54
53
|
const texture = vtkOpenGLTexture.newInstance({
|
|
55
54
|
autoParameters: false,
|
|
@@ -149,8 +148,7 @@ function vtkLICPingPongBufferManager(publicAPI, model) {
|
|
|
149
148
|
tex.activate();
|
|
150
149
|
return tex.getTextureUnit();
|
|
151
150
|
};
|
|
152
|
-
publicAPI.getNoiseTextureUnit =
|
|
153
|
-
let licPassNum = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
151
|
+
publicAPI.getNoiseTextureUnit = (licPassNum = 0) => {
|
|
154
152
|
if (licPassNum === 0) {
|
|
155
153
|
model.noiseTexture.activate();
|
|
156
154
|
return model.noiseTexture.getTextureUnit();
|
|
@@ -176,8 +174,7 @@ function vtkLICPingPongBufferManager(publicAPI, model) {
|
|
|
176
174
|
}
|
|
177
175
|
return publicAPI.getImageVectorTextureUnit();
|
|
178
176
|
};
|
|
179
|
-
publicAPI.clearBuffers =
|
|
180
|
-
let clearEETex = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
177
|
+
publicAPI.clearBuffers = (clearEETex = false) => {
|
|
181
178
|
const fb = model.framebuffer;
|
|
182
179
|
const gl = model.context;
|
|
183
180
|
fb.removeColorBuffer(0);
|
|
@@ -241,8 +238,7 @@ function vtkLICPingPongBufferManager(publicAPI, model) {
|
|
|
241
238
|
model.maskVectorTexture.deactivate();
|
|
242
239
|
}
|
|
243
240
|
};
|
|
244
|
-
publicAPI.activateNoiseTexture =
|
|
245
|
-
let licPassNum = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
241
|
+
publicAPI.activateNoiseTexture = (licPassNum = 0) => {
|
|
246
242
|
switch (licPassNum) {
|
|
247
243
|
case 0:
|
|
248
244
|
model.noiseTexture.activate();
|
|
@@ -254,8 +250,7 @@ function vtkLICPingPongBufferManager(publicAPI, model) {
|
|
|
254
250
|
console.error('Wrong LIC pass number');
|
|
255
251
|
}
|
|
256
252
|
};
|
|
257
|
-
publicAPI.deactivateNoiseTexture =
|
|
258
|
-
let licPassNum = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
253
|
+
publicAPI.deactivateNoiseTexture = (licPassNum = 0) => {
|
|
259
254
|
switch (licPassNum) {
|
|
260
255
|
case 0:
|
|
261
256
|
model.noiseTexture.deactivate();
|
|
@@ -367,8 +362,7 @@ const DEFAULT_VALUES = {
|
|
|
367
362
|
pongTextures: [],
|
|
368
363
|
textures: []
|
|
369
364
|
};
|
|
370
|
-
function extend(publicAPI, model) {
|
|
371
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
365
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
372
366
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
373
367
|
macro.obj(publicAPI, model);
|
|
374
368
|
macro.get(publicAPI, model, ['readIndex']);
|
|
@@ -13,8 +13,7 @@ import vtkOpenGLFramebuffer from '../Framebuffer.js';
|
|
|
13
13
|
import vtkLICPingPongBufferManager from './LineIntegralConvolution2D/pingpong.js';
|
|
14
14
|
import { ContrastEnhanceMode } from '../../Core/SurfaceLICInterface/Constants.js';
|
|
15
15
|
|
|
16
|
-
function getVectorLookupProgram() {
|
|
17
|
-
let normalize = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
16
|
+
function getVectorLookupProgram(normalize = true) {
|
|
18
17
|
// lookup the vector and normalize
|
|
19
18
|
const getNormVecSrc = `
|
|
20
19
|
vec2 getVector( vec2 vectc )\n
|
|
@@ -48,11 +47,7 @@ function getVectorLookupProgram() {
|
|
|
48
47
|
function vtkLineIntegralConvolution2D(publicAPI, model) {
|
|
49
48
|
model.classHierarchy.push('vtkLineIntegralConvolution2D');
|
|
50
49
|
publicAPI.buildAShader = fSource => model._openGLRenderWindow.getShaderCache().readyShaderProgramArray(vtkLineIntegralConvolution2D_quadVS, fSource, '');
|
|
51
|
-
publicAPI.dumpTextureValues =
|
|
52
|
-
let [width, height] = _ref;
|
|
53
|
-
let context = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : model.context;
|
|
54
|
-
let openGLRenderWindow = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : model._openGLRenderWindow;
|
|
55
|
-
let nComp = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 4;
|
|
50
|
+
publicAPI.dumpTextureValues = (texture, [width, height], context = model.context, openGLRenderWindow = model._openGLRenderWindow, nComp = 4) => {
|
|
56
51
|
// To get texture values in es 2.0, we need to attach the texture to a fbo,
|
|
57
52
|
// then use glReadPixels
|
|
58
53
|
const fb = vtkOpenGLFramebuffer.newInstance();
|
|
@@ -68,9 +63,7 @@ function vtkLineIntegralConvolution2D(publicAPI, model) {
|
|
|
68
63
|
fb.restorePreviousBindingsAndBuffers();
|
|
69
64
|
return pixels;
|
|
70
65
|
};
|
|
71
|
-
publicAPI.getTextureMinMax =
|
|
72
|
-
let context = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : model.context;
|
|
73
|
-
let openGLRenderWindow = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : model._openGLRenderWindow;
|
|
66
|
+
publicAPI.getTextureMinMax = (texture, size, context = model.context, openGLRenderWindow = model._openGLRenderWindow) => {
|
|
74
67
|
const values = publicAPI.dumpTextureValues(texture, size, context, openGLRenderWindow, 4);
|
|
75
68
|
let min = Number.MAX_VALUE;
|
|
76
69
|
let max = Number.MIN_VALUE;
|
|
@@ -376,8 +369,7 @@ const DEFAULT_VALUES = {
|
|
|
376
369
|
bufs: null,
|
|
377
370
|
isComposite: true
|
|
378
371
|
};
|
|
379
|
-
function extend(publicAPI, model) {
|
|
380
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
372
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
381
373
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
382
374
|
macro.obj(publicAPI, model);
|
|
383
375
|
macro.setGet(publicAPI, model, ['context', '_openGLRenderWindow', 'nuberOfSteps', 'stepSize', 'normalizeVectors', 'maskThreshold', 'enhancedLIC', 'enhanceContrast', 'lowLICContrastEnhancementFactor', 'highLICContrastEnhancementFactor', 'antiAlias', 'componentIds', 'isComposite']);
|
|
@@ -133,8 +133,7 @@ function vtkOpenGLSurfaceLICInterface(publicAPI, model) {
|
|
|
133
133
|
return noiseImpulseBackgroundValue;
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
|
-
function generateUniformNoise(
|
|
137
|
-
let [width, height] = _ref;
|
|
136
|
+
function generateUniformNoise([width, height], numberOfNoiseLevels, min, max) {
|
|
138
137
|
const diff = max - min;
|
|
139
138
|
return Float32Array.from({
|
|
140
139
|
length: width * height
|
|
@@ -527,8 +526,7 @@ const DEFAULT_VALUES = {
|
|
|
527
526
|
size: null,
|
|
528
527
|
licInterface: null
|
|
529
528
|
};
|
|
530
|
-
function extend(publicAPI, model) {
|
|
531
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
529
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
532
530
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
533
531
|
|
|
534
532
|
// Inherit
|
|
@@ -189,8 +189,7 @@ const DEFAULT_VALUES = {
|
|
|
189
189
|
rebuildLICBuffers: false,
|
|
190
190
|
openGLLicInterface: null
|
|
191
191
|
};
|
|
192
|
-
function extend(publicAPI, model) {
|
|
193
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
192
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
194
193
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
195
194
|
|
|
196
195
|
// Inherit
|
|
@@ -43,8 +43,7 @@ function vtkOpenGLTexture(publicAPI, model) {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
// Renders myself
|
|
46
|
-
publicAPI.render =
|
|
47
|
-
let renWin = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
46
|
+
publicAPI.render = (renWin = null) => {
|
|
48
47
|
if (renWin) {
|
|
49
48
|
model._openGLRenderWindow = renWin;
|
|
50
49
|
} else {
|
|
@@ -474,8 +473,7 @@ function vtkOpenGLTexture(publicAPI, model) {
|
|
|
474
473
|
};
|
|
475
474
|
|
|
476
475
|
//----------------------------------------------------------------------------
|
|
477
|
-
publicAPI.getOpenGLDataType =
|
|
478
|
-
let forceUpdate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
476
|
+
publicAPI.getOpenGLDataType = (vtkScalarType, forceUpdate = false) => {
|
|
479
477
|
if (!model.openGLDataType || forceUpdate) {
|
|
480
478
|
model.openGLDataType = publicAPI.getDefaultDataType(vtkScalarType);
|
|
481
479
|
}
|
|
@@ -617,8 +615,7 @@ function vtkOpenGLTexture(publicAPI, model) {
|
|
|
617
615
|
* @param {TypedArrayConstructor} typedArrayConstructor optional typed array constructor
|
|
618
616
|
* @returns
|
|
619
617
|
*/
|
|
620
|
-
function readExtents(data, extents) {
|
|
621
|
-
let typedArrayConstructor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
618
|
+
function readExtents(data, extents, typedArrayConstructor = null) {
|
|
622
619
|
const constructor = typedArrayConstructor || data.constructor;
|
|
623
620
|
const numPixels = extents.reduce((count, extent) => count + getExtentPixelCount(extent), 0);
|
|
624
621
|
const extentPixels = new constructor(numPixels);
|
|
@@ -645,9 +642,7 @@ function vtkOpenGLTexture(publicAPI, model) {
|
|
|
645
642
|
* @param {Array<Extent>} imageExtents only consider these image extents (default: [])
|
|
646
643
|
* @returns {Array} The updated data array that matches the OpenGL data type.
|
|
647
644
|
*/
|
|
648
|
-
publicAPI.updateArrayDataTypeForGL =
|
|
649
|
-
let depth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
650
|
-
let imageExtents = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
|
|
645
|
+
publicAPI.updateArrayDataTypeForGL = (dataType, data, depth = false, imageExtents = []) => {
|
|
651
646
|
const pixData = [];
|
|
652
647
|
let pixCount = model.width * model.height * model.components;
|
|
653
648
|
if (depth) {
|
|
@@ -827,15 +822,14 @@ function vtkOpenGLTexture(publicAPI, model) {
|
|
|
827
822
|
|
|
828
823
|
//----------------------------------------------------------------------------
|
|
829
824
|
|
|
830
|
-
publicAPI.create2DFromRaw =
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
825
|
+
publicAPI.create2DFromRaw = ({
|
|
826
|
+
width = requiredParam('width'),
|
|
827
|
+
height = requiredParam('height'),
|
|
828
|
+
numComps = requiredParam('numComps'),
|
|
829
|
+
dataType = requiredParam('dataType'),
|
|
830
|
+
data = requiredParam('data'),
|
|
831
|
+
flip = false
|
|
832
|
+
} = {}) => {
|
|
839
833
|
// Now determine the texture parameters using the arguments.
|
|
840
834
|
publicAPI.getOpenGLDataType(dataType, true);
|
|
841
835
|
publicAPI.getInternalFormat(dataType, numComps);
|
|
@@ -884,14 +878,13 @@ function vtkOpenGLTexture(publicAPI, model) {
|
|
|
884
878
|
};
|
|
885
879
|
|
|
886
880
|
//----------------------------------------------------------------------------
|
|
887
|
-
publicAPI.createCubeFromRaw =
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
881
|
+
publicAPI.createCubeFromRaw = ({
|
|
882
|
+
width = requiredParam('width'),
|
|
883
|
+
height = requiredParam('height'),
|
|
884
|
+
numComps = requiredParam('numComps'),
|
|
885
|
+
dataType = requiredParam('dataType'),
|
|
886
|
+
data = requiredParam('data')
|
|
887
|
+
} = {}) => {
|
|
895
888
|
// Now determine the texture parameters using the arguments.
|
|
896
889
|
publicAPI.getOpenGLDataType(dataType);
|
|
897
890
|
publicAPI.getInternalFormat(dataType, numComps);
|
|
@@ -972,13 +965,12 @@ function vtkOpenGLTexture(publicAPI, model) {
|
|
|
972
965
|
};
|
|
973
966
|
|
|
974
967
|
//----------------------------------------------------------------------------
|
|
975
|
-
publicAPI.createDepthFromRaw =
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
968
|
+
publicAPI.createDepthFromRaw = ({
|
|
969
|
+
width = requiredParam('width'),
|
|
970
|
+
height = requiredParam('height'),
|
|
971
|
+
dataType = requiredParam('dataType'),
|
|
972
|
+
data = requiredParam('data')
|
|
973
|
+
} = {}) => {
|
|
982
974
|
// Now determine the texture parameters using the arguments.
|
|
983
975
|
publicAPI.getOpenGLDataType(dataType);
|
|
984
976
|
model.format = model.context.DEPTH_COMPONENT;
|
|
@@ -1066,7 +1058,6 @@ function vtkOpenGLTexture(publicAPI, model) {
|
|
|
1066
1058
|
textureSource = canvas;
|
|
1067
1059
|
flipY = false; // we are flipping the image manually using translate/scale
|
|
1068
1060
|
}
|
|
1069
|
-
|
|
1070
1061
|
model.width = targetWidth;
|
|
1071
1062
|
model.height = targetHeight;
|
|
1072
1063
|
|
|
@@ -1200,35 +1191,31 @@ function vtkOpenGLTexture(publicAPI, model) {
|
|
|
1200
1191
|
scaleOffsets
|
|
1201
1192
|
};
|
|
1202
1193
|
}
|
|
1203
|
-
publicAPI.create2DFilterableFromRaw =
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
height = requiredParam('height'),
|
|
1229
|
-
dataArray = requiredParam('dataArray'),
|
|
1230
|
-
preferSizeOverAccuracy = false
|
|
1231
|
-
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1194
|
+
publicAPI.create2DFilterableFromRaw = ({
|
|
1195
|
+
width = requiredParam('width'),
|
|
1196
|
+
height = requiredParam('height'),
|
|
1197
|
+
numComps = requiredParam('numComps'),
|
|
1198
|
+
dataType = requiredParam('dataType'),
|
|
1199
|
+
data = requiredParam('data'),
|
|
1200
|
+
preferSizeOverAccuracy = false,
|
|
1201
|
+
ranges = undefined
|
|
1202
|
+
} = {}) => publicAPI.create2DFilterableFromDataArray({
|
|
1203
|
+
width,
|
|
1204
|
+
height,
|
|
1205
|
+
dataArray: vtkDataArray.newInstance({
|
|
1206
|
+
numberOfComponents: numComps,
|
|
1207
|
+
dataType,
|
|
1208
|
+
values: data,
|
|
1209
|
+
ranges
|
|
1210
|
+
}),
|
|
1211
|
+
preferSizeOverAccuracy
|
|
1212
|
+
});
|
|
1213
|
+
publicAPI.create2DFilterableFromDataArray = ({
|
|
1214
|
+
width = requiredParam('width'),
|
|
1215
|
+
height = requiredParam('height'),
|
|
1216
|
+
dataArray = requiredParam('dataArray'),
|
|
1217
|
+
preferSizeOverAccuracy = false
|
|
1218
|
+
} = {}) => {
|
|
1232
1219
|
const {
|
|
1233
1220
|
numComps,
|
|
1234
1221
|
dataType,
|
|
@@ -1265,7 +1252,6 @@ function vtkOpenGLTexture(publicAPI, model) {
|
|
|
1265
1252
|
for (let c = 0; c < numComps; ++c) {
|
|
1266
1253
|
model.volumeInfo.scale[c] = 32767.0; // Scale to [-1, 1] range
|
|
1267
1254
|
}
|
|
1268
|
-
|
|
1269
1255
|
isScalingApplied = true;
|
|
1270
1256
|
}
|
|
1271
1257
|
|
|
@@ -1274,7 +1260,6 @@ function vtkOpenGLTexture(publicAPI, model) {
|
|
|
1274
1260
|
for (let c = 0; c < numComps; ++c) {
|
|
1275
1261
|
model.volumeInfo.scale[c] = 65535.0; // Scale to [0, 1] range
|
|
1276
1262
|
}
|
|
1277
|
-
|
|
1278
1263
|
isScalingApplied = true;
|
|
1279
1264
|
}
|
|
1280
1265
|
|
|
@@ -1283,7 +1268,6 @@ function vtkOpenGLTexture(publicAPI, model) {
|
|
|
1283
1268
|
for (let c = 0; c < numComps; ++c) {
|
|
1284
1269
|
model.volumeInfo.scale[c] = 255.0; // Scale to [0, 1] range
|
|
1285
1270
|
}
|
|
1286
|
-
|
|
1287
1271
|
isScalingApplied = true;
|
|
1288
1272
|
}
|
|
1289
1273
|
|
|
@@ -1295,16 +1279,15 @@ function vtkOpenGLTexture(publicAPI, model) {
|
|
|
1295
1279
|
};
|
|
1296
1280
|
|
|
1297
1281
|
//----------------------------------------------------------------------------
|
|
1298
|
-
publicAPI.create3DFromRaw =
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1282
|
+
publicAPI.create3DFromRaw = ({
|
|
1283
|
+
width = requiredParam('width'),
|
|
1284
|
+
height = requiredParam('height'),
|
|
1285
|
+
depth = requiredParam('depth'),
|
|
1286
|
+
numComps = requiredParam('numComps'),
|
|
1287
|
+
dataType = requiredParam('dataType'),
|
|
1288
|
+
data = requiredParam('data'),
|
|
1289
|
+
updatedExtents = []
|
|
1290
|
+
} = {}) => {
|
|
1308
1291
|
let dataTypeToUse = dataType;
|
|
1309
1292
|
let dataToUse = data;
|
|
1310
1293
|
if (!publicAPI.updateVolumeInfoForGL(dataTypeToUse, numComps) && dataToUse) {
|
|
@@ -1394,44 +1377,40 @@ function vtkOpenGLTexture(publicAPI, model) {
|
|
|
1394
1377
|
//----------------------------------------------------------------------------
|
|
1395
1378
|
// This method simulates a 3D texture using 2D
|
|
1396
1379
|
// Prefer create3DFilterableFromDataArray to enable caching of min and max values
|
|
1397
|
-
publicAPI.create3DFilterableFromRaw =
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
updatedExtents
|
|
1421
|
-
});
|
|
1422
|
-
};
|
|
1380
|
+
publicAPI.create3DFilterableFromRaw = ({
|
|
1381
|
+
width = requiredParam('width'),
|
|
1382
|
+
height = requiredParam('height'),
|
|
1383
|
+
depth = requiredParam('depth'),
|
|
1384
|
+
numComps = requiredParam('numComps'),
|
|
1385
|
+
dataType = requiredParam('dataType'),
|
|
1386
|
+
data = requiredParam('data'),
|
|
1387
|
+
preferSizeOverAccuracy = false,
|
|
1388
|
+
ranges = undefined,
|
|
1389
|
+
updatedExtents = []
|
|
1390
|
+
} = {}) => publicAPI.create3DFilterableFromDataArray({
|
|
1391
|
+
width,
|
|
1392
|
+
height,
|
|
1393
|
+
depth,
|
|
1394
|
+
dataArray: vtkDataArray.newInstance({
|
|
1395
|
+
numberOfComponents: numComps,
|
|
1396
|
+
dataType,
|
|
1397
|
+
values: data,
|
|
1398
|
+
ranges
|
|
1399
|
+
}),
|
|
1400
|
+
preferSizeOverAccuracy,
|
|
1401
|
+
updatedExtents
|
|
1402
|
+
});
|
|
1423
1403
|
|
|
1424
1404
|
//----------------------------------------------------------------------------
|
|
1425
1405
|
// This method create a 3D texture from dimensions and a DataArray
|
|
1426
|
-
publicAPI.create3DFilterableFromDataArray =
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1406
|
+
publicAPI.create3DFilterableFromDataArray = ({
|
|
1407
|
+
width = requiredParam('width'),
|
|
1408
|
+
height = requiredParam('height'),
|
|
1409
|
+
depth = requiredParam('depth'),
|
|
1410
|
+
dataArray = requiredParam('dataArray'),
|
|
1411
|
+
preferSizeOverAccuracy = false,
|
|
1412
|
+
updatedExtents = []
|
|
1413
|
+
} = {}) => {
|
|
1435
1414
|
const {
|
|
1436
1415
|
numComps,
|
|
1437
1416
|
dataType,
|
|
@@ -1677,8 +1656,7 @@ const DEFAULT_VALUES = {
|
|
|
1677
1656
|
|
|
1678
1657
|
// ----------------------------------------------------------------------------
|
|
1679
1658
|
|
|
1680
|
-
function extend(publicAPI, model) {
|
|
1681
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1659
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
1682
1660
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
1683
1661
|
|
|
1684
1662
|
// Inheritance
|
|
@@ -100,8 +100,7 @@ const DEFAULT_VALUES = {
|
|
|
100
100
|
|
|
101
101
|
// ----------------------------------------------------------------------------
|
|
102
102
|
|
|
103
|
-
function extend(publicAPI, model) {
|
|
104
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
103
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
105
104
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
106
105
|
macro.obj(publicAPI, model);
|
|
107
106
|
model.textureUnits = [];
|
|
@@ -281,8 +281,7 @@ const DEFAULT_VALUES = {
|
|
|
281
281
|
|
|
282
282
|
// ----------------------------------------------------------------------------
|
|
283
283
|
|
|
284
|
-
function extend(publicAPI, model) {
|
|
285
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
284
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
286
285
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
287
286
|
|
|
288
287
|
// Internal objects initialization
|
|
@@ -23,8 +23,7 @@ const DEFAULT_VALUES = {};
|
|
|
23
23
|
|
|
24
24
|
// ----------------------------------------------------------------------------
|
|
25
25
|
|
|
26
|
-
function extend(publicAPI, model) {
|
|
27
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
26
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
28
27
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
29
28
|
|
|
30
29
|
// Static class mapping shared across instances
|
|
@@ -85,8 +85,7 @@ const DEFAULT_VALUES = {
|
|
|
85
85
|
|
|
86
86
|
// ----------------------------------------------------------------------------
|
|
87
87
|
|
|
88
|
-
function extend(publicAPI, model) {
|
|
89
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
88
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
90
89
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
91
90
|
|
|
92
91
|
// Inheritance
|
|
@@ -868,10 +868,9 @@ function vtkOpenGLVolumeMapper(publicAPI, model) {
|
|
|
868
868
|
|
|
869
869
|
// set interpolation on the texture based on property setting
|
|
870
870
|
const volumeProperties = actor.getProperties();
|
|
871
|
-
model.currentValidInputs.forEach(
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
} = _ref;
|
|
871
|
+
model.currentValidInputs.forEach(({
|
|
872
|
+
inputIndex
|
|
873
|
+
}) => {
|
|
875
874
|
const volumeProperty = volumeProperties[inputIndex];
|
|
876
875
|
const interpolationType = volumeProperty.getInterpolationType();
|
|
877
876
|
const scalarTexture = model.scalarTextures[inputIndex];
|
|
@@ -1001,12 +1000,9 @@ function vtkOpenGLVolumeMapper(publicAPI, model) {
|
|
|
1001
1000
|
publicAPI.buildBufferObjects(ren, actor);
|
|
1002
1001
|
}
|
|
1003
1002
|
};
|
|
1004
|
-
publicAPI.getNeedToRebuildBufferObjects = (ren, actor) => model.VBOBuildTime.getMTime() < publicAPI.getMTime() || model.VBOBuildTime.getMTime() < actor.getMTime() || model.VBOBuildTime.getMTime() < actor.getProperty(model.currentValidInputs[0].inputIndex)?.getMTime() || model.VBOBuildTime.getMTime() < model.renderable.getMTime() || model.currentValidInputs.some(
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
} = _ref2;
|
|
1008
|
-
return model.VBOBuildTime.getMTime() < imageData.getMTime();
|
|
1009
|
-
}) || model.scalarTextures.length !== model.currentValidInputs.length || !model.scalarTextures.every(texture => !!texture?.getHandle()) || !model.colorTexture?.getHandle() || !model.opacityTexture?.getHandle() || !model.labelOutlineThicknessTexture?.getHandle() || !model.jitterTexture?.getHandle();
|
|
1003
|
+
publicAPI.getNeedToRebuildBufferObjects = (ren, actor) => model.VBOBuildTime.getMTime() < publicAPI.getMTime() || model.VBOBuildTime.getMTime() < actor.getMTime() || model.VBOBuildTime.getMTime() < actor.getProperty(model.currentValidInputs[0].inputIndex)?.getMTime() || model.VBOBuildTime.getMTime() < model.renderable.getMTime() || model.currentValidInputs.some(({
|
|
1004
|
+
imageData
|
|
1005
|
+
}) => model.VBOBuildTime.getMTime() < imageData.getMTime()) || model.scalarTextures.length !== model.currentValidInputs.length || !model.scalarTextures.every(texture => !!texture?.getHandle()) || !model.colorTexture?.getHandle() || !model.opacityTexture?.getHandle() || !model.labelOutlineThicknessTexture?.getHandle() || !model.jitterTexture?.getHandle();
|
|
1010
1006
|
publicAPI.buildBufferObjects = (ren, actor) => {
|
|
1011
1007
|
if (!model.jitterTexture.getHandle()) {
|
|
1012
1008
|
const jitterArray = new Float32Array(32 * 32);
|
|
@@ -1146,11 +1142,10 @@ function vtkOpenGLVolumeMapper(publicAPI, model) {
|
|
|
1146
1142
|
model._colorTextureCore = firstColorTransferFunc;
|
|
1147
1143
|
|
|
1148
1144
|
// rebuild scalarTextures?
|
|
1149
|
-
model.currentValidInputs.forEach((
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
} = _ref3;
|
|
1145
|
+
model.currentValidInputs.forEach(({
|
|
1146
|
+
imageData,
|
|
1147
|
+
inputIndex
|
|
1148
|
+
}, component) => {
|
|
1154
1149
|
// rebuild the scalarTexture if the data has changed
|
|
1155
1150
|
const volumeProperty = volumeProperties[inputIndex];
|
|
1156
1151
|
const scalars = imageData.getPointData().getScalars();
|
|
@@ -1311,8 +1306,7 @@ const DEFAULT_VALUES = {
|
|
|
1311
1306
|
|
|
1312
1307
|
// ----------------------------------------------------------------------------
|
|
1313
1308
|
|
|
1314
|
-
function extend(publicAPI, model) {
|
|
1315
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1309
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
1316
1310
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
1317
1311
|
|
|
1318
1312
|
// Inheritance
|
|
@@ -16,8 +16,7 @@ function vtkRenderPass(publicAPI, model) {
|
|
|
16
16
|
// preDelegateOperations, then call its delegate render passes
|
|
17
17
|
// the traverse all of its postDelegateOperations
|
|
18
18
|
// any of those three arrays can be empty
|
|
19
|
-
publicAPI.traverse =
|
|
20
|
-
let parent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
19
|
+
publicAPI.traverse = (viewNode, parent = null) => {
|
|
21
20
|
if (model.deleted) {
|
|
22
21
|
return;
|
|
23
22
|
}
|
|
@@ -52,8 +51,7 @@ const DEFAULT_VALUES = {
|
|
|
52
51
|
|
|
53
52
|
// ----------------------------------------------------------------------------
|
|
54
53
|
|
|
55
|
-
function extend(publicAPI, model) {
|
|
56
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
54
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
57
55
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
58
56
|
|
|
59
57
|
// Build VTK API
|
|
@@ -114,8 +114,7 @@ const DEFAULT_VALUES = {
|
|
|
114
114
|
|
|
115
115
|
// ----------------------------------------------------------------------------
|
|
116
116
|
|
|
117
|
-
function extend(publicAPI, model) {
|
|
118
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
117
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
119
118
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
120
119
|
if (!model.size) {
|
|
121
120
|
model.size = [300, 300];
|
|
@@ -60,8 +60,7 @@ function vtkViewNode(publicAPI, model) {
|
|
|
60
60
|
customRenderPass(prepass, renderPass);
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
|
-
publicAPI.getViewNodeFor =
|
|
64
|
-
let hint = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
63
|
+
publicAPI.getViewNodeFor = (dataObject, hint = null) => {
|
|
65
64
|
if (hint && hint.renderable === dataObject) {
|
|
66
65
|
return hint;
|
|
67
66
|
}
|
|
@@ -128,8 +127,7 @@ function vtkViewNode(publicAPI, model) {
|
|
|
128
127
|
|
|
129
128
|
// add missing nodes/children for the passed in renderables. This should
|
|
130
129
|
// be called only in between prepareNodes and removeUnusedNodes
|
|
131
|
-
publicAPI.addMissingNodes =
|
|
132
|
-
let enforceOrder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
130
|
+
publicAPI.addMissingNodes = (dataObjs, enforceOrder = false) => {
|
|
133
131
|
if (!dataObjs || !dataObjs.length) {
|
|
134
132
|
return;
|
|
135
133
|
}
|
|
@@ -245,8 +243,7 @@ const DEFAULT_VALUES = {
|
|
|
245
243
|
|
|
246
244
|
// ----------------------------------------------------------------------------
|
|
247
245
|
|
|
248
|
-
function extend(publicAPI, model) {
|
|
249
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
246
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
250
247
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
251
248
|
|
|
252
249
|
// Build VTK API
|
|
@@ -46,8 +46,7 @@ const DEFAULT_VALUES = {
|
|
|
46
46
|
|
|
47
47
|
// ----------------------------------------------------------------------------
|
|
48
48
|
|
|
49
|
-
function extend(publicAPI, model) {
|
|
50
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
49
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
51
50
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
52
51
|
|
|
53
52
|
// 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
|
// Inheritance
|
|
@@ -113,8 +113,7 @@ const DEFAULT_VALUES = {
|
|
|
113
113
|
|
|
114
114
|
// ----------------------------------------------------------------------------
|
|
115
115
|
|
|
116
|
-
function extend(publicAPI, model) {
|
|
117
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
116
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
118
117
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
119
118
|
|
|
120
119
|
// Inheritance
|
|
@@ -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
|
|
|
89
88
|
// Object methods
|