diff --git a/apps/visr/src/components/spectroscopy/SpectroscopyPlots.tsx b/apps/visr/src/components/spectroscopy/SpectroscopyPlots.tsx index 2a2429ce..0841b358 100644 --- a/apps/visr/src/components/spectroscopy/SpectroscopyPlots.tsx +++ b/apps/visr/src/components/spectroscopy/SpectroscopyPlots.tsx @@ -84,7 +84,7 @@ export type SpectroscopyData = Partial>; interface SpectroscopyPlotsProps { expanded: boolean; - plotAspectRatio: number; + plotAspectRatio: number | "auto" | "equal"; } function SpectroscopyPlots({ @@ -116,8 +116,11 @@ function SpectroscopyPlots({ }> + } + sx={{ display: "flex" }} + > {mounted && ( + + + + + ); } diff --git a/apps/visr/src/components/tomography/TomographyPlots.tsx b/apps/visr/src/components/tomography/TomographyPlots.tsx index 4ce3026c..0ffb105e 100644 --- a/apps/visr/src/components/tomography/TomographyPlots.tsx +++ b/apps/visr/src/components/tomography/TomographyPlots.tsx @@ -49,41 +49,51 @@ function TomographyPlots({ plane={plane} />, ]; + const titles = ["Camera View", "Reconstruction", "Slice View"]; + const plots = views.map((view, i) => ( + + {titles[i]} + - - {titles[i]} - + {view} - {view} )); - console.log(plots[0]); + return ( - } color="blue"> + }> {mounted && ( {}} > {plots} diff --git a/apps/visr/src/utils/createArrayFromView.ts b/apps/visr/src/utils/createArrayFromView.ts index 3266f182..0fc5c9b2 100644 --- a/apps/visr/src/utils/createArrayFromView.ts +++ b/apps/visr/src/utils/createArrayFromView.ts @@ -1,6 +1,7 @@ import ndarray, { type NdArray } from "ndarray"; import { assign } from "ndarray-ops"; +//copied (and simplified) from h5web: https://github.com/silx-kit/h5web/blob/a8cceed504b8ab57d426319db56b8b8dab309e3f/packages/shared/src/vis-utils.ts#L103 export default function createArrayFromView( view: NdArray, ): NdArray {