Fix the pixel spacing issue with bidirectional tool
This commit is contained in:
1 parent
2bd1db7710
commit
b6092ca759
2 files changed
+32
-7
No files matched your search
+13
-1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user