Skip to content

Commit

Permalink
Merge pull request #7 from neurolabusc/main
Browse files Browse the repository at this point in the history
Add ability to save scene
  • Loading branch information
neurolabusc authored May 3, 2024
2 parents 85a8ffe + 6e47893 commit bd18e17
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 bd18e17

Please sign in to comment.