@kitware/vtk.js 22.5.9 → 22.5.10

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.
@@ -383,7 +383,17 @@ function vtkOpenGLImageMapper(publicAPI, model) {
383
383
 
384
384
  var image = model.currentInput;
385
385
  var w2imat4 = image.getWorldToIndex();
386
- mat4.multiply(model.imagematinv, w2imat4, actor.getMatrix());
386
+ var shiftScaleEnabled = cellBO.getCABO().getCoordShiftAndScaleEnabled();
387
+ var inverseShiftScaleMatrix = shiftScaleEnabled ? cellBO.getCABO().getInverseShiftAndScaleMatrix() : null;
388
+ var mat = inverseShiftScaleMatrix ? mat4.copy(model.imagematinv, actor.getMatrix()) : actor.getMatrix();
389
+
390
+ if (inverseShiftScaleMatrix) {
391
+ mat4.transpose(mat, mat);
392
+ mat4.multiply(mat, mat, inverseShiftScaleMatrix);
393
+ mat4.transpose(mat, mat);
394
+ }
395
+
396
+ mat4.multiply(model.imagematinv, mat, w2imat4);
387
397
  var planeEquations = [];
388
398
 
389
399
  for (var _i3 = 0; _i3 < numClipPlanes; _i3++) {
@@ -710,10 +710,19 @@ function vtkOpenGLPolyDataMapper(publicAPI, model) {
710
710
  // add all the clipping planes
711
711
  var numClipPlanes = model.renderable.getNumberOfClippingPlanes();
712
712
  var planeEquations = [];
713
+ var shiftScaleEnabled = cellBO.getCABO().getCoordShiftAndScaleEnabled();
714
+ var inverseShiftScaleMatrix = shiftScaleEnabled ? cellBO.getCABO().getInverseShiftAndScaleMatrix() : null;
715
+ var mat = inverseShiftScaleMatrix ? mat4.copy(model.tmpMat4, actor.getMatrix()) : actor.getMatrix();
716
+
717
+ if (inverseShiftScaleMatrix) {
718
+ mat4.transpose(mat, mat);
719
+ mat4.multiply(mat, mat, inverseShiftScaleMatrix);
720
+ mat4.transpose(mat, mat);
721
+ }
713
722
 
714
723
  for (var i = 0; i < numClipPlanes; i++) {
715
724
  var planeEquation = [];
716
- model.renderable.getClippingPlaneInDataCoords(actor.getMatrix(), i, planeEquation);
725
+ model.renderable.getClippingPlaneInDataCoords(mat, i, planeEquation);
717
726
 
718
727
  for (var j = 0; j < 4; j++) {
719
728
  planeEquations.push(planeEquation[j]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitware/vtk.js",
3
- "version": "22.5.9",
3
+ "version": "22.5.10",
4
4
  "description": "Visualization Toolkit for the Web",
5
5
  "keywords": [
6
6
  "3d",