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:
M.DandJoe Boccanfuso authored and GitHub committed 2023-09-06 09:24:17 -04:00
1 parent ef58893c27
commit 69115da06d
15 files changed
+355 -46

No files matched your search

@@ -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