-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
694f8fb
commit 8c272c6
Showing
9 changed files
with
43 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+2.9 MB
examples/vite-redux-toolkit-react-app/public/assets/EX_SITU_2009_UCSD_T1_WEIGHTED.nii.gz
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
examples/vite-redux-toolkit-react-app/src/components/viewers/Dicom/DicomViewer.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import React, { useState, useEffect } from 'react'; | ||
import DicomViewer from '@metacell/geppetto-meta-ui/dicom-viewer/DicomViewer'; | ||
import Loader from "@metacell/geppetto-meta-ui/loader/Loader"; | ||
const DicomViewerExample: React.FC = () => { | ||
const [ready, setReady] = useState<boolean>(true); | ||
|
||
const onLoaded = () => { | ||
setReady(true); | ||
}; | ||
|
||
const data = '/assets/EX_SITU_2009_UCSD_T1_WEIGHTED.nii.gz'; | ||
|
||
return ready ? ( | ||
<DicomViewer | ||
id="DicomViewer" | ||
data={data} | ||
onShiftClick="goToPoint" | ||
onCtrlClick="toggleMode" | ||
showDownloadButton={true} | ||
onLoaded={onLoaded} | ||
toolbarOptions={{ innerDivStyles: { backgroundColor: 'rgb(0,0,0,0)' } }} | ||
/> | ||
) : ( | ||
<Loader /> | ||
); | ||
}; | ||
|
||
export default DicomViewerExample; |
7 changes: 4 additions & 3 deletions
7
examples/vite-redux-toolkit-react-app/src/layoutManager/componentsMap.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
import MyComponent from '../components/MyComponent' | ||
import ThreeDViewer from "../components/viewers/ThreeD/ThreeDViewer.tsx"; | ||
import DicomViewer from "../components/viewers/Dicom/DicomViewer.tsx"; | ||
import DicomViewerExample from '@metacell/geppetto-meta-ui/dicom-viewer/DicomViewer'; | ||
|
||
const componentMap = { | ||
MyComponent, | ||
ThreeDViewer, | ||
'MyComponent': MyComponent, | ||
'Dicom Viewer': DicomViewer | ||
} | ||
|
||
export default componentMap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
export enum ViewerType { | ||
default = "Default", | ||
ThreeD = "3D", | ||
imageViewer= 'Image Viewer', | ||
dicomViewer= 'Dicom Viewer', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters