Allowing customization on scale bars overlay
This commit is contained in:
parent
3a36c89fd4
commit
5923a6bff5
@ -1,3 +1,12 @@
|
|||||||
|
import { OHIF } from 'meteor/ohif:core';
|
||||||
|
|
||||||
|
OHIF.cornerstone.scaleOverlaySettings = {
|
||||||
|
color: 'white',
|
||||||
|
lineWidth: 2,
|
||||||
|
shadowColor: 'black',
|
||||||
|
shadowBlur: 4
|
||||||
|
};
|
||||||
|
|
||||||
function drawLine(context, startPoint, endPoint, config) {
|
function drawLine(context, startPoint, endPoint, config) {
|
||||||
context.moveTo(startPoint.x, startPoint.y);
|
context.moveTo(startPoint.x, startPoint.y);
|
||||||
context.lineTo(endPoint.x, endPoint.y);
|
context.lineTo(endPoint.x, endPoint.y);
|
||||||
@ -195,10 +204,7 @@ function onImageRendered(e, eventData) {
|
|||||||
y: hscaleBounds.bottomRight.y
|
y: hscaleBounds.bottomRight.y
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
color: 'white', // TODO: fix this later
|
...OHIF.cornerstone.scaleOverlaySettings
|
||||||
lineWidth: cornerstoneTools.toolStyle.getToolWidth(),
|
|
||||||
shadowColor: 'black',
|
|
||||||
shadowBlur: 4
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const context = eventData.enabledElement.canvas.getContext('2d');
|
const context = eventData.enabledElement.canvas.getContext('2d');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user