@niivue/niivue 0.54.0 → 0.55.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/build/index.d.ts CHANGED
@@ -723,6 +723,7 @@ type NVConfigOptions = {
723
723
  yoke3Dto2DZoom: boolean;
724
724
  isDepthPickMesh: boolean;
725
725
  isCornerOrientationText: boolean;
726
+ isOrientationTextVisible: boolean;
726
727
  heroImageFraction: number;
727
728
  heroSliceType: SLICE_TYPE;
728
729
  sagittalNoseLeft: boolean;
@@ -2113,6 +2114,12 @@ declare class Niivue {
2113
2114
  * @see {@link https://niivue.github.io/niivue/features/worldspace2.html | live demo usage}
2114
2115
  */
2115
2116
  setCornerOrientationText(isCornerOrientationText: boolean): void;
2117
+ /**
2118
+ * determine if orientation text appears in 2D slice view.
2119
+ * @param isOrientationTextVisible - controls position of text
2120
+ * @example niivue.setIsOrientationTextVisible(false)
2121
+ */
2122
+ setIsOrientationTextVisible(isOrientationTextVisible: boolean): void;
2116
2123
  /**
2117
2124
  * determine proportion of screen real estate devoted to rendering in multiplanar view.
2118
2125
  * @param fraction - proportion of screen devoted to primary (hero) image (0 to disable)
package/build/index.js CHANGED
@@ -17,7 +17,7 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
17
17
  import { mat4 as mat49, vec2, vec3 as vec314, vec4 as vec49 } from "gl-matrix";
18
18
 
19
19
  // package.json
20
- var version = "0.54.0";
20
+ var version = "0.55.0";
21
21
 
22
22
  // src/logger.ts
23
23
  var _Log = class _Log {
@@ -20431,6 +20431,7 @@ var DEFAULT_OPTIONS = {
20431
20431
  yoke3Dto2DZoom: false,
20432
20432
  isDepthPickMesh: false,
20433
20433
  isCornerOrientationText: false,
20434
+ isOrientationTextVisible: true,
20434
20435
  heroImageFraction: 0,
20435
20436
  heroSliceType: 4 /* RENDER */,
20436
20437
  sagittalNoseLeft: false,
@@ -27100,6 +27101,15 @@ var Niivue = class {
27100
27101
  this.opts.isCornerOrientationText = isCornerOrientationText;
27101
27102
  this.updateGLVolume();
27102
27103
  }
27104
+ /**
27105
+ * determine if orientation text appears in 2D slice view.
27106
+ * @param isOrientationTextVisible - controls position of text
27107
+ * @example niivue.setIsOrientationTextVisible(false)
27108
+ */
27109
+ setIsOrientationTextVisible(isOrientationTextVisible) {
27110
+ this.opts.isOrientationTextVisible = isOrientationTextVisible;
27111
+ this.drawScene();
27112
+ }
27103
27113
  /**
27104
27114
  * determine proportion of screen real estate devoted to rendering in multiplanar view.
27105
27115
  * @param fraction - proportion of screen devoted to primary (hero) image (0 to disable)
@@ -33481,7 +33491,7 @@ var Niivue = class {
33481
33491
  if (isNaN(customMM)) {
33482
33492
  this.drawCrosshairs3D(false, 0.15, obj.modelViewProjectionMatrix, true, this.opts.isSliceMM);
33483
33493
  }
33484
- if (isStretchToScreen) {
33494
+ if (isStretchToScreen && this.opts.isOrientationTextVisible) {
33485
33495
  this.drawSliceOrientationText(leftTopWidthHeight, axCorSag);
33486
33496
  }
33487
33497
  this.readyForSync = true;
@@ -33515,7 +33525,7 @@ var Niivue = class {
33515
33525
  if (customMM === Infinity || customMM === -Infinity || axCorSag === 4 /* RENDER */) {
33516
33526
  return;
33517
33527
  }
33518
- if (leftTopWidthHeight[2] !== 0 && leftTopWidthHeight[3] !== 0) {
33528
+ if (leftTopWidthHeight[2] !== 0 && leftTopWidthHeight[3] !== 0 && this.opts.isOrientationTextVisible) {
33519
33529
  this.drawSliceOrientationText(leftTopWidthHeight, axCorSag, padLeftTop);
33520
33530
  }
33521
33531
  }