Skip to content

Commit

Permalink
fix: monochrome1 bug for stackviewport (#378)
Browse files Browse the repository at this point in the history
  • Loading branch information
sedghi authored Jan 20, 2023
1 parent 36aaad0 commit f542d9c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/core/src/RenderingEngine/StackViewport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1806,6 +1806,13 @@ class StackViewport extends Viewport implements IStackViewport {
cfun.addRGBPoint(upper, 1.0, 1.0, 1.0);
actor.getProperty().setRGBTransferFunction(0, cfun);

let invert = false;
if (imagePixelModule.photometricInterpretation === 'MONOCHROME1') {
invert = true;
}

this.setProperties({ invert });

// Saving position of camera on render, to cache the panning
const { focalPoint } = this.getCamera();
this.cameraFocalPointOnRender = focalPoint;
Expand Down

0 comments on commit f542d9c

Please sign in to comment.