@niivue/niivue 0.38.9 → 0.39.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/dist/index.d.ts CHANGED
@@ -249,7 +249,8 @@ type ValuesArray = Array<{
249
249
  id: string;
250
250
  vals: number[];
251
251
  }>;
252
- type AnyNumberArray = number[] | Float64Array | Float32Array | Uint32Array | Uint16Array | Uint8Array | Int32Array | Int16Array | Int8Array;
252
+ type TypedNumberArray = Float64Array | Float32Array | Uint32Array | Uint16Array | Uint8Array | Int32Array | Int16Array | Int8Array;
253
+ type AnyNumberArray = number[] | TypedNumberArray;
253
254
  type DefaultMeshType = {
254
255
  positions: Float32Array;
255
256
  indices: Int32Array;
@@ -260,6 +261,10 @@ type TRACT = {
260
261
  offsetPt0: number[];
261
262
  dps: ValuesArray;
262
263
  };
264
+ type TT = {
265
+ pts: number[];
266
+ offsetPt0: number[];
267
+ };
263
268
  type TRX = {
264
269
  pts: number[];
265
270
  offsetPt0: number[];
@@ -269,14 +274,14 @@ type TRX = {
269
274
  header: unknown;
270
275
  };
271
276
  type TRK = {
272
- pts: number[];
273
- offsetPt0: number[];
277
+ pts: Float32Array;
278
+ offsetPt0: Uint32Array;
274
279
  dps: ValuesArray;
275
280
  dpv: ValuesArray;
276
281
  };
277
282
  type TCK = {
278
- pts: number[];
279
- offsetPt0: number[];
283
+ pts: Float32Array;
284
+ offsetPt0: Uint32Array;
280
285
  };
281
286
  type VTK = DefaultMeshType | {
282
287
  pts: Float32Array;
@@ -386,14 +391,14 @@ declare class NVMesh {
386
391
  opacity: number;
387
392
  visible: boolean;
388
393
  meshShaderIndex: number;
389
- offsetPt0: number[] | null;
394
+ offsetPt0: number[] | Uint32Array | null;
390
395
  colormapInvert: boolean;
391
396
  fiberGroupColormap: ColorMap | null;
392
397
  indexBuffer: WebGLBuffer;
393
398
  vertexBuffer: WebGLBuffer;
394
399
  vao: WebGLVertexArrayObject;
395
- pts: number[];
396
- tris?: number[];
400
+ pts: number[] | Float32Array;
401
+ tris?: number[] | Uint32Array;
397
402
  layers: NVMeshLayer[];
398
403
  type: MeshType;
399
404
  data_type?: string;
@@ -440,14 +445,14 @@ declare class NVMesh {
440
445
  * @param colorbarVisible - does this mesh display a colorbar
441
446
  * @param anatomicalStructurePrimary - region for mesh. Default is an empty string
442
447
  */
443
- constructor(pts: number[], tris: number[], name: string | undefined, rgba255: number[] | undefined, opacity: number | undefined, visible: boolean | undefined, gl: WebGL2RenderingContext, connectome?: LegacyConnectome | string | null, dpg?: ValuesArray | null, dps?: ValuesArray | null, dpv?: ValuesArray | null, colorbarVisible?: boolean, anatomicalStructurePrimary?: string);
448
+ constructor(pts: number[] | Float32Array, tris: number[] | Uint32Array, name: string | undefined, rgba255: number[] | undefined, opacity: number | undefined, visible: boolean | undefined, gl: WebGL2RenderingContext, connectome?: LegacyConnectome | string | null, dpg?: ValuesArray | null, dps?: ValuesArray | null, dpv?: ValuesArray | null, colorbarVisible?: boolean, anatomicalStructurePrimary?: string);
444
449
  updateFibers(gl: WebGL2RenderingContext): void;
445
450
  updateConnectome(gl: WebGL2RenderingContext): void;
446
451
  updateMesh(gl: WebGL2RenderingContext): void;
447
452
  reverseFaces(gl: WebGL2RenderingContext): void;
448
453
  setLayerProperty(id: number, key: keyof NVMeshLayer, val: number | string | boolean, gl: WebGL2RenderingContext): void;
449
454
  setProperty(key: keyof this, val: unknown, gl: WebGL2RenderingContext): void;
450
- generatePosNormClr(pts: number[], tris: number[], rgba255: number[]): Float32Array;
455
+ generatePosNormClr(pts: number[] | Float32Array, tris: number[] | Uint32Array, rgba255: number[]): Float32Array;
451
456
  static loadConnectomeFromFreeSurfer(json: {
452
457
  points?: Point[];
453
458
  data_type: string;
@@ -495,1545 +500,11 @@ declare class NVMesh {
495
500
  static readTxtVTK(buffer: ArrayBuffer): VTK;
496
501
  static readTRK(buffer: ArrayBuffer): TRK;
497
502
  static readTCK(buffer: ArrayBuffer): TCK;
503
+ static readTT(buffer: ArrayBuffer): TT;
498
504
  static readTRX(buffer: ArrayBuffer): TRX;
499
505
  static readTRACT(buffer: ArrayBuffer): TRACT;
500
506
  }
501
507
 
502
- var atlas = {
503
- type: "msdf",
504
- distanceRange: 2,
505
- size: 59.65625,
506
- width: 512,
507
- height: 256,
508
- yOrigin: "bottom"
509
- };
510
- var metrics = {
511
- emSize: 1,
512
- lineHeight: 1.171875,
513
- ascender: 0.927734375,
514
- descender: -0.244140625,
515
- underlineY: -0.09765625,
516
- underlineThickness: 0.048828125
517
- };
518
- var glyphs = [
519
- {
520
- unicode: 32,
521
- advance: 0.24755859375
522
- },
523
- {
524
- unicode: 33,
525
- advance: 0.25732421875,
526
- planeBounds: {
527
- left: 0.056159633438645884,
528
- bottom: -0.02437761405677056,
529
- right: 0.20702396031135412,
530
- top: 0.7299440203067705
531
- },
532
- atlasBounds: {
533
- left: 488.5,
534
- bottom: 145.5,
535
- right: 497.5,
536
- top: 190.5
537
- }
538
- },
539
- {
540
- unicode: 34,
541
- advance: 0.31982421875,
542
- planeBounds: {
543
- left: 0.049409125974004715,
544
- bottom: 0.48691155587022,
545
- right: 0.2840869677759953,
546
- top: 0.77187750662978
547
- },
548
- atlasBounds: {
549
- left: 486.5,
550
- bottom: 213.5,
551
- right: 500.5,
552
- top: 230.5
553
- }
554
- },
555
- {
556
- unicode: 35,
557
- advance: 0.61572265625,
558
- planeBounds: {
559
- left: 0.037219103997511785,
560
- bottom: -0.02169206718177056,
561
- right: 0.6239137085024882,
562
- top: 0.7326295671817705
563
- },
564
- atlasBounds: {
565
- left: 66.5,
566
- bottom: 51.5,
567
- right: 101.5,
568
- top: 96.5
569
- }
570
- },
571
- {
572
- unicode: 36,
573
- advance: 0.5615234375,
574
- planeBounds: {
575
- left: 0.02956531458715296,
576
- bottom: -0.12381369908983761,
577
- right: 0.5324464041628472,
578
- top: 0.8484230740898377
579
- },
580
- atlasBounds: {
581
- left: 109.5,
582
- bottom: 197.5,
583
- right: 139.5,
584
- top: 255.5
585
- }
586
- },
587
- {
588
- unicode: 37,
589
- advance: 0.732421875,
590
- planeBounds: {
591
- left: 0.026481776289942378,
592
- bottom: -0.030073418674698794,
593
- right: 0.7137525987100576,
594
- top: 0.7410109186746989
595
- },
596
- atlasBounds: {
597
- left: 88.5,
598
- bottom: 144.5,
599
- right: 129.5,
600
- top: 190.5
601
- }
602
- },
603
- {
604
- unicode: 38,
605
- advance: 0.62158203125,
606
- planeBounds: {
607
- left: 0.03225572125458355,
608
- bottom: -0.030073418674698794,
609
- right: 0.6357130287454166,
610
- top: 0.7410109186746989
611
- },
612
- atlasBounds: {
613
- left: 130.5,
614
- bottom: 144.5,
615
- right: 166.5,
616
- top: 190.5
617
- }
618
- },
619
- {
620
- unicode: 39,
621
- advance: 0.17431640625,
622
- planeBounds: {
623
- left: 0.028244602049502358,
624
- bottom: 0.49895501673814824,
625
- right: 0.14558352295049765,
626
- top: 0.7671582645118518
627
- },
628
- atlasBounds: {
629
- left: 498.5,
630
- bottom: 62.5,
631
- right: 505.5,
632
- top: 78.5
633
- }
634
- },
635
- {
636
- unicode: 40,
637
- advance: 0.341796875,
638
- planeBounds: {
639
- left: 0.042983329377291775,
640
- bottom: -0.250029542422407,
641
- right: 0.34471198312270823,
642
- top: 0.8227834486724072
643
- },
644
- atlasBounds: {
645
- left: 0.5,
646
- bottom: 191.5,
647
- right: 18.5,
648
- top: 255.5
649
- }
650
- },
651
- {
652
- unicode: 41,
653
- advance: 0.34765625,
654
- planeBounds: {
655
- left: -0.003159248747708225,
656
- bottom: -0.250029542422407,
657
- right: 0.29856940499770823,
658
- top: 0.8227834486724072
659
- },
660
- atlasBounds: {
661
- left: 19.5,
662
- bottom: 191.5,
663
- right: 37.5,
664
- top: 255.5
665
- }
666
- },
667
- {
668
- unicode: 42,
669
- advance: 0.4306640625,
670
- planeBounds: {
671
- left: -0.011208599684062338,
672
- bottom: 0.27785390031593765,
673
- right: 0.44138438093406235,
674
- top: 0.7304468809340623
675
- },
676
- atlasBounds: {
677
- left: 449.5,
678
- bottom: 23.5,
679
- right: 476.5,
680
- top: 50.5
681
- }
682
- },
683
- {
684
- unicode: 43,
685
- advance: 0.56689453125,
686
- planeBounds: {
687
- left: 0.01353503347629649,
688
- bottom: 0.053493525733368255,
689
- right: 0.5499415290237036,
690
- top: 0.6066627242666317
691
- },
692
- atlasBounds: {
693
- left: 361.5,
694
- bottom: 17.5,
695
- right: 393.5,
696
- top: 50.5
697
- }
698
- },
699
- {
700
- unicode: 44,
701
- advance: 0.1962890625,
702
- planeBounds: {
703
- left: -0.009919475797210583,
704
- bottom: -0.15981695975478,
705
- right: 0.1744702570472106,
706
- top: 0.12514899100478
707
- },
708
- atlasBounds: {
709
- left: 498.5,
710
- bottom: 79.5,
711
- right: 509.5,
712
- top: 96.5
713
- }
714
- },
715
- {
716
- unicode: 45,
717
- advance: 0.27587890625,
718
- planeBounds: {
719
- left: -0.00527594412977999,
720
- bottom: 0.24333249267450235,
721
- right: 0.27969000662978,
722
- top: 0.36067141357549765
723
- },
724
- atlasBounds: {
725
- left: 52.5,
726
- bottom: 7.5,
727
- right: 69.5,
728
- top: 14.5
729
- }
730
- },
731
- {
732
- unicode: 46,
733
- advance: 0.26318359375,
734
- planeBounds: {
735
- left: 0.051032680313645884,
736
- bottom: -0.027092319686354116,
737
- right: 0.20189700718635412,
738
- top: 0.12377200718635412
739
- },
740
- atlasBounds: {
741
- left: 501.5,
742
- bottom: 221.5,
743
- right: 510.5,
744
- top: 230.5
745
- }
746
- },
747
- {
748
- unicode: 47,
749
- advance: 0.412109375,
750
- planeBounds: {
751
- left: -0.013733006073205867,
752
- bottom: -0.08573505127848349,
753
- right: 0.4053345685732059,
754
- top: 0.7356373950284835
755
- },
756
- atlasBounds: {
757
- left: 252.5,
758
- bottom: 206.5,
759
- right: 277.5,
760
- top: 255.5
761
- }
762
- },
763
- {
764
- unicode: 48,
765
- advance: 0.5615234375,
766
- planeBounds: {
767
- left: 0.037458384830081196,
768
- bottom: -0.030073418674698794,
769
- right: 0.5235767714199189,
770
- top: 0.7410109186746989
771
- },
772
- atlasBounds: {
773
- left: 167.5,
774
- bottom: 144.5,
775
- right: 196.5,
776
- top: 190.5
777
- }
778
- },
779
- {
780
- unicode: 49,
781
- advance: 0.5615234375,
782
- planeBounds: {
783
- left: 0.06023674350936354,
784
- bottom: -0.01998308280677056,
785
- right: 0.37872810024063647,
786
- top: 0.7343385515567705
787
- },
788
- atlasBounds: {
789
- left: 488.5,
790
- bottom: 97.5,
791
- right: 507.5,
792
- top: 142.5
793
- }
794
- },
795
- {
796
- unicode: 50,
797
- advance: 0.5615234375,
798
- planeBounds: {
799
- left: 0.025334353719224725,
800
- bottom: -0.01680925468177056,
801
- right: 0.5449781462807752,
802
- top: 0.7375123796817705
803
- },
804
- atlasBounds: {
805
- left: 278.5,
806
- bottom: 51.5,
807
- right: 309.5,
808
- top: 96.5
809
- }
810
- },
811
- {
812
- unicode: 51,
813
- advance: 0.5615234375,
814
- planeBounds: {
815
- left: 0.028181041080081196,
816
- bottom: -0.030073418674698794,
817
- right: 0.5142994276699189,
818
- top: 0.7410109186746989
819
- },
820
- atlasBounds: {
821
- left: 197.5,
822
- bottom: 144.5,
823
- right: 226.5,
824
- top: 190.5
825
- }
826
- },
827
- {
828
- unicode: 52,
829
- advance: 0.5615234375,
830
- planeBounds: {
831
- left: 0.005886103858368255,
832
- bottom: -0.02169206718177056,
833
- right: 0.5590553023916317,
834
- top: 0.7326295671817705
835
- },
836
- atlasBounds: {
837
- left: 310.5,
838
- bottom: 51.5,
839
- right: 343.5,
840
- top: 96.5
841
- }
842
- },
843
- {
844
- unicode: 53,
845
- advance: 0.5615234375,
846
- planeBounds: {
847
- left: 0.055524791080081196,
848
- bottom: -0.02657487968177056,
849
- right: 0.5416431776699189,
850
- top: 0.7277467546817705
851
- },
852
- atlasBounds: {
853
- left: 344.5,
854
- bottom: 51.5,
855
- right: 373.5,
856
- top: 96.5
857
- }
858
- },
859
- {
860
- unicode: 54,
861
- advance: 0.5615234375,
862
- planeBounds: {
863
- left: 0.046003306705081196,
864
- bottom: -0.034712090549698794,
865
- right: 0.5321216932949189,
866
- top: 0.7363722467996989
867
- },
868
- atlasBounds: {
869
- left: 227.5,
870
- bottom: 144.5,
871
- right: 256.5,
872
- top: 190.5
873
- }
874
- },
875
- {
876
- unicode: 55,
877
- advance: 0.5615234375,
878
- planeBounds: {
879
- left: 0.018010134969224725,
880
- bottom: -0.02169206718177056,
881
- right: 0.5376539275307752,
882
- top: 0.7326295671817705
883
- },
884
- atlasBounds: {
885
- left: 374.5,
886
- bottom: 51.5,
887
- right: 405.5,
888
- top: 96.5
889
- }
890
- },
891
- {
892
- unicode: 56,
893
- advance: 0.5615234375,
894
- planeBounds: {
895
- left: 0.037702525455081196,
896
- bottom: -0.030073418674698794,
897
- right: 0.5238209120449189,
898
- top: 0.7410109186746989
899
- },
900
- atlasBounds: {
901
- left: 257.5,
902
- bottom: 144.5,
903
- right: 286.5,
904
- top: 190.5
905
- }
906
- },
907
- {
908
- unicode: 57,
909
- advance: 0.5615234375,
910
- planeBounds: {
911
- left: 0.029401744205081196,
912
- bottom: -0.025434746799698794,
913
- right: 0.5155201307949189,
914
- top: 0.7456495905496989
915
- },
916
- atlasBounds: {
917
- left: 287.5,
918
- bottom: 144.5,
919
- right: 316.5,
920
- top: 190.5
921
- }
922
- },
923
- {
924
- unicode: 58,
925
- advance: 0.2421875,
926
- planeBounds: {
927
- left: 0.046394008438645884,
928
- bottom: -0.029431286627488215,
929
- right: 0.19725833531135412,
930
- top: 0.5572633178774882
931
- },
932
- atlasBounds: {
933
- left: 439.5,
934
- bottom: 61.5,
935
- right: 448.5,
936
- top: 96.5
937
- }
938
- },
939
- {
940
- unicode: 59,
941
- advance: 0.21142578125,
942
- planeBounds: {
943
- left: 0.001066852327789419,
944
- bottom: -0.16459733294591408,
945
- right: 0.1854565851722106,
946
- top: 0.556198895445914
947
- },
948
- atlasBounds: {
949
- left: 406.5,
950
- bottom: 53.5,
951
- right: 417.5,
952
- top: 96.5
953
- }
954
- },
955
- {
956
- unicode: 60,
957
- advance: 0.50830078125,
958
- planeBounds: {
959
- left: 0.016948142433865897,
960
- bottom: 0.0726146348300812,
961
- right: 0.4527784200661341,
962
- top: 0.5587330214199189
963
- },
964
- atlasBounds: {
965
- left: 394.5,
966
- bottom: 21.5,
967
- right: 420.5,
968
- top: 50.5
969
- }
970
- },
971
- {
972
- unicode: 61,
973
- advance: 0.548828125,
974
- planeBounds: {
975
- left: 0.051535540940937666,
976
- bottom: 0.17620354038436353,
977
- right: 0.5041285215590624,
978
- top: 0.49469489711563647
979
- },
980
- atlasBounds: {
981
- left: 477.5,
982
- bottom: 31.5,
983
- right: 504.5,
984
- top: 50.5
985
- }
986
- },
987
- {
988
- unicode: 62,
989
- advance: 0.5224609375,
990
- planeBounds: {
991
- left: 0.047629290940937666,
992
- bottom: 0.0731029160800812,
993
- right: 0.5002222715590624,
994
- top: 0.5592213026699189
995
- },
996
- atlasBounds: {
997
- left: 421.5,
998
- bottom: 21.5,
999
- right: 448.5,
1000
- top: 50.5
1001
- }
1002
- },
1003
- {
1004
- unicode: 63,
1005
- advance: 0.47216796875,
1006
- planeBounds: {
1007
- left: 0.016704001808865897,
1008
- bottom: -0.027876153049698794,
1009
- right: 0.4525342794411341,
1010
- top: 0.7432081842996989
1011
- },
1012
- atlasBounds: {
1013
- left: 317.5,
1014
- bottom: 144.5,
1015
- right: 343.5,
1016
- top: 190.5
1017
- }
1018
- },
1019
- {
1020
- unicode: 64,
1021
- advance: 0.89794921875,
1022
- planeBounds: {
1023
- left: 0.034064457306783605,
1024
- bottom: -0.23896750384690937,
1025
- right: 0.8721996065996072,
1026
- top: 0.7165065663469093
1027
- },
1028
- atlasBounds: {
1029
- left: 155.5,
1030
- bottom: 198.5,
1031
- right: 205.5,
1032
- top: 255.5
1033
- }
1034
- },
1035
- {
1036
- unicode: 65,
1037
- advance: 0.65234375,
1038
- planeBounds: {
1039
- left: -0.008838044092129387,
1040
- bottom: -0.02169206718177056,
1041
- right: 0.6616700753421295,
1042
- top: 0.7326295671817705
1043
- },
1044
- atlasBounds: {
1045
- left: 237.5,
1046
- bottom: 51.5,
1047
- right: 277.5,
1048
- top: 96.5
1049
- }
1050
- },
1051
- {
1052
- unicode: 66,
1053
- advance: 0.62255859375,
1054
- planeBounds: {
1055
- left: 0.06464099434422473,
1056
- bottom: -0.02169206718177056,
1057
- right: 0.5842847869057752,
1058
- top: 0.7326295671817705
1059
- },
1060
- atlasBounds: {
1061
- left: 205.5,
1062
- bottom: 51.5,
1063
- right: 236.5,
1064
- top: 96.5
1065
- }
1066
- },
1067
- {
1068
- unicode: 67,
1069
- advance: 0.65087890625,
1070
- planeBounds: {
1071
- left: 0.038439807122511785,
1072
- bottom: -0.030073418674698794,
1073
- right: 0.6251344116274882,
1074
- top: 0.7410109186746989
1075
- },
1076
- atlasBounds: {
1077
- left: 344.5,
1078
- bottom: 144.5,
1079
- right: 379.5,
1080
- top: 190.5
1081
- }
1082
- },
1083
- {
1084
- unicode: 68,
1085
- advance: 0.65576171875,
1086
- planeBounds: {
1087
- left: 0.06301501010836826,
1088
- bottom: -0.02169206718177056,
1089
- right: 0.6161842086416317,
1090
- top: 0.7326295671817705
1091
- },
1092
- atlasBounds: {
1093
- left: 162.5,
1094
- bottom: 51.5,
1095
- right: 195.5,
1096
- top: 96.5
1097
- }
1098
- },
1099
- {
1100
- unicode: 69,
1101
- advance: 0.568359375,
1102
- planeBounds: {
1103
- left: 0.0652904160800812,
1104
- bottom: -0.02169206718177056,
1105
- right: 0.5514088026699189,
1106
- top: 0.7326295671817705
1107
- },
1108
- atlasBounds: {
1109
- left: 132.5,
1110
- bottom: 51.5,
1111
- right: 161.5,
1112
- top: 96.5
1113
- }
1114
- },
1115
- {
1116
- unicode: 70,
1117
- advance: 0.552734375,
1118
- planeBounds: {
1119
- left: 0.059675181705081196,
1120
- bottom: -0.02169206718177056,
1121
- right: 0.5457935682949189,
1122
- top: 0.7326295671817705
1123
- },
1124
- atlasBounds: {
1125
- left: 102.5,
1126
- bottom: 51.5,
1127
- right: 131.5,
1128
- top: 96.5
1129
- }
1130
- },
1131
- {
1132
- unicode: 71,
1133
- advance: 0.68115234375,
1134
- planeBounds: {
1135
- left: 0.040148791497511785,
1136
- bottom: -0.030073418674698794,
1137
- right: 0.6268433960024882,
1138
- top: 0.7410109186746989
1139
- },
1140
- atlasBounds: {
1141
- left: 380.5,
1142
- bottom: 144.5,
1143
- right: 415.5,
1144
- top: 190.5
1145
- }
1146
- },
1147
- {
1148
- unicode: 72,
1149
- advance: 0.712890625,
1150
- planeBounds: {
1151
- left: 0.062365588372511785,
1152
- bottom: -0.02169206718177056,
1153
- right: 0.6490601928774882,
1154
- top: 0.7326295671817705
1155
- },
1156
- atlasBounds: {
1157
- left: 30.5,
1158
- bottom: 51.5,
1159
- right: 65.5,
1160
- top: 96.5
1161
- }
1162
- },
1163
- {
1164
- unicode: 73,
1165
- advance: 0.27197265625,
1166
- planeBounds: {
1167
- left: 0.06917965680657412,
1168
- bottom: -0.02169206718177056,
1169
- right: 0.20328128069342588,
1170
- top: 0.7326295671817705
1171
- },
1172
- atlasBounds: {
1173
- left: 196.5,
1174
- bottom: 51.5,
1175
- right: 204.5,
1176
- top: 96.5
1177
- }
1178
- },
1179
- {
1180
- unicode: 74,
1181
- advance: 0.5517578125,
1182
- planeBounds: {
1183
- left: 0.007184947330081194,
1184
- bottom: -0.02657487968177056,
1185
- right: 0.4933033339199188,
1186
- top: 0.7277467546817705
1187
- },
1188
- atlasBounds: {
1189
- left: 0.5,
1190
- bottom: 51.5,
1191
- right: 29.5,
1192
- top: 96.5
1193
- }
1194
- },
1195
- {
1196
- unicode: 75,
1197
- advance: 0.626953125,
1198
- planeBounds: {
1199
- left: 0.061633166497511785,
1200
- bottom: -0.02169206718177056,
1201
- right: 0.6483277710024882,
1202
- top: 0.7326295671817705
1203
- },
1204
- atlasBounds: {
1205
- left: 452.5,
1206
- bottom: 97.5,
1207
- right: 487.5,
1208
- top: 142.5
1209
- }
1210
- },
1211
- {
1212
- unicode: 76,
1213
- advance: 0.5380859375,
1214
- planeBounds: {
1215
- left: 0.06341786132300943,
1216
- bottom: -0.02169206718177056,
1217
- right: 0.5327735449269906,
1218
- top: 0.7326295671817705
1219
- },
1220
- atlasBounds: {
1221
- left: 423.5,
1222
- bottom: 97.5,
1223
- right: 451.5,
1224
- top: 142.5
1225
- }
1226
- },
1227
- {
1228
- unicode: 77,
1229
- advance: 0.873046875,
1230
- planeBounds: {
1231
- left: 0.05911847969322944,
1232
- bottom: -0.02169206718177056,
1233
- right: 0.8134401140567705,
1234
- top: 0.7326295671817705
1235
- },
1236
- atlasBounds: {
1237
- left: 377.5,
1238
- bottom: 97.5,
1239
- right: 422.5,
1240
- top: 142.5
1241
- }
1242
- },
1243
- {
1244
- unicode: 78,
1245
- advance: 0.712890625,
1246
- planeBounds: {
1247
- left: 0.062365588372511785,
1248
- bottom: -0.02169206718177056,
1249
- right: 0.6490601928774882,
1250
- top: 0.7326295671817705
1251
- },
1252
- atlasBounds: {
1253
- left: 341.5,
1254
- bottom: 97.5,
1255
- right: 376.5,
1256
- top: 142.5
1257
- }
1258
- },
1259
- {
1260
- unicode: 79,
1261
- advance: 0.6875,
1262
- planeBounds: {
1263
- left: 0.033395854136655315,
1264
- bottom: -0.030073418674698794,
1265
- right: 0.6536158646133446,
1266
- top: 0.7410109186746989
1267
- },
1268
- atlasBounds: {
1269
- left: 416.5,
1270
- bottom: 144.5,
1271
- right: 453.5,
1272
- top: 190.5
1273
- }
1274
- },
1275
- {
1276
- unicode: 80,
1277
- advance: 0.630859375,
1278
- planeBounds: {
1279
- left: 0.061550166358368255,
1280
- bottom: -0.02169206718177056,
1281
- right: 0.6147193648916317,
1282
- top: 0.7326295671817705
1283
- },
1284
- atlasBounds: {
1285
- left: 273.5,
1286
- bottom: 97.5,
1287
- right: 306.5,
1288
- top: 142.5
1289
- }
1290
- },
1291
- {
1292
- unicode: 81,
1293
- advance: 0.6875,
1294
- planeBounds: {
1295
- left: 0.030466166636655315,
1296
- bottom: -0.14391866037519643,
1297
- right: 0.6506861771133446,
1298
- top: 0.7445045978751964
1299
- },
1300
- atlasBounds: {
1301
- left: 214.5,
1302
- bottom: 202.5,
1303
- right: 251.5,
1304
- top: 255.5
1305
- }
1306
- },
1307
- {
1308
- unicode: 82,
1309
- advance: 0.61572265625,
1310
- planeBounds: {
1311
- left: 0.06350329135836826,
1312
- bottom: -0.02169206718177056,
1313
- right: 0.6166724898916317,
1314
- top: 0.7326295671817705
1315
- },
1316
- atlasBounds: {
1317
- left: 186.5,
1318
- bottom: 97.5,
1319
- right: 219.5,
1320
- top: 142.5
1321
- }
1322
- },
1323
- {
1324
- unicode: 83,
1325
- advance: 0.59326171875,
1326
- planeBounds: {
1327
- left: 0.020778681983368255,
1328
- bottom: -0.030073418674698794,
1329
- right: 0.5739478805166317,
1330
- top: 0.7410109186746989
1331
- },
1332
- atlasBounds: {
1333
- left: 454.5,
1334
- bottom: 144.5,
1335
- right: 487.5,
1336
- top: 190.5
1337
- }
1338
- },
1339
- {
1340
- unicode: 84,
1341
- advance: 0.5966796875,
1342
- planeBounds: {
1343
- left: 0.005480822747511787,
1344
- bottom: -0.02169206718177056,
1345
- right: 0.5921754272524882,
1346
- top: 0.7326295671817705
1347
- },
1348
- atlasBounds: {
1349
- left: 112.5,
1350
- bottom: 97.5,
1351
- right: 147.5,
1352
- top: 142.5
1353
- }
1354
- },
1355
- {
1356
- unicode: 85,
1357
- advance: 0.6484375,
1358
- planeBounds: {
1359
- left: 0.049098994483368255,
1360
- bottom: -0.02657487968177056,
1361
- right: 0.6022681930166317,
1362
- top: 0.7277467546817705
1363
- },
1364
- atlasBounds: {
1365
- left: 78.5,
1366
- bottom: 97.5,
1367
- right: 111.5,
1368
- top: 142.5
1369
- }
1370
- },
1371
- {
1372
- unicode: 86,
1373
- advance: 0.63623046875,
1374
- planeBounds: {
1375
- left: -0.008269192599201152,
1376
- bottom: -0.02169206718177056,
1377
- right: 0.6454762238492011,
1378
- top: 0.7326295671817705
1379
- },
1380
- atlasBounds: {
1381
- left: 38.5,
1382
- bottom: 97.5,
1383
- right: 77.5,
1384
- top: 142.5
1385
- }
1386
- },
1387
- {
1388
- unicode: 87,
1389
- advance: 0.88720703125,
1390
- planeBounds: {
1391
- left: 0.011923628617731797,
1392
- bottom: -0.02169206718177056,
1393
- right: 0.8835841838822683,
1394
- top: 0.7326295671817705
1395
- },
1396
- atlasBounds: {
1397
- left: 220.5,
1398
- bottom: 97.5,
1399
- right: 272.5,
1400
- top: 142.5
1401
- }
1402
- },
1403
- {
1404
- unicode: 88,
1405
- advance: 0.626953125,
1406
- planeBounds: {
1407
- left: 0.004098979136655316,
1408
- bottom: -0.02169206718177056,
1409
- right: 0.6243189896133446,
1410
- top: 0.7326295671817705
1411
- },
1412
- atlasBounds: {
1413
- left: 0.5,
1414
- bottom: 97.5,
1415
- right: 37.5,
1416
- top: 142.5
1417
- }
1418
- },
1419
- {
1420
- unicode: 89,
1421
- advance: 0.6005859375,
1422
- planeBounds: {
1423
- left: -0.010793598988344685,
1424
- bottom: -0.02169206718177056,
1425
- right: 0.6094264114883446,
1426
- top: 0.7326295671817705
1427
- },
1428
- atlasBounds: {
1429
- left: 148.5,
1430
- bottom: 97.5,
1431
- right: 185.5,
1432
- top: 142.5
1433
- }
1434
- },
1435
- {
1436
- unicode: 90,
1437
- advance: 0.5986328125,
1438
- planeBounds: {
1439
- left: 0.024196650733368255,
1440
- bottom: -0.02169206718177056,
1441
- right: 0.5773658492666317,
1442
- top: 0.7326295671817705
1443
- },
1444
- atlasBounds: {
1445
- left: 307.5,
1446
- bottom: 97.5,
1447
- right: 340.5,
1448
- top: 142.5
1449
- }
1450
- },
1451
- {
1452
- unicode: 91,
1453
- advance: 0.26513671875,
1454
- planeBounds: {
1455
- left: 0.05437250871693295,
1456
- bottom: -0.17280296457569408,
1457
- right: 0.27228764753306706,
1458
- top: 0.8329592145756942
1459
- },
1460
- atlasBounds: {
1461
- left: 59.5,
1462
- bottom: 195.5,
1463
- right: 72.5,
1464
- top: 255.5
1465
- }
1466
- },
1467
- {
1468
- unicode: 92,
1469
- advance: 0.41015625,
1470
- planeBounds: {
1471
- left: 0.0014037126767941326,
1472
- bottom: -0.08573505127848349,
1473
- right: 0.4204712873232059,
1474
- top: 0.7356373950284835
1475
- },
1476
- atlasBounds: {
1477
- left: 278.5,
1478
- bottom: 206.5,
1479
- right: 303.5,
1480
- top: 255.5
1481
- }
1482
- },
1483
- {
1484
- unicode: 93,
1485
- advance: 0.26513671875,
1486
- planeBounds: {
1487
- left: -0.020659233400995285,
1488
- bottom: -0.17280296457569408,
1489
- right: 0.2140186084009953,
1490
- top: 0.8329592145756942
1491
- },
1492
- atlasBounds: {
1493
- left: 94.5,
1494
- bottom: 195.5,
1495
- right: 108.5,
1496
- top: 255.5
1497
- }
1498
- },
1499
- {
1500
- unicode: 94,
1501
- advance: 0.41796875,
1502
- planeBounds: {
1503
- left: 0.006855376669722368,
1504
- bottom: 0.33229482979472236,
1505
- right: 0.40916024833027764,
1506
- top: 0.7345997014552776
1507
- },
1508
- atlasBounds: {
1509
- left: 486.5,
1510
- bottom: 231.5,
1511
- right: 510.5,
1512
- top: 255.5
1513
- }
1514
- },
1515
- {
1516
- unicode: 95,
1517
- advance: 0.451171875,
1518
- planeBounds: {
1519
- left: -0.017473255794918804,
1520
- bottom: -0.09553469482549765,
1521
- right: 0.4686451307949188,
1522
- top: 0.021804226075497646
1523
- },
1524
- atlasBounds: {
1525
- left: 70.5,
1526
- bottom: 7.5,
1527
- right: 99.5,
1528
- top: 14.5
1529
- }
1530
- },
1531
- {
1532
- unicode: 96,
1533
- advance: 0.30908203125,
1534
- planeBounds: {
1535
- left: 0.00391839948107648,
1536
- bottom: 0.5860277898277895,
1537
- right: 0.2553589442689235,
1538
- top: 0.7704175226722105
1539
- },
1540
- atlasBounds: {
1541
- left: 36.5,
1542
- bottom: 3.5,
1543
- right: 51.5,
1544
- top: 14.5
1545
- }
1546
- },
1547
- {
1548
- unicode: 97,
1549
- advance: 0.5439453125,
1550
- planeBounds: {
1551
- left: 0.028181041080081196,
1552
- bottom: -0.029187146002488215,
1553
- right: 0.5142994276699189,
1554
- top: 0.5575074585024882
1555
- },
1556
- atlasBounds: {
1557
- left: 30.5,
1558
- bottom: 15.5,
1559
- right: 59.5,
1560
- top: 50.5
1561
- }
1562
- },
1563
- {
1564
- unicode: 98,
1565
- advance: 0.56103515625,
1566
- planeBounds: {
1567
- left: 0.048932994205081196,
1568
- bottom: -0.032187684160555265,
1569
- right: 0.5350513807949189,
1570
- top: 0.7724220591605554
1571
- },
1572
- atlasBounds: {
1573
- left: 304.5,
1574
- bottom: 207.5,
1575
- right: 333.5,
1576
- top: 255.5
1577
- }
1578
- },
1579
- {
1580
- unicode: 99,
1581
- advance: 0.5234375,
1582
- planeBounds: {
1583
- left: 0.024518931705081196,
1584
- bottom: -0.029187146002488215,
1585
- right: 0.5106373182949189,
1586
- top: 0.5575074585024882
1587
- },
1588
- atlasBounds: {
1589
- left: 0.5,
1590
- bottom: 15.5,
1591
- right: 29.5,
1592
- top: 50.5
1593
- }
1594
- },
1595
- {
1596
- unicode: 100,
1597
- advance: 0.56396484375,
1598
- planeBounds: {
1599
- left: 0.026227916080081196,
1600
- bottom: -0.032187684160555265,
1601
- right: 0.5123463026699189,
1602
- top: 0.7724220591605554
1603
- },
1604
- atlasBounds: {
1605
- left: 334.5,
1606
- bottom: 207.5,
1607
- right: 363.5,
1608
- top: 255.5
1609
- }
1610
- },
1611
- {
1612
- unicode: 101,
1613
- advance: 0.52978515625,
1614
- planeBounds: {
1615
- left: 0.026472056705081196,
1616
- bottom: -0.029187146002488215,
1617
- right: 0.5125904432949189,
1618
- top: 0.5575074585024882
1619
- },
1620
- atlasBounds: {
1621
- left: 468.5,
1622
- bottom: 61.5,
1623
- right: 497.5,
1624
- top: 96.5
1625
- }
1626
- },
1627
- {
1628
- unicode: 102,
1629
- advance: 0.34716796875,
1630
- planeBounds: {
1631
- left: 0.004575110905578838,
1632
- bottom: -0.022177918535555265,
1633
- right: 0.3733545765944212,
1634
- top: 0.7824318247855554
1635
- },
1636
- atlasBounds: {
1637
- left: 364.5,
1638
- bottom: 207.5,
1639
- right: 386.5,
1640
- top: 255.5
1641
- }
1642
- },
1643
- {
1644
- unicode: 103,
1645
- advance: 0.56103515625,
1646
- planeBounds: {
1647
- left: 0.026960337955081196,
1648
- bottom: -0.22888445766762702,
1649
- right: 0.5130787245449189,
1650
- top: 0.558962582667627
1651
- },
1652
- atlasBounds: {
1653
- left: 28.5,
1654
- bottom: 143.5,
1655
- right: 57.5,
1656
- top: 190.5
1657
- }
1658
- },
1659
- {
1660
- unicode: 104,
1661
- advance: 0.55078125,
1662
- planeBounds: {
1663
- left: 0.049826556565937666,
1664
- bottom: -0.01892352016762703,
1665
- right: 0.5024195371840624,
1666
- top: 0.768923520167627
1667
- },
1668
- atlasBounds: {
1669
- left: 0.5,
1670
- bottom: 143.5,
1671
- right: 27.5,
1672
- top: 190.5
1673
- }
1674
- },
1675
- {
1676
- unicode: 105,
1677
- advance: 0.24267578125,
1678
- planeBounds: {
1679
- left: 0.046882289688645884,
1680
- bottom: -0.01680925468177056,
1681
- right: 0.19774661656135412,
1682
- top: 0.7375123796817705
1683
- },
1684
- atlasBounds: {
1685
- left: 498.5,
1686
- bottom: 145.5,
1687
- right: 507.5,
1688
- top: 190.5
1689
- }
1690
- },
1691
- {
1692
- unicode: 106,
1693
- advance: 0.23876953125,
1694
- planeBounds: {
1695
- left: -0.048979545900995285,
1696
- bottom: -0.2324562772148376,
1697
- right: 0.1856982959009953,
1698
- top: 0.7397804959648377
1699
- },
1700
- atlasBounds: {
1701
- left: 140.5,
1702
- bottom: 197.5,
1703
- right: 154.5,
1704
- top: 255.5
1705
- }
1706
- },
1707
- {
1708
- unicode: 107,
1709
- advance: 0.5068359375,
1710
- planeBounds: {
1711
- left: 0.044294322330081196,
1712
- bottom: -0.01892352016762703,
1713
- right: 0.5304127089199189,
1714
- top: 0.768923520167627
1715
- },
1716
- atlasBounds: {
1717
- left: 58.5,
1718
- bottom: 143.5,
1719
- right: 87.5,
1720
- top: 190.5
1721
- }
1722
- },
1723
- {
1724
- unicode: 108,
1725
- advance: 0.24267578125,
1726
- planeBounds: {
1727
- left: 0.05428707868157412,
1728
- bottom: -0.01892352016762703,
1729
- right: 0.18838870256842588,
1730
- top: 0.768923520167627
1731
- },
1732
- atlasBounds: {
1733
- left: 477.5,
1734
- bottom: 208.5,
1735
- right: 485.5,
1736
- top: 255.5
1737
- }
1738
- },
1739
- {
1740
- unicode: 109,
1741
- advance: 0.87646484375,
1742
- planeBounds: {
1743
- left: 0.04430890170737297,
1744
- bottom: -0.024304333502488215,
1745
- right: 0.832155942042627,
1746
- top: 0.5623902710024882
1747
- },
1748
- atlasBounds: {
1749
- left: 116.5,
1750
- bottom: 15.5,
1751
- right: 163.5,
1752
- top: 50.5
1753
- }
1754
- },
1755
- {
1756
- unicode: 110,
1757
- advance: 0.5517578125,
1758
- planeBounds: {
1759
- left: 0.049826556565937666,
1760
- bottom: -0.024304333502488215,
1761
- right: 0.5024195371840624,
1762
- top: 0.5623902710024882
1763
- },
1764
- atlasBounds: {
1765
- left: 60.5,
1766
- bottom: 15.5,
1767
- right: 87.5,
1768
- top: 50.5
1769
- }
1770
- },
1771
- {
1772
- unicode: 111,
1773
- advance: 0.5703125,
1774
- planeBounds: {
1775
- left: 0.025090213094224725,
1776
- bottom: -0.029187146002488215,
1777
- right: 0.5447340056557752,
1778
- top: 0.5575074585024882
1779
- },
1780
- atlasBounds: {
1781
- left: 193.5,
1782
- bottom: 15.5,
1783
- right: 224.5,
1784
- top: 50.5
1785
- }
1786
- },
1787
- {
1788
- unicode: 112,
1789
- advance: 0.56103515625,
1790
- planeBounds: {
1791
- left: 0.048444712955081196,
1792
- bottom: -0.22644305141762702,
1793
- right: 0.5345630995449189,
1794
- top: 0.561403988917627
1795
- },
1796
- atlasBounds: {
1797
- left: 447.5,
1798
- bottom: 208.5,
1799
- right: 476.5,
1800
- top: 255.5
1801
- }
1802
- },
1803
- {
1804
- unicode: 113,
1805
- advance: 0.568359375,
1806
- planeBounds: {
1807
- left: 0.025983775455081196,
1808
- bottom: -0.22644305141762702,
1809
- right: 0.5121021620449189,
1810
- top: 0.561403988917627
1811
- },
1812
- atlasBounds: {
1813
- left: 417.5,
1814
- bottom: 208.5,
1815
- right: 446.5,
1816
- top: 255.5
1817
- }
1818
- },
1819
- {
1820
- unicode: 114,
1821
- advance: 0.33837890625,
1822
- planeBounds: {
1823
- left: 0.045180595002291775,
1824
- bottom: -0.024304333502488215,
1825
- right: 0.34690924874770823,
1826
- top: 0.5623902710024882
1827
- },
1828
- atlasBounds: {
1829
- left: 449.5,
1830
- bottom: 61.5,
1831
- right: 467.5,
1832
- top: 96.5
1833
- }
1834
- },
1835
- {
1836
- unicode: 115,
1837
- advance: 0.515625,
1838
- planeBounds: {
1839
- left: 0.021669814448009427,
1840
- bottom: -0.029187146002488215,
1841
- right: 0.4910254980519906,
1842
- top: 0.5575074585024882
1843
- },
1844
- atlasBounds: {
1845
- left: 164.5,
1846
- bottom: 15.5,
1847
- right: 192.5,
1848
- top: 50.5
1849
- }
1850
- },
1851
- {
1852
- unicode: 116,
1853
- advance: 0.32666015625,
1854
- planeBounds: {
1855
- left: -0.019433670483564695,
1856
- bottom: -0.02877457520298586,
1857
- right: 0.3158203892335647,
1858
- top: 0.675258950202986
1859
- },
1860
- atlasBounds: {
1861
- left: 418.5,
1862
- bottom: 54.5,
1863
- right: 438.5,
1864
- top: 96.5
1865
- }
1866
- },
1867
- {
1868
- unicode: 117,
1869
- advance: 0.55126953125,
1870
- planeBounds: {
1871
- left: 0.048117572190937666,
1872
- bottom: -0.034069958502488215,
1873
- right: 0.5007105528090624,
1874
- top: 0.5526246460024882
1875
- },
1876
- atlasBounds: {
1877
- left: 88.5,
1878
- bottom: 15.5,
1879
- right: 115.5,
1880
- top: 50.5
1881
- }
1882
- },
1883
- {
1884
- unicode: 118,
1885
- advance: 0.484375,
1886
- planeBounds: {
1887
- left: -0.002092396419918806,
1888
- bottom: -0.02080579450955998,
1889
- right: 0.4840259901699188,
1890
- top: 0.5491261070095601
1891
- },
1892
- atlasBounds: {
1893
- left: 331.5,
1894
- bottom: 16.5,
1895
- right: 360.5,
1896
- top: 50.5
1897
- }
1898
- },
1899
- {
1900
- unicode: 119,
1901
- advance: 0.75146484375,
1902
- planeBounds: {
1903
- left: -0.002649098431770561,
1904
- bottom: -0.02080579450955998,
1905
- right: 0.7516725359317705,
1906
- top: 0.5491261070095601
1907
- },
1908
- atlasBounds: {
1909
- left: 225.5,
1910
- bottom: 16.5,
1911
- right: 270.5,
1912
- top: 50.5
1913
- }
1914
- },
1915
- {
1916
- unicode: 120,
1917
- advance: 0.49560546875,
1918
- planeBounds: {
1919
- left: -0.0046143729128470395,
1920
- bottom: -0.02080579450955998,
1921
- right: 0.4982667166628471,
1922
- top: 0.5491261070095601
1923
- },
1924
- atlasBounds: {
1925
- left: 300.5,
1926
- bottom: 16.5,
1927
- right: 330.5,
1928
- top: 50.5
1929
- }
1930
- },
1931
- {
1932
- unicode: 121,
1933
- advance: 0.47314453125,
1934
- planeBounds: {
1935
- left: -0.007219349544918806,
1936
- bottom: -0.23645281704262702,
1937
- right: 0.4788990370449188,
1938
- top: 0.551394223292627
1939
- },
1940
- atlasBounds: {
1941
- left: 387.5,
1942
- bottom: 208.5,
1943
- right: 416.5,
1944
- top: 255.5
1945
- }
1946
- },
1947
- {
1948
- unicode: 122,
1949
- advance: 0.49560546875,
1950
- planeBounds: {
1951
- left: 0.018007705073009427,
1952
- bottom: -0.02080579450955998,
1953
- right: 0.4873633886769906,
1954
- top: 0.5491261070095601
1955
- },
1956
- atlasBounds: {
1957
- left: 271.5,
1958
- bottom: 16.5,
1959
- right: 299.5,
1960
- top: 50.5
1961
- }
1962
- },
1963
- {
1964
- unicode: 123,
1965
- advance: 0.33837890625,
1966
- planeBounds: {
1967
- left: 0.011572188891435306,
1968
- bottom: -0.20234398020069408,
1969
- right: 0.3468262486085647,
1970
- top: 0.8034181989506942
1971
- },
1972
- atlasBounds: {
1973
- left: 73.5,
1974
- bottom: 195.5,
1975
- right: 93.5,
1976
- top: 255.5
1977
- }
1978
- },
1979
- {
1980
- unicode: 124,
1981
- advance: 0.24365234375,
1982
- planeBounds: {
1983
- left: 0.06315671142450235,
1984
- bottom: -0.15466084787519643,
1985
- right: 0.18049563232549765,
1986
- top: 0.7337624103751964
1987
- },
1988
- atlasBounds: {
1989
- left: 206.5,
1990
- bottom: 202.5,
1991
- right: 213.5,
1992
- top: 255.5
1993
- }
1994
- },
1995
- {
1996
- unicode: 125,
1997
- advance: 0.33837890625,
1998
- planeBounds: {
1999
- left: -0.010156326733564695,
2000
- bottom: -0.20234398020069408,
2001
- right: 0.3250977329835647,
2002
- top: 0.8034181989506942
2003
- },
2004
- atlasBounds: {
2005
- left: 38.5,
2006
- bottom: 195.5,
2007
- right: 58.5,
2008
- top: 255.5
2009
- }
2010
- },
2011
- {
2012
- unicode: 126,
2013
- advance: 0.68017578125,
2014
- planeBounds: {
2015
- left: 0.046984728997511785,
2016
- bottom: 0.1766063915990047,
2017
- right: 0.6336793335024882,
2018
- top: 0.4112842334009953
2019
- },
2020
- atlasBounds: {
2021
- left: 0.5,
2022
- bottom: 0.5,
2023
- right: 35.5,
2024
- top: 14.5
2025
- }
2026
- }
2027
- ];
2028
- var kerning = [
2029
- ];
2030
- var defaultFontMetrics = {
2031
- atlas: atlas,
2032
- metrics: metrics,
2033
- glyphs: glyphs,
2034
- kerning: kerning
2035
- };
2036
-
2037
508
  /**
2038
509
  * Enum for supported image types (e.g. NII, NRRD, DICOM)
2039
510
  */
@@ -2274,7 +745,7 @@ declare class NVImage {
2274
745
  intensityRaw2Scaled(raw: number): number;
2275
746
  intensityScaled2Raw(scaled: number): number;
2276
747
  saveToUint8Array(fnm: string, drawing8?: Uint8Array | null): Uint8Array;
2277
- saveToDisk(fnm: string, drawing8?: Uint8Array | null): Uint8Array;
748
+ saveToDisk(fnm?: string, drawing8?: Uint8Array | null): Uint8Array;
2278
749
  static fetchDicomData(url: string, headers?: Record<string, string>): Promise<ArrayBuffer[]>;
2279
750
  static fetchPartial(url: string, bytesToLoad: number, headers?: Record<string, string>): Promise<Response>;
2280
751
  /**
@@ -2853,6 +1324,7 @@ declare class NVUtilities {
2853
1324
  */
2854
1325
  declare class NVMeshLoaders {
2855
1326
  static readTRACT(buffer: ArrayBuffer): TRACT;
1327
+ static readTT(buffer: ArrayBuffer): TT;
2856
1328
  static readTRX(buffer: ArrayBuffer): TRX;
2857
1329
  static readTCK(buffer: ArrayBuffer): TCK;
2858
1330
  static readTRK(buffer: ArrayBuffer): TRK;
@@ -2894,15 +1366,6 @@ type DragReleaseParams = {
2894
1366
  tileIdx: number;
2895
1367
  axCorSag: SLICE_TYPE;
2896
1368
  };
2897
- type FontMetrics = {
2898
- distanceRange: number;
2899
- size: number;
2900
- mets: Record<number, {
2901
- xadv: number;
2902
- uv_lbwh: number[];
2903
- lbwh: number[];
2904
- }>;
2905
- };
2906
1369
  type ColormapListEntry = {
2907
1370
  name: string;
2908
1371
  min: number;
@@ -3037,6 +1500,11 @@ type UIData = {
3037
1500
  loading$: Subject<unknown>;
3038
1501
  dpr?: number;
3039
1502
  };
1503
+ type SaveImageOptions = {
1504
+ filename: string;
1505
+ isSaveDrawing: boolean;
1506
+ volumeByIndex: number;
1507
+ };
3040
1508
  /**
3041
1509
  * Niivue can be attached to a canvas. An instance of Niivue contains methods for
3042
1510
  * loading and rendering NIFTI image data in a WebGL 2.0 context.
@@ -3102,49 +1570,10 @@ declare class Niivue {
3102
1570
  genericVAO: WebGLVertexArrayObject | null;
3103
1571
  unusedVAO: null;
3104
1572
  crosshairs3D: NiivueObject3D | null;
3105
- DEFAULT_FONT_GLYPH_SHEET: any;
3106
- DEFAULT_FONT_METRICS: {
3107
- atlas: {
3108
- type: string;
3109
- distanceRange: number;
3110
- size: number;
3111
- width: number;
3112
- height: number;
3113
- yOrigin: string;
3114
- };
3115
- metrics: {
3116
- emSize: number;
3117
- lineHeight: number;
3118
- ascender: number;
3119
- descender: number;
3120
- underlineY: number;
3121
- underlineThickness: number;
3122
- };
3123
- glyphs: ({
3124
- unicode: number;
3125
- advance: number;
3126
- planeBounds?: undefined;
3127
- atlasBounds?: undefined;
3128
- } | {
3129
- unicode: number;
3130
- advance: number;
3131
- planeBounds: {
3132
- left: number;
3133
- bottom: number;
3134
- right: number;
3135
- top: number;
3136
- };
3137
- atlasBounds: {
3138
- left: number;
3139
- bottom: number;
3140
- right: number;
3141
- top: number;
3142
- };
3143
- })[];
3144
- kerning: never[];
3145
- };
3146
- fontMetrics?: typeof defaultFontMetrics;
3147
- fontMets: FontMetrics | null;
1573
+ private DEFAULT_FONT_GLYPH_SHEET;
1574
+ private DEFAULT_FONT_METRICS;
1575
+ private fontMetrics?;
1576
+ private fontMets;
3148
1577
  backgroundMasksOverlays: number;
3149
1578
  overlayOutlineWidth: number;
3150
1579
  overlayAlphaShader: number;
@@ -3766,10 +2195,10 @@ declare class Niivue {
3766
2195
  * @param isSaveDrawing - determines whether drawing or background image is saved
3767
2196
  * @param volumeByIndex - determines layer to save (0 for background)
3768
2197
  * @param volumeByIndex - determines layer to save (0 for background)
3769
- * @example niivue.saveImage('test.nii', true);
2198
+ * @example niivue.saveImage(\{ filename: "myimage.nii.gz", isSaveDrawing: true \});
3770
2199
  * @see {@link https://niivue.github.io/niivue/features/draw.ui.html|live demo usage}
3771
2200
  */
3772
- saveImage(fnm: string, isSaveDrawing?: boolean, volumeByIndex?: number): Uint8Array | boolean;
2201
+ saveImage(options?: SaveImageOptions): Uint8Array | boolean;
3773
2202
  getMeshIndexByID(id: string | number): number;
3774
2203
  /**
3775
2204
  * change property of mesh, tractogram or connectome
@@ -4369,7 +2798,7 @@ declare class Niivue {
4369
2798
  mouseClick(x: number, y: number, posChange?: number, isDelta?: boolean): void;
4370
2799
  drawRuler(): void;
4371
2800
  drawRuler10cm(startXYendXY: number[]): void;
4372
- screenXY2mm(x: number, y: number, forceSlice?: number): vec3;
2801
+ screenXY2mm(x: number, y: number, forceSlice?: number): vec4;
4373
2802
  dragForPanZoom(startXYendXY: number[]): void;
4374
2803
  dragForCenterButton(startXYendXY: number[]): void;
4375
2804
  dragForSlicer3D(startXYendXY: number[]): void;