Closed dusunax closed 1 year ago
const handleKeyDown = (event: KeyboardEvent) => { if (event.key === "ArrowLeft") { setImageIndex((prevIndex) => { const newIndex = prevIndex > 0 ? prevIndex - 1 : prevIndex; return newIndex; }); } else if (event.key === "ArrowRight") { setImageIndex((prevIndex) => { const newIndex = prevIndex + 1 < itemSrcArray.length ? prevIndex + 1 : prevIndex; return newIndex; }); } else if (event.key === "ArrowUp") { event.preventDefault(); setImageIndex((prevIndex) => { const newIndex = prevIndex - rowLimit + 1 > 0 ? prevIndex - rowLimit : prevIndex; return newIndex; }); } else if (event.key === "ArrowDown") { event.preventDefault(); setImageIndex((prevIndex) => { const newIndex = prevIndex + rowLimit < itemSrcArray.length ? prevIndex + rowLimit : prevIndex; return newIndex; }); } };
roate tool
scale overlay
/** λꡬ λΉνμ±ν */ const setDeactivateToolByIndex = (index: number, tools: Tool[]): void => { cornerstoneTools.setToolPassive(tools[index].name); }; /** overlay ν κΈ */ const overlayToggleHandler = () => { if (overlayToggle) { setDeactivateToolByIndex(0, OVERLAY_TOOLS); } else { setToolsByIndex(0, OVERLAY_TOOLS, -1); } setOverlayToggle(!overlayToggle); };
GUI
destroy()
return () => { renderer && renderer.dispose(); GUIRef.current?.destroy(); };
230628 - Bugfix & Improve DICOM viewer feature
π Works μμ λ΄μ©
[feat] Improve DICOM viewer feature.
[bugfix] remove the three GUI when leave 3D route.
[feat] Improve DICOM viewer feature. π
Keyboard indexing
Organizing Tools
roate tool
,scale overlay
[bugfix] remove the three GUI when leave 3D route. π
GUI
in a ref, and cleanup usingdestroy()
method when unmount (leave 3D route).