Skip to content

Commit

Permalink
fix: monochrome1 bug for stackviewport
Browse files Browse the repository at this point in the history
  • Loading branch information
sedghi committed Jan 20, 2023
1 parent 02495c6 commit 56b709f
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 56b709f

Please sign in to comment.