@kitware/vtk.js 22.0.1 → 22.1.2

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.
Files changed (62) hide show
  1. package/Common/Core/Math/index.js +1 -1
  2. package/Common/Core/Math.js +1 -1
  3. package/Common/DataModel/ITKHelper.js +1 -1
  4. package/Common/DataModel/ImageData.js +1 -1
  5. package/Common/DataModel/Line.js +1 -1
  6. package/Common/DataModel/Plane.js +1 -1
  7. package/Common/DataModel/Polygon.js +1 -1
  8. package/Common/DataModel/Triangle.js +1 -1
  9. package/Common/Transform/LandmarkTransform.js +1 -1
  10. package/Filters/General/ImageMarchingCubes.js +1 -1
  11. package/Filters/General/MoleculeToRepresentation.js +1 -1
  12. package/Filters/General/TubeFilter.js +1 -1
  13. package/Filters/General/WindowedSincPolyDataFilter.js +1 -1
  14. package/Filters/Sources/CircleSource.js +1 -1
  15. package/Filters/Sources/LineSource.js +1 -1
  16. package/Filters/Sources/PlaneSource.js +1 -1
  17. package/Filters/Sources/PointSource.js +1 -1
  18. package/Filters/Texture/TextureMapToPlane.js +1 -1
  19. package/Filters/Texture/TextureMapToSphere.js +1 -1
  20. package/Interaction/Manipulators/KeyboardCameraManipulator.js +1 -1
  21. package/Interaction/Manipulators/MouseCameraAxisRotateManipulator.js +1 -1
  22. package/Interaction/Manipulators/MouseCameraTrackballPanManipulator.js +1 -1
  23. package/Interaction/Manipulators/MouseCameraTrackballRotateManipulator.js +1 -1
  24. package/Interaction/Manipulators/MouseCameraUnicamManipulator.js +1 -1
  25. package/Interaction/Manipulators/MouseCameraUnicamRotateManipulator.js +1 -1
  26. package/Interaction/Style/InteractorStyleMPRSlice.js +1 -1
  27. package/Interaction/Widgets/DistanceRepresentation.js +1 -1
  28. package/Interaction/Widgets/ImageCroppingRegionsRepresentation.js +1 -1
  29. package/Interaction/Widgets/ImageCroppingRegionsWidget.js +1 -1
  30. package/Interaction/Widgets/LabelRepresentation.js +1 -1
  31. package/Interaction/Widgets/ResliceCursor/ResliceCursor.js +1 -1
  32. package/Interaction/Widgets/ResliceCursor/ResliceCursorLineRepresentation.js +1 -1
  33. package/Interaction/Widgets/ResliceCursor/ResliceCursorRepresentation.js +1 -1
  34. package/Interaction/Widgets/SphereHandleRepresentation.js +1 -1
  35. package/Proxy/Core/View2DProxy.js +1 -1
  36. package/Rendering/Core/AnnotatedCubeActor.d.ts +3 -2
  37. package/Rendering/Core/Camera.js +1 -1
  38. package/Rendering/Core/CellPicker.js +1 -1
  39. package/Rendering/Core/Light.js +1 -1
  40. package/Rendering/Core/Picker.js +1 -1
  41. package/Rendering/Core/RenderWindowInteractor.js +27 -5
  42. package/Rendering/OpenGL/PolyDataMapper.js +1 -1
  43. package/Rendering/WebGPU/BufferManager.js +1 -1
  44. package/Rendering/WebGPU/VolumePass.js +332 -73
  45. package/Rendering/WebGPU/VolumePassFSQ.js +1 -1
  46. package/Widgets/Core/StateBuilder/orientationMixin.js +1 -1
  47. package/Widgets/Manipulators/LineManipulator.js +1 -1
  48. package/Widgets/Manipulators/TrackballManipulator.js +1 -1
  49. package/Widgets/Representations/PolyLineRepresentation.js +1 -1
  50. package/Widgets/Representations/ResliceCursorContextRepresentation.js +1 -1
  51. package/Widgets/Representations/WidgetRepresentation.js +1 -1
  52. package/Widgets/Widgets3D/AngleWidget.js +1 -1
  53. package/Widgets/Widgets3D/DistanceWidget.js +1 -1
  54. package/Widgets/Widgets3D/LineWidget/behavior.js +1 -1
  55. package/Widgets/Widgets3D/LineWidget/helpers.js +1 -1
  56. package/Widgets/Widgets3D/LineWidget.js +1 -1
  57. package/Widgets/Widgets3D/ResliceCursorWidget/behavior.js +1 -1
  58. package/Widgets/Widgets3D/ResliceCursorWidget/helpers.js +1 -1
  59. package/Widgets/Widgets3D/ResliceCursorWidget.js +1 -1
  60. package/Widgets/Widgets3D/ShapeWidget/behavior.js +1 -1
  61. package/macros.js +14 -30
  62. package/package.json +1 -1
