diff --git a/dicom-viewer/index.html b/dicom-viewer/index.html index d878f56..01942b1 100644 --- a/dicom-viewer/index.html +++ b/dicom-viewer/index.html @@ -7,7 +7,8 @@ Vite + React + TS -
+
+
diff --git a/dicom-viewer/src/App.tsx b/dicom-viewer/src/App.tsx index c618389..c2ac9bf 100644 --- a/dicom-viewer/src/App.tsx +++ b/dicom-viewer/src/App.tsx @@ -65,8 +65,6 @@ const { MouseBindings, KeyboardBindings } = csToolsEnums; const { IMAGE_RENDERED } = Enums.Events; -const STACK_TOOL_GROUP_ID = 'STACK_TOOL_GROUP_ID'; -const VOLUME_TOOL_GROUP_ID = 'VOLUME_TOOL_GROUP_ID'; const MAIN_TOOL_GROUP_ID = 'MAIN_TOOL_GROUP_ID'; // Common CT presets (add more as needed) @@ -121,7 +119,6 @@ const ALL_MOUSE_BINDINGS = [ // App definintion function App() { const elementRef = useRef(null) - const viewportRef = useRef(null) // Store the viewport instance const running = useRef(false) // State to control preset menu open/close @@ -131,13 +128,6 @@ function App() { const [fullscreenHoverIdx, setFullscreenHoverIdx] = useState(null); const [openDropdownIdx, setOpenDropdownIdx] = useState(null); - // State for overlay info - const [imageInfo, setImageInfo] = useState({ - index: 0, - total: 0, - windowCenter: "", - windowWidth: "", - }) const MAX_VIEWPORTS = 9; const renderingEngineId = "mainRenderingEngine"; diff --git a/dicom-viewer/src/main.tsx b/dicom-viewer/src/main.tsx index 1be872b..2bf0688 100644 --- a/dicom-viewer/src/main.tsx +++ b/dicom-viewer/src/main.tsx @@ -1,12 +1,19 @@ import React from 'react' +import { createRoot } from "react-dom/client"; import ReactDOM from 'react-dom/client' import App from './App.tsx' import Nifti from './Nifti.tsx' import './index.css' -ReactDOM.createRoot(document.getElementById('root')!).render( - - - {/* */} - , -) +//ReactDOM.createRoot(document.getElementById('root')!).render( +// +// +// {/* */} +// , +//) + +// Render to multiple containers +const containers = document.querySelectorAll(".dicom-viewer-root"); +containers.forEach((container) => { + createRoot(container).render(); +}); \ No newline at end of file