Skip to content

Commit 60d3608

Browse files
bruyeretfloryst
authored andcommitted
fix(ImageResliceMapper): Remove variable that prevented caching
Same issue as for the volume mapper in the commit : 2fadb43
1 parent 952a26f commit 60d3608

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

Diff for: Sources/Rendering/OpenGL/ImageResliceMapper/index.js

+2-8
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,7 @@ function vtkOpenGLImageResliceMapper(publicAPI, model) {
214214
let toString = `${image.getMTime()}A${scalars.getMTime()}`;
215215

216216
const tex = model._openGLRenderWindow.getGraphicsResourceForObject(scalars);
217-
const reBuildTex =
218-
!tex?.vtkObj ||
219-
tex?.hash !== toString ||
220-
model.openGLTextureString !== toString;
217+
const reBuildTex = !tex?.vtkObj || tex?.hash !== toString;
221218
if (reBuildTex) {
222219
if (!model.openGLTexture) {
223220
model.openGLTexture = vtkOpenGLTexture.newInstance();
@@ -237,17 +234,15 @@ function vtkOpenGLImageResliceMapper(publicAPI, model) {
237234
dims[2],
238235
scalars
239236
);
240-
model.openGLTextureString = toString;
241237
if (scalars) {
242238
model._openGLRenderWindow.setGraphicsResourceForObject(
243239
scalars,
244240
model.openGLTexture,
245-
model.openGLTextureString
241+
toString
246242
);
247243
}
248244
} else {
249245
model.openGLTexture = tex.vtkObj;
250-
model.openGLTextureString = tex.hash;
251246
}
252247

253248
const ppty = actor.getProperty();
@@ -1296,7 +1291,6 @@ const DEFAULT_VALUES = {
12961291
lastSlabTrapezoidIntegration: 0,
12971292
lastSlabType: -1,
12981293
openGLTexture: null,
1299-
openGLTextureString: null,
13001294
colorTextureString: null,
13011295
pwfTextureString: null,
13021296
resliceGeom: null,

Diff for: Sources/Rendering/OpenGL/VolumeMapper/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -1831,7 +1831,6 @@ const DEFAULT_VALUES = {
18311831
context: null,
18321832
VBOBuildTime: null,
18331833
scalarTexture: null,
1834-
scalarTextureString: null,
18351834
opacityTexture: null,
18361835
opacityTextureString: null,
18371836
colorTexture: null,

0 commit comments

Comments
 (0)