Skip to content

Commit

Permalink
update demo app
Browse files Browse the repository at this point in the history
  • Loading branch information
Pragyanstha committed Dec 8, 2024
1 parent 61e3c38 commit bd22ff9
Show file tree
Hide file tree
Showing 8 changed files with 2,098 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/assets/index-BO2nIwIy.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*{margin:0;padding:0;box-sizing:border-box}:root{background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
2,059 changes: 2,059 additions & 0 deletions docs/assets/index-CMBM1v7h.js

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions docs/connectome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"color": [
255,
0,
0
],
"data_type": "fs_pointset",
"points": [
{
"coordinates": {
"x": 0,
"y": 0,
"z": -1000
},
"legacy_stat": 1
}
],
"version": 1,
"vox2ras": "scanner_ras"
}
16 changes: 15 additions & 1 deletion docs/demo.html
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
demo site is under construction.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/icon.png" />
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&family=Open+Sans:wght@400;700&display=swap" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>RayEmb Interactive Viewer</title>
<script type="module" crossorigin src="/assets/index-CMBM1v7h.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-BO2nIwIy.css">
</head>
<body>
<div id="root"></div>
</body>
</html>
Binary file added docs/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ <h2 class="title is-2 publication-title">Arbitrary Landmark Estimation in X-Ray

<!-- Demo Link -->
<span class="link-block">
<a href="https://pragyanstha.github.io/rayemb/demo" target="_blank"
<a href="/demo.html" target="_blank"
class="external-link button is-normal is-rounded is-dark">
<span class="icon">
<i class="fas fa-globe"></i>
Expand Down
Binary file added docs/test.nii.gz
Binary file not shown.
3 changes: 2 additions & 1 deletion ui/src/components/useViewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,15 @@ export default function useViewer(niftiUrl: string, onNodeClick: (node: number[]
nv.onMouseUp = (uiData) => {
// @ts-ignore: fracPos is not defined in the type
if (uiData.fracPos[0] < 0) return; //not on volume
// @ts-ignore: fracPos is not defined in the type
const norm = (uiData.fracPos[0] - currentNode.current[0])**2 + (uiData.fracPos[1] - currentNode.current[1])**2 + (uiData.fracPos[2] - currentNode.current[2])**2;
if (norm < 0.00001) {console.log("same node"); return;};
// @ts-ignore: fracPos is not defined in the type
let XYZmmVec = nv.frac2mm(uiData.fracPos);
let XYZmm = [XYZmmVec[0], XYZmmVec[1], XYZmmVec[2]];
console.log("XYZmm", XYZmm);
updateNode(XYZmm);
onNodeClick(XYZmm);
// @ts-ignore: fracPos is not defined in the type
currentNode.current = uiData.fracPos;
}
}
Expand Down

0 comments on commit bd22ff9

Please sign in to comment.