From 5f29c739f7d3c40f36ed46e64e2f0bf8805913a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Bruy=C3=A8re?= Date: Wed, 2 Oct 2024 11:48:55 +0200 Subject: [PATCH] fix(VolumeMapper): Use the right volume property for texture creation --- Sources/Rendering/OpenGL/VolumeMapper/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Rendering/OpenGL/VolumeMapper/index.js b/Sources/Rendering/OpenGL/VolumeMapper/index.js index c47d8a3bb97..50e92eda5f2 100644 --- a/Sources/Rendering/OpenGL/VolumeMapper/index.js +++ b/Sources/Rendering/OpenGL/VolumeMapper/index.js @@ -1672,9 +1672,9 @@ function vtkOpenGLVolumeMapper(publicAPI, model) { model._colorTextureCore = colorTransferFunc; // rebuild scalarTextures? - model.currentValidInputs.forEach(({ imageData }, component) => { + model.currentValidInputs.forEach(({ imageData, inputIndex }, component) => { // rebuild the scalarTexture if the data has changed - const volumeProperty = volumeProperties[component]; + const volumeProperty = volumeProperties[inputIndex]; const scalars = imageData.getPointData().getScalars(); const tex = model._openGLRenderWindow.getGraphicsResourceForObject(scalars);