feat(ImageOverlayViewerTool): add ImageOverlayViewer tool that can render image overlay (pixel overlay) of the DICOM images (#3163)
Co-authored-by: Joe Boccanfuso <joe.boccanfuso@radicalimaging.com>
This commit is contained in:
1 parent
ef58893c27
commit
69115da06d
15 files changed
+355
-46
No files matched your search
@@ -50,7 +50,7 @@
|
||||
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
|
||||
"@cornerstonejs/codec-openjpeg": "^1.2.2",
|
||||
"@cornerstonejs/codec-openjph": "^2.4.2",
|
||||
"@cornerstonejs/dicom-image-loader": "^1.11.4",
|
||||
"@cornerstonejs/dicom-image-loader": "^1.13.2",
|
||||
"@ohif/core": "3.7.0-beta.64",
|
||||
"@ohif/extension-cornerstone": "3.7.0-beta.64",
|
||||
"@ohif/extension-cornerstone-dicom-rt": "3.7.0-beta.64",
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
|
||||
"@cornerstonejs/codec-openjpeg": "^1.2.2",
|
||||
"@cornerstonejs/codec-openjph": "^2.4.2",
|
||||
"@cornerstonejs/dicom-image-loader": "^1.11.4",
|
||||
"@cornerstonejs/dicom-image-loader": "^1.13.2",
|
||||
"@ohif/ui": "3.7.0-beta.64",
|
||||
"cornerstone-math": "0.1.9",
|
||||
"dicom-parser": "^1.8.21"
|
||||
|
||||
@@ -265,11 +265,26 @@ export default class ToolbarService extends PubSubService {
|
||||
if (!this.buttons[button.id]) {
|
||||
this.buttons[button.id] = button;
|
||||
}
|
||||
this._setTogglesForButtonItems(button.props?.items);
|
||||
});
|
||||
|
||||
this._broadcastEvent(this.EVENTS.TOOL_BAR_MODIFIED, {});
|
||||
}
|
||||
|
||||
_setTogglesForButtonItems(buttonItems) {
|
||||
if (!buttonItems) {
|
||||
return;
|
||||
}
|
||||
|
||||
buttonItems.forEach(buttonItem => {
|
||||
if (buttonItem.type === 'toggle') {
|
||||
this.state.toggles[buttonItem.id] = buttonItem.isActive;
|
||||
} else {
|
||||
this._setTogglesForButtonItems(buttonItem.props?.items);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {*} btn
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="25px" height="25px" viewBox="0 0 25 25" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>toggle-dicom-overlay</title>
|
||||
<g id="toggle-dicom-overlay" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<path d="M19.5629346,17.375 C19.9081126,17.375 20.1879346,17.654822 20.1879346,18 C20.1879346,18.345178 19.9081126,18.625 19.5629346,18.625 L18.2129346,18.625 C17.8677566,18.625 17.5879346,18.345178 17.5879346,18 C17.5879346,17.654822 17.8677566,17.375 18.2129346,17.375 L19.5629346,17.375 Z M15.4829346,17.375 C15.8281125,17.375 16.1079346,17.654822 16.1079346,18 C16.1079346,18.345178 15.8281125,18.625 15.4829346,18.625 L14.1329346,18.625 C13.7877566,18.625 13.5079346,18.345178 13.5079346,18 C13.5079346,17.654822 13.7877566,17.375 14.1329346,17.375 L15.4829346,17.375 Z M11.4029345,17.375 C11.7481125,17.375 12.0279345,17.654822 12.0279345,18 C12.0279345,18.345178 11.7481125,18.625 11.4029345,18.625 L10.0529345,18.625 C9.70775654,18.625 9.42793451,18.345178 9.42793451,18 C9.42793451,17.654822 9.70775654,17.375 10.0529345,17.375 L11.4029345,17.375 Z M6.98988002,15.409041 C7.33501017,15.4032959 7.61945075,15.6784219 7.62519584,16.023552 C7.63057519,16.3467108 7.74731641,16.6500986 7.95299373,16.8913531 C8.17693365,17.1540292 8.14553176,17.5485095 7.88285564,17.7724494 C7.62017952,17.9963893 7.22569928,17.9649874 7.00175936,17.7023113 C6.60957687,17.2422907 6.38562164,16.6602745 6.37536899,16.0443568 C6.3696239,15.6992267 6.64474986,15.4147861 6.98988002,15.409041 Z M22,14.7935328 C22.345178,14.7935328 22.625,15.0733548 22.625,15.4185328 L22.625,16 C22.625,16.3431799 22.5587904,16.678203 22.431654,16.9901793 C22.3013887,17.3098335 21.936657,17.4633635 21.6170028,17.3330982 C21.2973486,17.2028329 21.1438186,16.8381012 21.2740839,16.518447 C21.3404391,16.3556197 21.375,16.1807405 21.375,16 L21.375,15.4185328 C21.375,15.0733548 21.654822,14.7935328 22,14.7935328 Z M7,11.3294019 C7.34517797,11.3294019 7.625,11.6092239 7.625,11.9544019 L7.625,13.3044019 C7.625,13.6495799 7.34517797,13.9294019 7,13.9294019 C6.65482203,13.9294019 6.375,13.6495799 6.375,13.3044019 L6.375,11.9544019 C6.375,11.6092239 6.65482203,11.3294019 7,11.3294019 Z M22,10.7135328 C22.345178,10.7135328 22.625,10.9933548 22.625,11.3385328 L22.625,12.6885328 C22.625,13.0337107 22.345178,13.3135328 22,13.3135328 C21.654822,13.3135328 21.375,13.0337107 21.375,12.6885328 L21.375,11.3385328 C21.375,10.9933548 21.654822,10.7135328 22,10.7135328 Z M7,7.24940184 C7.34517797,7.24940184 7.625,7.52922387 7.625,7.87440184 L7.625,9.22440186 C7.625,9.56957983 7.34517797,9.84940186 7,9.84940186 C6.65482203,9.84940186 6.375,9.56957983 6.375,9.22440186 L6.375,7.87440184 C6.375,7.52922387 6.65482203,7.24940184 7,7.24940184 Z M22,6.63353271 C22.345178,6.63353271 22.625,6.91335474 22.625,7.25853271 L22.625,8.60853274 C22.625,8.95371071 22.345178,9.23353274 22,9.23353274 C21.654822,9.23353274 21.375,8.95371071 21.375,8.60853274 L21.375,7.25853271 C21.375,6.91335474 21.654822,6.63353271 22,6.63353271 Z M6.85203131,3.49078232 C7.05066164,3.20848137 7.44053346,3.14065293 7.72283441,3.33928326 C8.00513536,3.53791358 8.0729638,3.92778541 7.87433347,4.21008635 C7.71277357,4.43970142 7.625,4.71244835 7.625,5 L7.625,5.14440182 C7.625,5.48957979 7.34517797,5.76940182 7,5.76940182 C6.65482203,5.76940182 6.375,5.48957979 6.375,5.14440182 L6.375,5 C6.375,4.45283578 6.54347711,3.92931124 6.85203131,3.49078232 Z M20.6742845,3.01542222 C20.8779596,2.73673907 21.2689882,2.67593301 21.5476713,2.87960808 C22.037257,3.23742093 22.3909544,3.7550285 22.5426114,4.34556314 C22.6284714,4.67989214 22.4270475,5.02052267 22.0927185,5.10638272 C21.7583895,5.19224277 21.417759,4.99081889 21.331899,4.65648989 C21.2527262,4.3482005 21.0672181,4.07672435 20.8100986,3.88880903 C20.5314155,3.68513396 20.4706094,3.29410536 20.6742845,3.01542222 Z M10.35,2.375 C10.695178,2.375 10.975,2.65482203 10.975,3 C10.975,3.34517797 10.695178,3.625 10.35,3.625 L9,3.625 C8.65482203,3.625 8.375,3.34517797 8.375,3 C8.375,2.65482203 8.65482203,2.375 9,2.375 L10.35,2.375 Z M14.4300001,2.375 C14.775178,2.375 15.0550001,2.65482203 15.0550001,3 C15.0550001,3.34517797 14.775178,3.625 14.4300001,3.625 L13.08,3.625 C12.7348221,3.625 12.455,3.34517797 12.455,3 C12.455,2.65482203 12.7348221,2.375 13.08,2.375 L14.4300001,2.375 Z M18.5100001,2.375 C18.8551781,2.375 19.1350001,2.65482203 19.1350001,3 C19.1350001,3.34517797 18.8551781,3.625 18.5100001,3.625 L17.1600001,3.625 C16.8148221,3.625 16.5350001,3.34517797 16.5350001,3 C16.5350001,2.65482203 16.8148221,2.375 17.1600001,2.375 L18.5100001,2.375 Z" id="Rectangle" fill="currentColor" fill-rule="nonzero" transform="translate(14.5, 10.5) rotate(180) translate(-14.5, -10.5)"></path>
|
||||
<path d="M4.1678365,7.5 L3.5,7.5 C2.3954305,7.5 1.5,8.3954305 1.5,9.5 L1.5,20.5 C1.5,21.6045695 2.3954305,22.5 3.5,22.5 L14.5,22.5 C15.6045695,22.5 16.5,21.6045695 16.5,20.5 L16.5,20.3293874 L16.5,20.3293874" id="Path-9" stroke="currentColor" stroke-width="1.25" stroke-linecap="round"></path>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.0 KiB |
@@ -80,6 +80,7 @@ import notificationsError from './../../assets/icons/notifications-error.svg';
|
||||
import notificationsSuccess from './../../assets/icons/notifications-success.svg';
|
||||
|
||||
/** Tools */
|
||||
import toggleDicomOverlay from './../../assets/icons/toggle-dicom-overlay.svg';
|
||||
import toolZoom from './../../assets/icons/tool-zoom.svg';
|
||||
import toolCapture from './../../assets/icons/tool-capture.svg';
|
||||
import toolLayout from './../../assets/icons/tool-layout.svg';
|
||||
@@ -209,6 +210,7 @@ const ICONS = {
|
||||
'notifications-warning': notificationsWarning,
|
||||
|
||||
/** Tools */
|
||||
'toggle-dicom-overlay': toggleDicomOverlay,
|
||||
'tool-zoom': toolZoom,
|
||||
'tool-capture': toolCapture,
|
||||
'tool-layout': toolLayout,
|
||||
|
||||
Reference in new issue
Block a user