Skip to content

Commit

Permalink
Add ability to save scene
Browse files Browse the repository at this point in the history
  • Loading branch information
neurolabusc committed May 3, 2024
1 parent ff733f6 commit 6e47893
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
 
<button id="saveBtn">Save Overlay</button>
&nbsp;
<button id="sceneBtn">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 />
&nbsp;
Expand Down
3 changes: 3 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ async function main() {
saveBtn.onclick = function () {
nv1.volumes[1].saveToDisk("Custom.nii")
}
sceneBtn.onclick = function () {
nv1.saveDocument("niivue.brainchop.nvd")
}
workerCheck.onchange = function () {
modelSelect.onchange()
}
Expand Down

0 comments on commit 6e47893

Please sign in to comment.