Fix the pixel spacing issue with bidirectional tool

This commit is contained in:
Evren Ozkan committed 2018-04-04 18:08:01 -04:00
1 parent 2bd1db7710
commit b6092ca759
2 files changed
+32 -7

No files matched your search

@@ -10,8 +10,20 @@ export default function(mouseEventData) {
const { element } = mouseEventData;
const $element = $(element);
const imagePlane = cornerstone.metaData.get('imagePlaneModule', mouseEventData.image.imageId);
let rowPixelSpacing;
let colPixelSpacing;
if (imagePlane) {
rowPixelSpacing = imagePlane.rowPixelSpacing || imagePlane.rowImagePixelSpacing;
colPixelSpacing = imagePlane.columnPixelSpacing || imagePlane.colImagePixelSpacing;
} else {
rowPixelSpacing = mouseEventData.image.rowPixelSpacing;
colPixelSpacing = mouseEventData.image.columnPixelSpacing;
}
// LT-29 Disable Target Measurements when pixel spacing is not available
if (!mouseEventData.image.rowPixelSpacing || !mouseEventData.image.columnPixelSpacing) {
if (!rowPixelSpacing || !colPixelSpacing) {
return;
}