Skip to content

Commit

Permalink
fix(applyRenderedImage): Create a copy of the color range before sending
Browse files Browse the repository at this point in the history
Otherwise an Array reference is sent and all components end up with the
range of the last component.
  • Loading branch information
thewtex committed Feb 16, 2021
1 parent 5c5dbfb commit 7a51b03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Rendering/VTKJS/Images/applyRenderedImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ function applyRenderedImage(context, event) {
return
}
const dataArray = actorContext.fusedImage.getPointData().getScalars()
const range = dataArray.getRange(fusedImageIndex)
const range = dataArray.getRange(fusedImageIndex).slice()
if (!actorContext.colorRangeBounds.has(componentIndex)) {
context.service.send({
type: 'IMAGE_COLOR_RANGE_BOUNDS_CHANGED',
Expand Down

0 comments on commit 7a51b03

Please sign in to comment.