@niivue/niivue 0.12.3 → 0.12.4
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 +1 -1
- package/dist/niivue.es.js +9 -3
- package/dist/niivue.umd.js +7 -7
- package/package.json +1 -1
- package/src/index.html +3 -3
- package/src/niivue.js +13 -2
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@ We host many NiiVue examples via github pages. These are updated and deployed au
|
|
|
38
38
|
|
|
39
39
|
## existing html page
|
|
40
40
|
```html
|
|
41
|
-
<script src="https://unpkg.com/@niivue/niivue@0.12.
|
|
41
|
+
<script src="https://unpkg.com/@niivue/niivue@0.12.4/dist/niivue.umd.js"></script>
|
|
42
42
|
|
|
43
43
|
<canvas id="gl" height=480 width=640></canvas>
|
|
44
44
|
|
package/dist/niivue.es.js
CHANGED
|
@@ -12297,7 +12297,8 @@ const Niivue = function(options = {}) {
|
|
|
12297
12297
|
trustCalMinMax: true,
|
|
12298
12298
|
clipPlaneHotKey: "KeyC",
|
|
12299
12299
|
viewModeHotKey: "KeyV",
|
|
12300
|
-
keyDebounceTime: 50
|
|
12300
|
+
keyDebounceTime: 50,
|
|
12301
|
+
isRadiologicalConvention: false
|
|
12301
12302
|
};
|
|
12302
12303
|
this.canvas = null;
|
|
12303
12304
|
this.gl = null;
|
|
@@ -12345,7 +12346,6 @@ const Niivue = function(options = {}) {
|
|
|
12345
12346
|
this.volumes = [];
|
|
12346
12347
|
this.backTexture = [];
|
|
12347
12348
|
this.objectsToRender3D = [];
|
|
12348
|
-
this.isRadiologicalConvention = false;
|
|
12349
12349
|
this.volScaleMultiplier = 1;
|
|
12350
12350
|
this.volScale = [];
|
|
12351
12351
|
this.vox = [];
|
|
@@ -12734,6 +12734,12 @@ Niivue.prototype.dropListener = async function(e) {
|
|
|
12734
12734
|
}
|
|
12735
12735
|
}
|
|
12736
12736
|
};
|
|
12737
|
+
Niivue.prototype.setRadiologicalConvention = function(isRadiologicalConvention) {
|
|
12738
|
+
this.opts.isRadiologicalConvention = isRadiologicalConvention;
|
|
12739
|
+
};
|
|
12740
|
+
Niivue.prototype.getRadiologicalConvention = function() {
|
|
12741
|
+
return this.opts.isRadiologicalConvention;
|
|
12742
|
+
};
|
|
12737
12743
|
Niivue.prototype.addVolume = function(volume) {
|
|
12738
12744
|
if (this.volumes.length > 1) {
|
|
12739
12745
|
this.overlays.push(volume);
|
|
@@ -13589,7 +13595,7 @@ Niivue.prototype.draw2D = function(leftTopWidthHeight, axCorSag) {
|
|
|
13589
13595
|
this.scene.crosshairPos[2],
|
|
13590
13596
|
this.scene.crosshairPos[0]
|
|
13591
13597
|
];
|
|
13592
|
-
let isMirrorLR = this.isRadiologicalConvention && axCorSag < this.sliceTypeSagittal;
|
|
13598
|
+
let isMirrorLR = this.opts.isRadiologicalConvention && axCorSag < this.sliceTypeSagittal;
|
|
13593
13599
|
this.sliceShader.use(this.gl);
|
|
13594
13600
|
this.gl.uniform1f(this.sliceShader.uniforms["opacity"], this.backOpacity);
|
|
13595
13601
|
this.gl.uniform1i(this.sliceShader.uniforms["axCorSag"], axCorSag);
|