Skip to content

Commit

Permalink
fix #316 (#319)
Browse files Browse the repository at this point in the history
* fix #316

in https://github.com/cornerstonejs/cornerstoneWADOImageLoader/blob/master/src/imageLoader/wadouri/metaData/metaDataProvider.js#L43-L44

we set columnPixelSpacing and rowPixelSpacing to null, therefore we need to also check that they are null here ..

* Update getImageFitScale.js

Co-authored-by: Erik Ziegler <[email protected]>
  • Loading branch information
kofifus and swederik authored Sep 13, 2021
1 parent 4468b1b commit 7acd99a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/internal/getDefaultViewport.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ export default function (canvas, image) {
x: image.columns,
y: image.rows
},
rowPixelSpacing: image.rowPixelSpacing === undefined ? 1 : image.rowPixelSpacing,
columnPixelSpacing: image.columnPixelSpacing === undefined ? 1 : image.columnPixelSpacing,
rowPixelSpacing: image.rowPixelSpacing === undefined || image.rowPixelSpacing === null ? 1 : image.rowPixelSpacing,
columnPixelSpacing: image.columnPixelSpacing === undefined || image.columnPixelSpacing === null ? 1 : image.columnPixelSpacing,
presentationSizeMode: 'NONE'
}
};
Expand Down

0 comments on commit 7acd99a

Please sign in to comment.