feat(measurements): add CircleROI Tool (#3211)

* [refactor] measurement service mapping files - rename to .ts files

* [fix] RectangleROI - measurement service mapping _getReport() function - tool name fix

* [feat] added CircleROI tool from updated cornerstone3D

* [refactor] fix for typescript strong typing warnings

* [feat] cornerstone-dicom-sr extension - added CircleROI tool

* [feat] added toolbar button for CircleROI tool

* [doc] doc updates for CircleROI tool

* [update] library - dcmjs to 0.29.5

* [fix] roundNumber() function when given strings

* [fix] refactor after upgrading conerstonejs library 0.49.0

* yarn.lock file change
This commit is contained in:
M.D authored and GitHub committed 2023-04-17 08:23:03 -04:00
1 parent 83b4606357
commit 47c25f4364
35 files changed
+412 -69

No files matched your search

+1 -1
View File
@@ -37,7 +37,7 @@
},
"dependencies": {
"@babel/runtime": "^7.20.13",
"dcmjs": "^0.29.4",
"dcmjs": "^0.29.5",
"dicomweb-client": "^0.8.4",
"isomorphic-base64": "^1.0.2",
"lodash.merge": "^4.6.1",
+5 -1
View File
@@ -1,5 +1,9 @@
/**
* @param {string | number} value
* @param {number} decimals
*/
function _round(value, decimals) {
return Number(value.toFixed(decimals));
return Number(value).toFixed(decimals);
}
export default _round;
@@ -184,6 +184,16 @@ to create `MeasurementTools` nested button
toolName: 'EllipticalRoi',
}
},
// Circle tool
{
id: 'CircleROI',
icon: 'tool-circle',
label: 'Circle',
type: 'tool',
commandOptions: {
toolName: 'CircleROI',
}
},
],
},
}
@@ -210,6 +210,16 @@ to create `MeasurementTools` nested button
toolName: 'EllipticalRoi',
}
},
// Circle tool
{
id: 'CircleROI',
icon: 'tool-circle',
label: 'Circle',
type: 'tool',
commandOptions: {
toolName: 'CircleROI',
}
},
],
},
}
@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<circle stroke="currentColor" fill="none" stroke-width="2" cx="16" cy="16" r="14" />
</svg>

After

Width:  |  Height:  |  Size: 157 B

@@ -81,6 +81,7 @@ import toolWindow from './../../assets/icons/tool-window-level.svg';
import toolAnnotate from './../../assets/icons/tool-annotate.svg';
import toolBidirectional from './../../assets/icons/tool-bidirectional.svg';
import toolElipse from './../../assets/icons/tool-elipse.svg';
import toolCircle from './../../assets/icons/tool-circle.svg';
import toolLength from './../../assets/icons/tool-length.svg';
import toolStackScroll from './../../assets/icons/tool-stack-scroll.svg';
import toolMagnify from './../../assets/icons/tool-magnify.svg';
@@ -199,6 +200,7 @@ const ICONS = {
'tool-annotate': toolAnnotate,
'tool-bidirectional': toolBidirectional,
'tool-elipse': toolElipse,
'tool-circle': toolCircle,
'tool-length': toolLength,
'tool-stack-scroll': toolStackScroll,
'tool-magnify': toolMagnify,
+1 -1
View File
@@ -66,7 +66,7 @@
"core-js": "^3.16.1",
"cornerstone-math": "^0.1.9",
"cornerstone-wado-image-loader": "^4.13.0",
"dcmjs": "^0.29.4",
"dcmjs": "^0.29.5",
"detect-gpu": "^4.0.16",
"dicom-parser": "^1.8.9",
"dotenv-webpack": "^1.7.0",