feat(4D): Add 4D dynamic volume rendering and new pre-clinical 4d pt/ct mode (#3664)

Co-authored-by: Alireza <ar.sedghi@gmail.com>
Co-authored-by: Neil <neil.a.macphee@gmail.com>
This commit is contained in:
authored and GitHub committed 2024-04-09 23:57:34 -04:00
1 parent dc0b183dd4
commit d57e8bc157
200 files changed
+9589 -2178

No files matched your search

@@ -68,7 +68,7 @@ export default class ToolbarService extends PubSubService {
}
public reset(): void {
this.unsubscriptions.forEach(unsub => unsub());
// this.unsubscriptions.forEach(unsub => unsub());
this.state = {
buttons: {},
buttonSections: {},
@@ -120,6 +120,10 @@ export default class ToolbarService extends PubSubService {
public addButtons(buttons: Button[]): void {
buttons.forEach(button => {
if (!this.state.buttons[button.id]) {
if (!button.props) {
button.props = {};
}
this.state.buttons[button.id] = button;
}
});
@@ -350,6 +354,7 @@ export default class ToolbarService extends PubSubService {
* @param {Array} buttons - The buttons to be added to the section.
*/
createButtonSection(key, buttons) {
// make sure all buttons have at least an empty props
this.state.buttonSections[key] = buttons;
this._broadcastEvent(this.EVENTS.TOOL_BAR_MODIFIED, { ...this.state });
}