Skip to content

Commit

Permalink
fix(windowLevel): should not double scale for window level
Browse files Browse the repository at this point in the history
  • Loading branch information
sedghi committed May 18, 2023
1 parent 83f2cca commit 8c6f869
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const prodConfig = {
path: outputPath,
libraryTarget: 'umd',
globalObject: 'this',
filename: '[name].js',
filename: '[name].min.js',
clean: true,
},
optimization: {
Expand Down
4 changes: 2 additions & 2 deletions packages/dicomImageLoader/src/imageLoader/createImage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,8 @@ function createImage(

// set the ww/wc to cover the dynamic range of the image if no values are supplied
if (image.windowCenter === undefined || image.windowWidth === undefined) {
const maxVoi = image.maxPixelValue * image.slope + image.intercept;
const minVoi = image.minPixelValue * image.slope + image.intercept;
const minVoi = image.imageFrame.minAfterScale;
const maxVoi = image.imageFrame.maxAfterScale;

image.windowWidth = maxVoi - minVoi;
image.windowCenter = (maxVoi + minVoi) / 2;
Expand Down

0 comments on commit 8c6f869

Please sign in to comment.