diff --git a/patches/@kitware+vtk.js+38.0.4.patch b/patches/@kitware+vtk.js+38.0.4.patch index a5f898acc..746d58b1f 100644 --- a/patches/@kitware+vtk.js+38.0.4.patch +++ b/patches/@kitware+vtk.js+38.0.4.patch @@ -11,3 +11,15 @@ index ba92841..a59d269 100644 const background = model.renderable.getBackgroundByReference(); gl.clearColor(background[0], background[1], background[2], background[3]); clearMask |= gl.COLOR_BUFFER_BIT; +diff --git a/node_modules/@kitware/vtk.js/Rendering/OpenGL/VolumeMapper.js b/node_modules/@kitware/vtk.js/Rendering/OpenGL/VolumeMapper.js +--- a/node_modules/@kitware/vtk.js/Rendering/OpenGL/VolumeMapper.js ++++ b/node_modules/@kitware/vtk.js/Rendering/OpenGL/VolumeMapper.js +@@ -868,7 +868,7 @@ + const reBuildTex = !tex?.oglObject?.getHandle() || tex?.hash !== scalarsHash; + const updatedExtents = volumeProperty.getUpdatedExtents(); + const hasUpdatedExtents = !!updatedExtents.length; +- if (reBuildTex && !hasUpdatedExtents) { ++ if (reBuildTex && (!hasUpdatedExtents || !tex?.oglObject?.getHandle())) { + const newScalarTexture = Texture_default.newInstance(); + newScalarTexture.setOpenGLRenderWindow(model._openGLRenderWindow); + const dims = imageData.getDimensions(); diff --git a/src/components/VolumePresets.vue b/src/components/VolumePresets.vue index d5f78d978..f09db7176 100644 --- a/src/components/VolumePresets.vue +++ b/src/components/VolumePresets.vue @@ -1,15 +1,19 @@