Skip to content

Commit

Permalink
GPU rendering : reuse previously applied "voiRange" for the images th…
Browse files Browse the repository at this point in the history
…at are rendered on the reused viewport but new actor
  • Loading branch information
md-prog committed Oct 7, 2022
1 parent 6ffaee7 commit fd819ae
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/core/src/RenderingEngine/StackViewport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1765,6 +1765,15 @@ class StackViewport extends Viewport implements IStackViewport {
}

this.initialVOIRange = voiRange;

if (this.voiApplied && typeof voiRange === 'undefined') {
// There are some cases when different frames within the same multi-frame
// file are not hitting the actor cache because above
// this.__checkVTKImageDataMatchesCornerstoneImage() call results in
// "false".
// In that case we want to keep the applied VOI range.
voiRange = this.voiRange;
}
this.setProperties({ voiRange });

// At the moment it appears that vtkImageSlice actors do not automatically
Expand Down

0 comments on commit fd819ae

Please sign in to comment.