@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
|
-
|
|
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(
|
|
725
|
+
model.renderable.getClippingPlaneInDataCoords(mat, i, planeEquation);
|
|
717
726
|
|
|
718
727
|
for (var j = 0; j < 4; j++) {
|
|
719
728
|
planeEquations.push(planeEquation[j]);
|