From a773acfa8c56a00540696d7a0138d8595f28d55d Mon Sep 17 00:00:00 2001 From: Tom Kane Date: Fri, 14 Aug 2026 16:23:39 +0000 Subject: [PATCH 1/5] replace camera view with actual video feed from dcam3 --- .../components/tomography/CameraViewer.tsx | 55 ------------------- .../components/tomography/TomographyPlots.tsx | 6 +- 2 files changed, 4 insertions(+), 57 deletions(-) delete mode 100644 apps/visr/src/components/tomography/CameraViewer.tsx diff --git a/apps/visr/src/components/tomography/CameraViewer.tsx b/apps/visr/src/components/tomography/CameraViewer.tsx deleted file mode 100644 index fcc80a53..00000000 --- a/apps/visr/src/components/tomography/CameraViewer.tsx +++ /dev/null @@ -1,55 +0,0 @@ -import { Box, Typography } from "@mui/material"; - -export default function CameraViewer() { - // static image showing camera view/projection feed - return ( - - - - Camera View - - - - - - - - ); -} diff --git a/apps/visr/src/components/tomography/TomographyPlots.tsx b/apps/visr/src/components/tomography/TomographyPlots.tsx index d0d33376..fe2e4355 100644 --- a/apps/visr/src/components/tomography/TomographyPlots.tsx +++ b/apps/visr/src/components/tomography/TomographyPlots.tsx @@ -1,5 +1,4 @@ import { Box } from "@mui/material"; -import CameraViewer from "./CameraViewer"; import VolumeViewer from "./VolumeViewer"; import SliceViewer from "./SliceViewer"; import { Plane } from "./PlaneEnum"; @@ -35,7 +34,10 @@ function TomographyPlots({ if (!volumeData) return ; const views = [ - , + Detector, Date: Mon, 17 Aug 2026 10:21:35 +0000 Subject: [PATCH 2/5] add titles in TomographyPlots to make viewers more generic --- .../src/components/tomography/SliceViewer.tsx | 36 ++++--------------- .../components/tomography/TomographyPlots.tsx | 23 ++++++++++-- .../components/tomography/VolumeViewer.tsx | 16 --------- 3 files changed, 28 insertions(+), 47 deletions(-) diff --git a/apps/visr/src/components/tomography/SliceViewer.tsx b/apps/visr/src/components/tomography/SliceViewer.tsx index 132ad5fa..a30e0c71 100644 --- a/apps/visr/src/components/tomography/SliceViewer.tsx +++ b/apps/visr/src/components/tomography/SliceViewer.tsx @@ -48,35 +48,13 @@ export default function SliceViewer({ borderColor: "divider", }} > - - - Slice View - - -
- -
+
); } diff --git a/apps/visr/src/components/tomography/TomographyPlots.tsx b/apps/visr/src/components/tomography/TomographyPlots.tsx index fe2e4355..4753083e 100644 --- a/apps/visr/src/components/tomography/TomographyPlots.tsx +++ b/apps/visr/src/components/tomography/TomographyPlots.tsx @@ -1,4 +1,4 @@ -import { Box } from "@mui/material"; +import { Box, Typography } from "@mui/material"; import VolumeViewer from "./VolumeViewer"; import SliceViewer from "./SliceViewer"; import { Plane } from "./PlaneEnum"; @@ -50,14 +50,33 @@ function TomographyPlots({ plane={plane} />, ]; + const titles = ["Camera View", "Reconstruction", "Slice View"]; const plots = views.map((view, i) => ( + + + {titles[i]} + + {view} )); diff --git a/apps/visr/src/components/tomography/VolumeViewer.tsx b/apps/visr/src/components/tomography/VolumeViewer.tsx index 13ae0341..921b0d76 100644 --- a/apps/visr/src/components/tomography/VolumeViewer.tsx +++ b/apps/visr/src/components/tomography/VolumeViewer.tsx @@ -25,22 +25,6 @@ export default function VolumeViewer({ borderColor: "divider", }} > - - - Reconstruction - - - {visible && volumeData && volumeShape ? ( Date: Mon, 17 Aug 2026 10:24:24 +0000 Subject: [PATCH 3/5] remove typography import to fix linting --- apps/visr/src/components/tomography/SliceViewer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/visr/src/components/tomography/SliceViewer.tsx b/apps/visr/src/components/tomography/SliceViewer.tsx index a30e0c71..12f2bdce 100644 --- a/apps/visr/src/components/tomography/SliceViewer.tsx +++ b/apps/visr/src/components/tomography/SliceViewer.tsx @@ -1,4 +1,4 @@ -import { Box, Typography } from "@mui/material"; +import { Box } from "@mui/material"; import { Plane } from "./PlaneEnum"; import { HeatmapPlot } from "@diamondlightsource/davidia"; import ndarray from "ndarray"; From 956a779328537873fd7435002bb0bf3c0e9e978d Mon Sep 17 00:00:00 2001 From: Abigail Yates Date: Mon, 17 Aug 2026 11:01:50 +0000 Subject: [PATCH 4/5] remove extra parent objects in sliceViewer and VolumeViewer --- .../src/components/tomography/SliceViewer.tsx | 24 ++++--------- .../components/tomography/VolumeViewer.tsx | 35 ++++++------------- 2 files changed, 18 insertions(+), 41 deletions(-) diff --git a/apps/visr/src/components/tomography/SliceViewer.tsx b/apps/visr/src/components/tomography/SliceViewer.tsx index 12f2bdce..c3b8def6 100644 --- a/apps/visr/src/components/tomography/SliceViewer.tsx +++ b/apps/visr/src/components/tomography/SliceViewer.tsx @@ -39,22 +39,12 @@ export default function SliceViewer({ } return ( - - - + ); } diff --git a/apps/visr/src/components/tomography/VolumeViewer.tsx b/apps/visr/src/components/tomography/VolumeViewer.tsx index 921b0d76..dbfb05c6 100644 --- a/apps/visr/src/components/tomography/VolumeViewer.tsx +++ b/apps/visr/src/components/tomography/VolumeViewer.tsx @@ -14,35 +14,22 @@ export default function VolumeViewer({ volumeShape, visible, }: Props) { - return ( + return visible && volumeData && volumeShape ? ( + + ) : ( - {visible && volumeData && volumeShape ? ( - - ) : ( - - ... - - )} + ... ); } From 90c1debf1d187a8807417e52251716a2bf21abb2 Mon Sep 17 00:00:00 2001 From: Abigail Yates Date: Mon, 17 Aug 2026 12:46:36 +0000 Subject: [PATCH 5/5] remove VolumeViewer and show VolumeRenderer directly in TomographyPlots --- .../components/tomography/TomographyPlots.tsx | 7 ++-- .../components/tomography/VolumeViewer.tsx | 35 ------------------- 2 files changed, 3 insertions(+), 39 deletions(-) delete mode 100644 apps/visr/src/components/tomography/VolumeViewer.tsx diff --git a/apps/visr/src/components/tomography/TomographyPlots.tsx b/apps/visr/src/components/tomography/TomographyPlots.tsx index 4753083e..4ce3026c 100644 --- a/apps/visr/src/components/tomography/TomographyPlots.tsx +++ b/apps/visr/src/components/tomography/TomographyPlots.tsx @@ -1,8 +1,8 @@ import { Box, Typography } from "@mui/material"; -import VolumeViewer from "./VolumeViewer"; import SliceViewer from "./SliceViewer"; import { Plane } from "./PlaneEnum"; import { ReactGridLayout, useContainerWidth } from "react-grid-layout"; +import VolumeRenderer from "./VolumeRenderer"; interface Props { volumeData: Uint8Array; @@ -16,7 +16,6 @@ interface Props { function TomographyPlots({ volumeData, volumeShape, - volumeVisible, plane, slice, drawerOpen, @@ -38,10 +37,10 @@ function TomographyPlots({ src="https://visr-pvws.diamond.ac.uk/mjpg/BL01B-DI-CAM-01:PVA:OUTPUT" alt="Detector" />, - , - ) : ( - - ... - - ); -}