Skip to content

Commit a90cb84

Browse files
committed
bump niimath version
1 parent 59f437d commit a90cb84

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@
7070
Hollow:
7171
<select id="hollowSelect" title="hollow meshes require less material but may be fragile">
7272
<option value="0" selected>False: solid</option>
73-
<option value="-1">1mm</option>
7473
<option value="-2">2mm</option>
74+
<option value="-3">3mm</option>
7575
<option value="-4">4mm</option>
7676
<option value="-8">8mm</option>
7777
<option value="-16">16mm</option>

main.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ async function main() {
199199
}
200200
createMeshBtn.onclick = function () {
201201
if (nv1.meshes.length > 0) nv1.removeMesh(nv1.meshes[0])
202+
saveMeshBtn.disabled = true
202203
if (nv1.volumes.length < 1) {
203204
window.alert("Image not loaded. Drag and drop an image.")
204205
} else {
@@ -283,7 +284,6 @@ async function main() {
283284
file: outFile,
284285
name: outFile.name
285286
})
286-
287287
hdr = outVol.hdr
288288
img = outVol.img
289289
}
@@ -303,7 +303,6 @@ async function main() {
303303
const initialNiiMesh = iwm2meshCore(largestOnly)
304304
const initialNiiMeshBuffer = NVMeshUtilities.createMZ3(initialNiiMesh.positions, initialNiiMesh.indices, false)
305305
await nv1.loadFromArrayBuffer(initialNiiMeshBuffer, 'trefoil.mz3')
306-
saveMeshBtn.disabled = false
307306
meshProcessingMsg.textContent = "Smoothing and remeshing"
308307
const smooth = parseInt(smoothSlide.value)
309308
const shrink = parseFloat(shrinkPct.value)
@@ -358,6 +357,9 @@ async function main() {
358357
}
359358
qualitySelect.onchange()
360359
nv1.onImageLoaded = doLoadImage
360+
nv1.onMeshLoaded = (volume) => {
361+
saveMeshBtn.disabled = false
362+
}
361363
modelSelect.selectedIndex = -1
362364
workerCheck.checked = await isChrome() //TODO: Safari does not yet support WebGL TFJS webworkers, test FireFox
363365
console.log('brain2print 20241218')

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"preview": "vite preview"
1010
},
1111
"dependencies": {
12-
"@niivue/niimath": "^0.3.0",
12+
"@niivue/niimath": "^1.0.0",
1313
"@itk-wasm/cuberille": "^0.2.0",
1414
"@itk-wasm/mesh-filters": "^0.2.0",
1515
"@niivue/cbor-loader": "^1.1.0",

0 commit comments

Comments
 (0)