@niivue/niivue 0.44.2 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/build/index.d.ts +31 -6
- package/build/index.js +429 -86
- package/build/index.js.map +1 -1
- package/build/index.min.js +1 -1
- package/dist/index.d.ts +31 -6
- package/dist/index.js +429 -86
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/niivue.umd.js +30 -30
- package/package.json +1 -1
- package/src/cow.iwm.cbor +0 -0
- package/src/fslmean.iwi.cbor +0 -0
- package/src/index.html +47 -8
- package/src/niivue/index.ts +520 -96
- package/src/nvdocument.ts +11 -0
- package/src/nvimage/index.ts +4 -1
- package/src/nvlabel.ts +34 -1
- package/src/nvmesh-loaders.ts +24 -1
package/package.json
CHANGED
package/src/cow.iwm.cbor
ADDED
|
Binary file
|
|
Binary file
|
package/src/index.html
CHANGED
|
@@ -58,7 +58,30 @@
|
|
|
58
58
|
class="slider"
|
|
59
59
|
id="fiberCalMin"
|
|
60
60
|
/>
|
|
61
|
-
<
|
|
61
|
+
<label for="layoutSelect">Layout</label>
|
|
62
|
+
<select id="layoutSelect">
|
|
63
|
+
<option value="0" selected>Auto</option>
|
|
64
|
+
<option value="1">Column</option>
|
|
65
|
+
<option value="2">Grid</option>
|
|
66
|
+
<option value="3">Row</option>
|
|
67
|
+
</select>
|
|
68
|
+
<label for="renderingSelect">MultiplanarRendering</label>
|
|
69
|
+
<select id="renderingSelect">
|
|
70
|
+
<option value="0">Never</option>
|
|
71
|
+
<option value="1">Always</option>
|
|
72
|
+
<option value="2" selected>Auto</option>
|
|
73
|
+
</select>
|
|
74
|
+
<select id="sliceType">
|
|
75
|
+
<option value="0">Axial</option>
|
|
76
|
+
<option value="1">Coronal</option>
|
|
77
|
+
<option value="2">Sagittal</option>
|
|
78
|
+
<option value="4">Render</option>
|
|
79
|
+
<option value="3" selected>Multiplanar</option>
|
|
80
|
+
</select>
|
|
81
|
+
<label for="equalCheck">EqualSize</label>
|
|
82
|
+
<input type="checkbox" id="equalCheck" checked />
|
|
83
|
+
<label for="cornerCheck">CornerText</label>
|
|
84
|
+
<input type="checkbox" id="cornerCheck" unchecked />
|
|
62
85
|
</header>
|
|
63
86
|
<main id="canvas-container">
|
|
64
87
|
<canvas id="gl1"></canvas>
|
|
@@ -107,16 +130,31 @@
|
|
|
107
130
|
nv1.meshes[0].dpv[0].cal_min = this.value * 1; //*1 converts string to number
|
|
108
131
|
nv1.setMeshProperty(nv1.meshes[0].id, "colormap", fiberColormap.value);
|
|
109
132
|
};
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
133
|
+
layoutSelect.onchange = function () {
|
|
134
|
+
nv1.setMultiplanarLayout(Number(this.value));
|
|
135
|
+
}
|
|
136
|
+
renderingSelect.onchange = function () {
|
|
137
|
+
nv1.opts.multiplanarShowRender = Number(this.value);
|
|
138
|
+
nv1.drawScene();
|
|
139
|
+
}
|
|
140
|
+
equalCheck.onchange = function () {
|
|
141
|
+
nv1.opts.multiplanarEqualSize = this.checked
|
|
142
|
+
nv1.drawScene()
|
|
143
|
+
}
|
|
144
|
+
cornerCheck.onchange = function () {
|
|
145
|
+
//nv1.opts.isCornerOrientationText = this.checked\
|
|
146
|
+
nv1.setCornerOrientationText(this.checked)
|
|
147
|
+
}
|
|
148
|
+
sliceType.onchange = function () {
|
|
149
|
+
let st = parseInt(document.getElementById("sliceType").value);
|
|
150
|
+
nv1.setSliceType(st)
|
|
151
|
+
}
|
|
115
152
|
var volumeList1 = [{ url: "../demos/images/mni152.nii.gz" }];
|
|
116
153
|
let defaults = {
|
|
117
154
|
backColor: [0, 0, 0, 1],
|
|
118
155
|
show3Dcrosshair: true,
|
|
119
|
-
loglevel: 'debug'
|
|
156
|
+
loglevel: 'debug',
|
|
157
|
+
isRuler: true
|
|
120
158
|
};
|
|
121
159
|
var nv1 = new Niivue(defaults);
|
|
122
160
|
nv1.attachToCanvas(gl1);
|
|
@@ -152,6 +190,7 @@
|
|
|
152
190
|
};
|
|
153
191
|
cmapEl.appendChild(btn);
|
|
154
192
|
}
|
|
193
|
+
equalCheck.onchange()
|
|
155
194
|
</script>
|
|
156
195
|
</body>
|
|
157
|
-
</html>
|
|
196
|
+
</html>
|