feat(segmentation): Enhance Segmentation Tools with Preview and Selection Features (#4870)

This commit is contained in:
Alireza authored and GitHub committed 2025-03-19 18:24:33 -04:00
1 parent 20042f9109
commit 5f112337b6
24 files changed
+392 -236

No files matched your search

@@ -2,7 +2,7 @@ import React from 'react';
import { useNavigate, useLocation } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
import { Header, useModal } from '@ohif/ui-next';
import { Button, Header, Icons, useModal } from '@ohif/ui-next';
import { useSystem } from '@ohif/core';
import { Toolbar } from '../Toolbar/Toolbar';
import HeaderPatientInfo from './HeaderPatientInfo';
@@ -10,7 +10,7 @@ import { PatientInfoVisibility } from './HeaderPatientInfo/HeaderPatientInfo';
import { preserveQueryParameters, publicUrl } from '@ohif/app';
function ViewerHeader({ appConfig }: withAppTypes<{ appConfig: AppTypes.Config }>) {
const { servicesManager, extensionManager } = useSystem();
const { servicesManager, extensionManager, commandsManager } = useSystem();
const { customizationService } = servicesManager.services;
const navigate = useNavigate();
@@ -94,6 +94,28 @@ function ViewerHeader({ appConfig }: withAppTypes<{ appConfig: AppTypes.Config }
/>
)
}
UndoRedo={
<div className="text-primary-active flex cursor-pointer items-center">
<Button
variant="ghost"
className="hover:bg-primary-dark"
onClick={() => {
commandsManager.run('undo');
}}
>
<Icons.Undo className="" />
</Button>
<Button
variant="ghost"
className="hover:bg-primary-dark"
onClick={() => {
commandsManager.run('redo');
}}
>
<Icons.Redo className="" />
</Button>
</div>
}
>
<div className="relative flex justify-center gap-[4px]">
<Toolbar servicesManager={servicesManager} />