Skip to content

Commit

Permalink
Merge pull request #15 from niivue/lint
Browse files Browse the repository at this point in the history
Save Scene button (almost functional)
  • Loading branch information
neurolabusc authored May 15, 2024
2 parents bd1be6f + dc98311 commit 240e834
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
6 changes: 4 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
<select id="modelSelect">
</select>
&nbsp;
<button id="saveBtn">Save Overlay</button>
<button id="saveImgBtn">Save Overlay</button>
&nbsp;
<button id="saveSceneBtn">Save Scene</button>
&nbsp;
<label for="workerCheck">Use Webworker</label>
<input type="checkbox" title="webworkers are faster but not supported by all browsers" id="workerCheck" checked />
Expand All @@ -49,7 +51,7 @@
<option>slicer3D</option>
</select>
&nbsp;
<button id="diagnosticsBtn">Show Diagnostics</button>
<button id="diagnosticsBtn">Diagnostics</button>
&nbsp;
<button id="aboutBtn">About</button>
</header>
Expand Down
5 changes: 4 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,12 @@ async function main() {
runInference(opts, model, nv1.volumes[0].hdr, nv1.volumes[0].img, callbackImg, callbackUI)
}
}
saveBtn.onclick = function () {
saveImgBtn.onclick = function () {
nv1.volumes[1].saveToDisk('Custom.nii')
}
saveSceneBtn.onclick = function () {
nv1.saveDocument("brainchop.nvd");
}
workerCheck.onchange = function () {
modelSelect.onchange()
}
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"preview": "vite preview"
},
"dependencies": {
"@niivue/niivue":"^0.43.0",
"@niivue/niivue":"^0.43.2",
"@tensorflow/tfjs": "^4.19.0",
"gl-matrix": "^3.4.3"
},
Expand Down

0 comments on commit 240e834

Please sign in to comment.