@kitware/vtk.js 26.2.1 → 26.3.0
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/Common/Core/Math/index.js +5 -1
- package/Common/Core/Math.d.ts +1 -0
- package/Common/Core/Math.js +1 -1
- package/Common/DataModel/BoundingBox.js +28 -4
- package/Common/DataModel/ImageData.js +4 -30
- package/Common/DataModel/IncrementalOctreeNode.js +1 -1
- package/Common/DataModel/IncrementalOctreePointLocator.js +1 -1
- package/Common/DataModel/Line.js +1 -1
- package/Common/DataModel/Plane.js +1 -1
- package/Common/DataModel/Polygon.js +1 -1
- package/Common/DataModel/Quad.js +1 -1
- package/Common/DataModel/Triangle.js +1 -1
- package/Common/Transform/LandmarkTransform.js +1 -1
- package/Common/Transform/Transform.js +1 -1
- package/Filters/Core/PolyDataNormals.js +1 -1
- package/Filters/General/ClipClosedSurface.js +1 -1
- package/Filters/General/ContourTriangulator/helper.js +1 -1
- package/Filters/General/ImageMarchingCubes.js +1 -1
- package/Filters/General/MoleculeToRepresentation.js +1 -1
- package/Filters/General/OBBTree.js +1 -1
- package/Filters/General/TubeFilter.js +1 -1
- package/Filters/General/WindowedSincPolyDataFilter.js +1 -1
- package/Filters/Sources/CircleSource.js +1 -1
- package/Filters/Sources/PlaneSource.js +1 -1
- package/Filters/Sources/PointSource.js +1 -1
- package/Filters/Texture/TextureMapToPlane.js +1 -1
- package/Filters/Texture/TextureMapToSphere.js +1 -1
- package/Imaging/Core/ImageReslice.js +1 -1
- package/Interaction/Manipulators/KeyboardCameraManipulator.js +1 -1
- package/Interaction/Manipulators/MouseCameraAxisRotateManipulator.js +1 -1
- package/Interaction/Manipulators/MouseCameraTrackballPanManipulator.js +1 -1
- package/Interaction/Manipulators/MouseCameraTrackballRollManipulator.js +1 -1
- package/Interaction/Manipulators/MouseCameraTrackballRotateManipulator.js +1 -1
- package/Interaction/Manipulators/MouseCameraUnicamManipulator.js +1 -1
- package/Interaction/Manipulators/MouseCameraUnicamRotateManipulator.js +1 -1
- package/Interaction/Style/InteractorStyleMPRSlice.js +1 -1
- package/Interaction/Style/InteractorStyleTrackballCamera.js +1 -1
- package/Interaction/Widgets/PiecewiseGaussianWidget.js +1 -1
- package/Proxy/Core/View2DProxy.js +117 -3
- package/Proxy/Core/ViewProxy.js +64 -20
- package/Rendering/Core/Camera.js +1 -1
- package/Rendering/Core/CellPicker.js +1 -1
- package/Rendering/Core/ColorTransferFunction.js +1 -1
- package/Rendering/Core/Coordinate.js +1 -1
- package/Rendering/Core/CubeAxesActor.js +1 -1
- package/Rendering/Core/Glyph3DMapper.js +1 -1
- package/Rendering/Core/ImageMapper.js +1 -1
- package/Rendering/Core/Light.js +1 -1
- package/Rendering/Core/Mapper.js +1 -1
- package/Rendering/Core/Picker.js +1 -1
- package/Rendering/Core/Prop3D.js +1 -1
- package/Rendering/Core/RenderWindowInteractor.js +1 -1
- package/Rendering/Core/Renderer.js +1 -1
- package/Rendering/Core/ScalarBarActor.js +1 -1
- package/Rendering/Core/VolumeMapper.js +1 -1
- package/Rendering/OpenGL/PolyDataMapper.js +1 -1
- package/Rendering/OpenGL/PolyDataMapper2D.js +1 -1
- package/Rendering/OpenGL/Texture.js +1 -1
- package/Rendering/WebGPU/BufferManager.js +1 -1
- package/Rendering/WebGPU/VolumePass.js +1 -1
- package/Widgets/Core/StateBuilder/orientationMixin.js +1 -1
- package/Widgets/Manipulators/LineManipulator.js +1 -1
- package/Widgets/Manipulators/TrackballManipulator.js +1 -1
- package/Widgets/Representations/PolyLineRepresentation.js +1 -1
- package/Widgets/Representations/WidgetRepresentation.js +1 -1
- package/Widgets/Widgets3D/AngleWidget.js +1 -1
- package/Widgets/Widgets3D/DistanceWidget.js +1 -1
- package/Widgets/Widgets3D/LineWidget/behavior.js +1 -1
- package/Widgets/Widgets3D/LineWidget/helpers.js +1 -1
- package/Widgets/Widgets3D/LineWidget.js +1 -1
- package/Widgets/Widgets3D/ResliceCursorWidget/behavior.js +1 -1
- package/Widgets/Widgets3D/ResliceCursorWidget/helpers.js +1 -1
- package/Widgets/Widgets3D/ResliceCursorWidget.js +1 -1
- package/Widgets/Widgets3D/ShapeWidget/behavior.js +4 -4
- package/Widgets/Widgets3D/SphereWidget.js +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import vtkBoundingBox, { STATIC } from '../../../Common/DataModel/BoundingBox.js
|
|
|
3
3
|
import vtkCubeSource from '../../../Filters/Sources/CubeSource.js';
|
|
4
4
|
import vtkCutter from '../../../Filters/Core/Cutter.js';
|
|
5
5
|
import vtkPlane from '../../../Common/DataModel/Plane.js';
|
|
6
|
-
import { s as subtract,
|
|
6
|
+
import { s as subtract, l as normalize, j as cross, w as multiplyScalar, m as multiplyAccumulate, S as signedAngleBetweenVectors } from '../../../Common/Core/Math/index.js';
|
|
7
7
|
import vtkMatrixBuilder from '../../../Common/Core/MatrixBuilder.js';
|
|
8
8
|
import { ViewTypes } from '../../Core/WidgetManager/Constants.js';
|
|
9
9
|
import { getPixelWorldHeightAtCoord } from '../../Representations/WidgetRepresentation.js';
|
|
@@ -6,7 +6,7 @@ import vtkPlane from '../../Common/DataModel/Plane.js';
|
|
|
6
6
|
import vtkPlaneSource from '../../Filters/Sources/PlaneSource.js';
|
|
7
7
|
import vtkLineHandleRepresentation from '../Representations/LineHandleRepresentation.js';
|
|
8
8
|
import vtkSphereHandleRepresentation from '../Representations/SphereHandleRepresentation.js';
|
|
9
|
-
import {
|
|
9
|
+
import { e as distance2BetweenPoints, m as multiplyAccumulate, s as subtract, l as normalize, w as multiplyScalar, k as add } from '../../Common/Core/Math/index.js';
|
|
10
10
|
import widgetBehavior from './ResliceCursorWidget/behavior.js';
|
|
11
11
|
import generateState from './ResliceCursorWidget/state.js';
|
|
12
12
|
import { updateState, transformPlane, boundPlane } from './ResliceCursorWidget/helpers.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
2
2
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
3
3
|
import macro from '../../../macros.js';
|
|
4
|
-
import {
|
|
4
|
+
import { f as vtkMath } from '../../../Common/Core/Math/index.js';
|
|
5
5
|
import vtkBoundingBox from '../../../Common/DataModel/BoundingBox.js';
|
|
6
6
|
import vtkPlane from '../../../Common/DataModel/Plane.js';
|
|
7
7
|
import { ShapeBehavior, BehaviorCategory, TextPosition } from './Constants.js';
|
|
@@ -161,7 +161,7 @@ function widgetBehavior(publicAPI, model) {
|
|
|
161
161
|
|
|
162
162
|
|
|
163
163
|
publicAPI.getBounds = function () {
|
|
164
|
-
return model.point1 && model.point2 ?
|
|
164
|
+
return model.point1 && model.point2 ? vtkBoundingBox.addPoints(vtkBoundingBox.reset([]), [model.point1, model.point2]) : vtkMath.uninitializeBounds([]);
|
|
165
165
|
}; // To be reimplemented by subclass
|
|
166
166
|
|
|
167
167
|
|
|
@@ -254,7 +254,7 @@ function widgetBehavior(publicAPI, model) {
|
|
|
254
254
|
|
|
255
255
|
var maxPoint = (_model$_apiSpecificRe2 = model._apiSpecificRenderWindow).worldToDisplay.apply(_model$_apiSpecificRe2, _toConsumableArray(vtkBoundingBox.getMaxPoint(worldBounds)).concat([model._renderer]));
|
|
256
256
|
|
|
257
|
-
var displayBounds =
|
|
257
|
+
var displayBounds = vtkBoundingBox.addPoints(vtkBoundingBox.reset([]), [minPoint, maxPoint]);
|
|
258
258
|
var planeOrigin = [];
|
|
259
259
|
var p1 = [];
|
|
260
260
|
var p2 = [];
|
|
@@ -308,7 +308,7 @@ function widgetBehavior(publicAPI, model) {
|
|
|
308
308
|
};
|
|
309
309
|
|
|
310
310
|
publicAPI.updateTextPosition = function (point1, point2) {
|
|
311
|
-
var bounds =
|
|
311
|
+
var bounds = vtkBoundingBox.addPoints(vtkBoundingBox.reset([]), [point1, point2]);
|
|
312
312
|
var screenPosition = computeTextPosition(bounds, model.widgetState.getTextPosition(), model.widgetState.getTextWorldMargin());
|
|
313
313
|
var textHandle = model.widgetState.getText();
|
|
314
314
|
textHandle.setOrigin(screenPosition);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
|
-
import {
|
|
2
|
+
import { e as distance2BetweenPoints } from '../../Common/Core/Math/index.js';
|
|
3
3
|
import vtkAbstractWidgetFactory from '../Core/AbstractWidgetFactory.js';
|
|
4
4
|
import vtkPlanePointManipulator from '../Manipulators/PlaneManipulator.js';
|
|
5
5
|
import vtkSphereHandleRepresentation from '../Representations/SphereHandleRepresentation.js';
|