Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions PanTS-Demo/src/routes/VisualizationPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@
// References and state
const params = useParams();
const pantsCase = params.caseId;
const isCvCase = String(pantsCase ?? "").toUpperCase().startsWith("CV");
const sessionId = params.sessionId;
// Local DICOM mode (/dicom): a folder of .dcm files picked on the Upload page,
// viewed entirely in-browser. No backend case, so no segmentation layer.
Expand Down Expand Up @@ -1030,7 +1031,7 @@

if (
!ctUrl ||
!segUrl ||
(!segUrl && !isCvCase) || // CV is CT-only; only require seg for non-CV cases
!axial_ref.current ||
!sagittal_ref.current ||
!coronal_ref.current ||
Expand All @@ -1047,7 +1048,7 @@
coronal_ref.current,
cmap,
ctUrl,
segUrl,
segUrl ?? undefined,
setLoading
);

Expand Down Expand Up @@ -1086,7 +1087,7 @@
};
// refs have stable identity, so they aren't real deps; the loads key off
// ctUrl/segUrl/labelColorMap.
}, [

Check warning on line 1090 in PanTS-Demo/src/routes/VisualizationPage.tsx

View workflow job for this annotation

GitHub Actions / Frontend (Node 22)

React Hook useEffect has missing dependencies: 'isCvCase' and 'labelColorMap'. Either include them or remove the dependency array

Check warning on line 1090 in PanTS-Demo/src/routes/VisualizationPage.tsx

View workflow job for this annotation

GitHub Actions / Frontend (Node 20)

React Hook useEffect has missing dependencies: 'isCvCase' and 'labelColorMap'. Either include them or remove the dependency array
ctUrl,
segUrl,
isDicom,
Expand Down Expand Up @@ -1129,7 +1130,7 @@
// }, [pantsCase]);

// Update VOI (window/level) settings
const handleWindowChange = (

Check warning on line 1133 in PanTS-Demo/src/routes/VisualizationPage.tsx

View workflow job for this annotation

GitHub Actions / Frontend (Node 22)

The 'handleWindowChange' function makes the dependencies of useMemo Hook (at line 1633) change on every render. To fix this, wrap the definition of 'handleWindowChange' in its own useCallback() Hook

Check warning on line 1133 in PanTS-Demo/src/routes/VisualizationPage.tsx

View workflow job for this annotation

GitHub Actions / Frontend (Node 20)

The 'handleWindowChange' function makes the dependencies of useMemo Hook (at line 1633) change on every render. To fix this, wrap the definition of 'handleWindowChange' in its own useCallback() Hook
newWidth: number | null,
newCenter: number | null
) => {
Expand Down
Loading