2026-05-24-22-40-13 新增自动微调匹配工作区

This commit is contained in:
2026-05-24 23:13:34 +08:00
parent 3d732ec898
commit bca3619b9b
12 changed files with 1286 additions and 4 deletions

View File

@@ -17,6 +17,7 @@ import {
FlipHorizontal2,
FlipVertical2,
Move3d,
Crosshair,
} from 'lucide-react';
import * as THREE from 'three';
import { DicomFusionVolume, DicomPreview, ModelPose, ModuleStyle, Project, SavedModelPose } from '../types';
@@ -2782,9 +2783,11 @@ export function VoxelizationMappingView({
export default function ReverseWorkspace({
projectId,
onLeaveGuardChange,
onAutoMatch,
}: {
projectId: string;
onLeaveGuardChange?: (handler: WorkspaceLeaveGuard | null) => void;
onAutoMatch?: (projectId: string, pose: ModelPose) => void;
}) {
const [sliceStart, setSliceStart] = useState(0);
const [sliceEnd, setSliceEnd] = useState(49);
@@ -3732,6 +3735,14 @@ export default function ReverseWorkspace({
{!project && <p className="text-sm text-slate-500"> DICOM </p>}
</div>
<div className="flex gap-2">
<button
onClick={() => project && onAutoMatch?.(project.id, modelPose)}
disabled={!project}
className="bg-indigo-600 text-white px-5 py-2.5 rounded-xl text-sm font-semibold hover:bg-indigo-700 transition-all shadow-lg flex items-center gap-2 disabled:opacity-50"
>
<Crosshair size={18} />
</button>
<button
onClick={() => void handleSaveSegmentationResult()}
disabled={!project}