Skip to content

Commit

Permalink
Merge pull request #9 from neurolabusc/main
Browse files Browse the repository at this point in the history
Await conform
  • Loading branch information
neurolabusc authored May 5, 2024
2 parents 26e2765 + 29314a8 commit 411c541
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
4 changes: 1 addition & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
 
<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 All @@ -43,7 +41,7 @@
<div class="footer">
<table class="footer">
<tr>
<th id="location">Ready</th>
<th id="location">Drag and Drop any NIfTI image</th>
<th><progress id="modelProgress" value="0" max="100"> 32% </progress></th>
<th>
<!-- important to use class footer here -->
Expand Down
9 changes: 3 additions & 6 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ async function main() {
nv1.setInterpolation(!smoothCheck.checked)
}
aboutBtn.onclick = function () {
window.alert("BrainChop models https://github.com/neuroneural/brainchop")
window.alert("Drag and drop NIfTI images. Use pulldown menu to choose brainchop model")
}
diagnosticsBtn.onclick = function () {
if (diagnosticsString.length < 1) {
Expand All @@ -34,8 +34,8 @@ async function main() {
if (isConformed)
return
let nii2 = await nv1.conform(nii, false)
nv1.removeVolume(nv1.volumes[0])
nv1.addVolume(nii2)
await nv1.removeVolume(nv1.volumes[0])
await nv1.addVolume(nii2)
}
async function closeAllOverlays() {
while (nv1.volumes.length > 1) {
Expand Down Expand Up @@ -92,9 +92,6 @@ 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 411c541

Please sign in to comment.