@@ -3,7 +3,7 @@ import vtkAbstractWidgetFactory from '../Core/AbstractWidgetFactory.js';
3
3
  import vtkPlanePointManipulator from '../Manipulators/PlaneManipulator.js';
4
4
  import vtkPolyLineRepresentation from '../Representations/PolyLineRepresentation.js';
5
5
  import vtkSphereHandleRepresentation from '../Representations/SphereHandleRepresentation.js';
6
- import { f as distance2BetweenPoints } from '../../Common/Core/Math/index.js';
6
+ import { b as distance2BetweenPoints } from '../../Common/Core/Math/index.js';
7
7
  import widgetBehavior from './DistanceWidget/behavior.js';
8
8
  import generateState from './DistanceWidget/state.js';
9
9
  import { ViewTypes } from '../Core/WidgetManager/Constants.js';
@@ -2,7 +2,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
3
3
  import Constants from './Constants.js';
4
4
  import macro from '../../../macros.js';
5
- import { g as subtract, k as add, l as normalize } from '../../../Common/Core/Math/index.js';
5
+ import { c as subtract, f as add, g as normalize } from '../../../Common/Core/Math/index.js';
6
6
  import { getNumberOfPlacedHandles, isHandlePlaced, calculateTextPosition, updateTextPosition, getPoint } from './helpers.js';
7
7
 
8
8
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
@@ -1,4 +1,4 @@
1
- import { g as subtract, t as multiplyScalar, k as add, z as areEquals } from '../../../Common/Core/Math/index.js';
1
+ import { c as subtract, m as multiplyScalar, f as add, z as areEquals } from '../../../Common/Core/Math/index.js';
2
2
 
