import StackOfImages from "../render/StackOfImages";
import StackOfImagesWithChangeIndex from "../render/StackOfImagesWithChangeIndex";
import StackOfImagesWithPanAndRotate from "../render/StackOfImagesWithPanAndRotate";
import StackOfImagesWithToolsBox from "../render/StackOfImagesWithToolsBox";
1. change `setImageIndex` function from `src\example\render\StackOfImages.tsx` to Stack Scroll MouseWheel Tool.
2. fix `element not enabled` error at first loading.
ERROR: SharedArrayBuffer is NOT supported in your browser. #3
and my goal is implement the level 2 by this weekend. so skip 3D volume part and proceed directly to Level 2. => Instead of using calculated 3D volume data, use an exported .ply file.
230603 - Refactor Components and Hook, Finish Tool Selection Box
π Works μμ λ΄μ©
1. Refactor Example Component & Custom Hook.
src\example\ExampleComponent.tsx
src\example\components\CurrentTabComponent.tsx
src\example\components\TabNavigation.tsx
src\example\hooks\useCornerstone.ts
2. Finish to build tools select box.
src\example\render\StackOfImagesWithToolsBox.tsx
1. Refactor Example Component &
useCornerstone
Custom Hook. β¨π Refactor Example Component
Separate the component into
CurrentTabComponent.tsx
andTabNavigation.tsx
componentsTabNavigation.tsx
: examples tab navCurrentTabComponent.tsx
export default function CurrentTabComponent({ tabIndex, }: { tabIndex: number; }) { const exampleComponents = [ {component: },
...
];
return <>{exampleComponents[tabIndex].component}</>; }
src\example\hooks\useCornerstone.ts
π [UI] add loading state & spinner
useAsync
fromreact-use
package, show text and spiner at loading2. Finish to build tools select box. β¨
π from documentation
https://tools.cornerstonejs.org/api/#Tools.EraserTool https://tools.cornerstonejs.org/examples/
π keep the tools that are functioning properly in the menu.
Zoom, Wwwc
Pan, Magnify, Angle
Probe, ArrowAnnotation
TextMarker, FreehandRoi
Length
π refactor
setToolsByIndex
functionto setting both mouse button.
toolStateManager.clear()
function for prevent to adding tools multiple times.todo π©βπ»