* Add scoord3d parse / display tool to v2 * Update measurement panel with sr measurements * Update measurement panel to display read only items * Cleanup debugger statement * Check for empty measurement * fix SCOORD3D coordinates * Update getRenderableData.js * fix scoord3d coordinate transformation * implement logic to detect the ReferencedSOPInstanceUID if missing in the measurement. Fix also world to IJ coordinates. * Fix broken unit test / import * fix comment style * Init tools only once * restore default config dcmjs server Co-authored-by: igoroctaviano <igoroctaviano@gmail.com>
33 lines
656 B
JavaScript
33 lines
656 B
JavaScript
/**
|
|
* Get cornerstone tool alias.
|
|
*
|
|
* @param {string} toolName
|
|
* @returns tool alias
|
|
*/
|
|
export default function getToolAlias(toolName) {
|
|
let toolAlias = toolName;
|
|
|
|
switch (toolName) {
|
|
case 'Length':
|
|
toolAlias = 'SRLength';
|
|
break;
|
|
case 'Bidirectional':
|
|
toolAlias = 'SRBidirectional';
|
|
break;
|
|
case 'ArrowAnnotate':
|
|
toolAlias = 'SRArrowAnnotate';
|
|
break;
|
|
case 'EllipticalRoi':
|
|
toolAlias = 'SREllipticalRoi';
|
|
break;
|
|
case 'FreehandRoi':
|
|
toolAlias = 'SRFreehandRoi';
|
|
break;
|
|
case 'RectangleRoi':
|
|
toolAlias = 'SRRectangleRoi';
|
|
break;
|
|
}
|
|
|
|
return toolAlias;
|
|
}
|