3
3
  function calculateTextPosition(model) {
4
4
  var vector = [0, 0, 0];
@@ -1,4 +1,4 @@
1
- import { f as distance2BetweenPoints } from '../../Common/Core/Math/index.js';
1
+ import { b as distance2BetweenPoints } from '../../Common/Core/Math/index.js';
2
2
  import macro from '../../macros.js';
3
3
  import generateState from './LineWidget/state.js';
4
4
  import vtkAbstractWidgetFactory from '../Core/AbstractWidgetFactory.js';
@@ -3,7 +3,7 @@ import macro from '../../../macros.js';
3
3
  import vtkBoundingBox from '../../../Common/DataModel/BoundingBox.js';
4
4
  import vtkLine from '../../../Common/DataModel/Line.js';
5
5
  import vtkPlanePointManipulator from '../../Manipulators/PlaneManipulator.js';
6
- import { t as multiplyScalar, g as subtract, l as normalize, d as dot, j as cross, Q as multiplyAccumulate, S as signedAngleBetweenVectors } from '../../../Common/Core/Math/index.js';
6
+ import { m as multiplyScalar, c as subtract, g as normalize, d as dot, e as cross, Q as multiplyAccumulate, S as signedAngleBetweenVectors } from '../../../Common/Core/Math/index.js';
7
7
  import { updateState, getAssociatedLinesName, boundPointOnPlane, rotateVector } from './helpers.js';
8
8
  import { InteractionMethodsName, ScrollingMethods } from './Constants.js';
9
9
 
@@ -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 { g as subtract, l as normalize, j as cross, Q as multiplyAccumulate, S as signedAngleBetweenVectors } from '../../../Common/Core/Math/index.js';
6
+ import { c as subtract, g as normalize, e as cross, Q 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
 
@@ -4,7 +4,7 @@ import vtkAbstractWidgetFactory from '../Core/AbstractWidgetFactory.js';
4
4
  import vtkPlane from '../../Common/DataModel/Plane.js';
5
5
  import vtkPlaneSource from '../../Filters/Sources/PlaneSource.js';
6
6
  import vtkResliceCursorContextRepresentation from '../Representations/ResliceCursorContextRepresentation.js';
7
- import { f as distance2BetweenPoints, Q as multiplyAccumulate, g as subtract, l as normalize, t as multiplyScalar, k as add } from '../../Common/Core/Math/index.js';
7
+ import { b as distance2BetweenPoints, Q as multiplyAccumulate, c as subtract, g as normalize, m as multiplyScalar, f as add } from '../../Common/Core/Math/index.js';
8
8
  import widgetBehavior from './ResliceCursorWidget/behavior.js';
9
9
  import generateState from './ResliceCursorWidget/state.js';
10
10
  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 { q as vtkMath } from '../../../Common/Core/Math/index.js';
4
+ import { l 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';
package/macros.js CHANGED
@@ -702,12 +702,7 @@ function algo(publicAPI, model, numberOfInputs, numberOfOutputs) {
702
702
  return model.inputConnection[port];
703
703
  }
704
704
 
705
- function addInputConnection(outputPort) {
706
- if (model.deleted) {
707
- vtkErrorMacro('instance deleted - cannot call any method');
708
- return;
709
- }
710
-
705
+ function getPortToFill() {
711
706
  var portToFill = model.numberOfInputs;
712
707
 
713
708
  while (portToFill && !model.inputData[portToFill - 1] && !model.inputConnection[portToFill - 1]) {
@@ -718,26 +713,25 @@ function algo(publicAPI, model, numberOfInputs, numberOfOutputs) {
718
713
  model.numberOfInputs++;
719
714
  }
720
715
 
721
- setInputConnection(outputPort, portToFill);
716
+ return portToFill;
722
717
  }
723
718
 
724
- function addInputData(dataset) {
719
+ function addInputConnection(outputPort) {
725
720
  if (model.deleted) {
726
721
  vtkErrorMacro('instance deleted - cannot call any method');
727
722
  return;
728
723
  }
729
724
 
730
- var portToFill = model.numberOfInputs;
731
-
732
- while (portToFill && !model.inputData[portToFill - 1] && !model.inputConnection[portToFill - 1]) {
733
- portToFill--;
734
- }
725
+ setInputConnection(outputPort, getPortToFill());
726
+ }
735
727
 
736
- if (portToFill === model.numberOfInputs) {
737
- model.numberOfInputs++;
728
+ function addInputData(dataset) {
729
+ if (model.deleted) {
730
+ vtkErrorMacro('instance deleted - cannot call any method');
731
+ return;
738
732
  }
739
733
 
740
- setInputData(dataset, portToFill);
734
+ setInputData(dataset, getPortToFill());
741
735
  }
742
736
 
743
737
  function getOutputData() {
@@ -757,15 +751,11 @@ function algo(publicAPI, model, numberOfInputs, numberOfOutputs) {
757
751
 
758
752
  publicAPI.shouldUpdate = function () {
759
753
  var localMTime = publicAPI.getMTime();
760
- var count = numberOfOutputs;
761
754
  var minOutputMTime = Infinity;
755
+ var count = numberOfOutputs;
762
756
 
763
757
  while (count--) {
764
- if (!model.output[count]) {
765
- return true;
766
- }
767
-
768
- if (model.output[count].isDeleted()) {
758
+ if (!model.output[count] || model.output[count].isDeleted()) {
769
759
  return true;
770
760
  }
771
761
 
@@ -783,15 +773,9 @@ function algo(publicAPI, model, numberOfInputs, numberOfOutputs) {
783
773
  count = model.numberOfInputs;
784
774
 
785
775
  while (count--) {
786
- if (model.inputConnection[count] && model.inputConnection[count].filter.shouldUpdate()) {
787
- return true;
788
- }
789
- }
776
+ var _model$inputConnectio, _publicAPI$getInputDa;
790
777
 
791
- count = model.numberOfInputs;
792
-
793
- while (count--) {
794
- if (publicAPI.getInputData(count) && publicAPI.getInputData(count).getMTime() > minOutputMTime) {
778
+ if ((_model$inputConnectio = model.inputConnection[count]) !== null && _model$inputConnectio !== void 0 && _model$inputConnectio.filter.shouldUpdate() || ((_publicAPI$getInputDa = publicAPI.getInputData(count)) === null || _publicAPI$getInputDa === void 0 ? void 0 : _publicAPI$getInputDa.getMTime()) > minOutputMTime) {
795
779
  return true;
796
780
  }
797
781
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitware/vtk.js",
3
- "version": "22.0.1",
3
+ "version": "22.1.2",
4
4
  "description": "Visualization Toolkit for the Web",
5
5
  "keywords": [
6
6
  "3d",