ohif-viewer/extensions/cornerstone/src/tools/utils/getToolAlias.js
Davide Punzo 5beb12a7fc
IDC (Re #1215): Feat/v2 annotations (#2658)
* 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>
2022-02-03 09:33:02 +01:00

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;
}