@niivue/niivue 0.69.0 → 1.0.0-rc.10

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.
Files changed (415) hide show
  1. package/LICENSE +34 -0
  2. package/LICENSE.fsleyes-plugin-mrs +29 -0
  3. package/PORTING.md +49 -0
  4. package/README.md +204 -8
  5. package/dist/NVConstants.d.ts +87 -0
  6. package/dist/NVControl.d.ts +4 -0
  7. package/dist/NVControlBase-D2fQpaBn.js +37707 -0
  8. package/dist/NVControlBase.d.ts +1024 -0
  9. package/dist/NVControlWebGL2.d.ts +4 -0
  10. package/dist/NVControlWebGPU.d.ts +4 -0
  11. package/dist/NVDocument.d.ts +167 -0
  12. package/dist/NVEvents.d.ts +169 -0
  13. package/dist/NVLoader.d.ts +21 -0
  14. package/dist/NVModel.d.ts +252 -0
  15. package/dist/NVTypes.d.ts +1239 -0
  16. package/dist/annotation/clipper.d.ts +24 -0
  17. package/dist/annotation/index.d.ts +38 -0
  18. package/dist/annotation/pointInRing.d.ts +2 -0
  19. package/dist/annotation/selection.d.ts +38 -0
  20. package/dist/annotation/shapes.d.ts +8 -0
  21. package/dist/annotation/sliceProjection.d.ts +25 -0
  22. package/dist/annotation/stats.d.ts +4 -0
  23. package/dist/annotation/triangulate.d.ts +5 -0
  24. package/dist/annotation/undoRedo.d.ts +13 -0
  25. package/{src/fonts/Ubuntu.json → dist/assets/fonts/Ubuntu.json.d.ts} +473 -470
  26. package/dist/assets/fonts/index.d.ts +1 -0
  27. package/dist/assets/fonts/index.js +4 -0
  28. package/dist/assets/fonts/ubuntu.d.ts +2 -0
  29. package/dist/assets/matcaps/cortex.d.ts +1 -0
  30. package/dist/assets/matcaps/index.d.ts +2 -0
  31. package/dist/assets/matcaps/index.js +6 -0
  32. package/dist/assets/matcaps/shiny.d.ts +1 -0
  33. package/dist/cmap/NVCmaps.d.ts +25 -0
  34. package/dist/codecs/NVGz.d.ts +4 -0
  35. package/dist/codecs/NVGzStream.d.ts +42 -0
  36. package/dist/codecs/NVMatlab.d.ts +2 -0
  37. package/dist/codecs/NVZip.d.ts +30 -0
  38. package/dist/control/NVCanvasViewportController.d.ts +88 -0
  39. package/dist/control/canvasMessage.d.ts +11 -0
  40. package/dist/control/dragModes.d.ts +29 -0
  41. package/dist/control/interactions.d.ts +7 -0
  42. package/dist/control/locationTracking.d.ts +27 -0
  43. package/dist/control/viewBoth.d.ts +38 -0
  44. package/dist/control/viewLifecycle.d.ts +15 -0
  45. package/dist/control/viewWebGL2.d.ts +11 -0
  46. package/dist/control/viewWebGPU.d.ts +11 -0
  47. package/dist/cortex-CBhDullr.js +4 -0
  48. package/dist/drawing/drawingManager.d.ts +43 -0
  49. package/dist/drawing/penTool.d.ts +72 -0
  50. package/dist/drawing/rle.d.ts +9 -0
  51. package/dist/drawing/undo.d.ts +10 -0
  52. package/dist/extension/context.d.ts +63 -0
  53. package/dist/extension/types.d.ts +143 -0
  54. package/dist/gl/NVViewGL.d.ts +101 -0
  55. package/dist/gl/bench.d.ts +43 -0
  56. package/dist/gl/colorbar.d.ts +31 -0
  57. package/dist/gl/colorbarShader.d.ts +2 -0
  58. package/dist/gl/crosshair.d.ts +16 -0
  59. package/dist/gl/depthPickShader.d.ts +4 -0
  60. package/dist/gl/font.d.ts +27 -0
  61. package/dist/gl/fontShader.d.ts +2 -0
  62. package/dist/gl/gradient.d.ts +14 -0
  63. package/dist/gl/line.d.ts +14 -0
  64. package/dist/gl/lineShader.d.ts +2 -0
  65. package/dist/gl/mesh.d.ts +21 -0
  66. package/dist/gl/meshShader.d.ts +24 -0
  67. package/dist/gl/orientChunked.d.ts +40 -0
  68. package/dist/gl/orientOverlay.d.ts +135 -0
  69. package/dist/gl/panelShader.d.ts +2 -0
  70. package/dist/gl/polygon.d.ts +15 -0
  71. package/dist/gl/polygon3d.d.ts +16 -0
  72. package/dist/gl/polygon3dShader.d.ts +2 -0
  73. package/dist/gl/polygonShader.d.ts +2 -0
  74. package/dist/gl/render.d.ts +320 -0
  75. package/dist/gl/renderShader.d.ts +2 -0
  76. package/dist/gl/shader.d.ts +8 -0
  77. package/dist/gl/slice.d.ts +39 -0
  78. package/dist/gl/sliceShader.d.ts +2 -0
  79. package/dist/gl/thumbnail.d.ts +16 -0
  80. package/dist/gl/volumeShaderLib.d.ts +2 -0
  81. package/dist/index-Cbb_IM7q.js +148 -0
  82. package/dist/index.d.ts +23 -5454
  83. package/dist/index.webgl2.d.ts +19 -0
  84. package/dist/index.webgpu.d.ts +19 -0
  85. package/dist/logger.d.ts +34 -0
  86. package/dist/math/NVTransforms.d.ts +69 -0
  87. package/dist/mesh/NVMesh.d.ts +24 -0
  88. package/dist/mesh/NVShapes.d.ts +19 -0
  89. package/dist/mesh/connectome/index.d.ts +44 -0
  90. package/dist/mesh/connectome/readers/jcon.d.ts +7 -0
  91. package/dist/mesh/layers/index.d.ts +44 -0
  92. package/dist/mesh/layers/readers/curv.d.ts +18 -0
  93. package/dist/mesh/layers/readers/smp.d.ts +12 -0
  94. package/dist/mesh/layers/readers/stc.d.ts +13 -0
  95. package/dist/mesh/readers/asc.d.ts +4 -0
  96. package/dist/mesh/readers/dfs.d.ts +4 -0
  97. package/dist/mesh/readers/fs.d.ts +4 -0
  98. package/dist/mesh/readers/geo.d.ts +4 -0
  99. package/dist/mesh/readers/gii.d.ts +4 -0
  100. package/dist/mesh/readers/ico.d.ts +4 -0
  101. package/dist/mesh/readers/iwm.d.ts +6 -0
  102. package/dist/mesh/readers/mz3.d.ts +4 -0
  103. package/dist/mesh/readers/nv.d.ts +4 -0
  104. package/dist/mesh/readers/obj.d.ts +4 -0
  105. package/dist/mesh/readers/off.d.ts +4 -0
  106. package/dist/mesh/readers/ply.d.ts +4 -0
  107. package/dist/mesh/readers/srf.d.ts +4 -0
  108. package/dist/mesh/readers/stl.d.ts +4 -0
  109. package/dist/mesh/readers/vtk.d.ts +14 -0
  110. package/dist/mesh/readers/wrl.d.ts +4 -0
  111. package/dist/mesh/readers/x3d.d.ts +4 -0
  112. package/dist/mesh/tracts/index.d.ts +24 -0
  113. package/dist/mesh/tracts/readers/tck.d.ts +10 -0
  114. package/dist/mesh/tracts/readers/trk.d.ts +10 -0
  115. package/dist/mesh/tracts/readers/trx.d.ts +11 -0
  116. package/dist/mesh/tracts/readers/tt.d.ts +17 -0
  117. package/dist/mesh/tracts/scalars.d.ts +8 -0
  118. package/dist/mesh/writers/index.d.ts +13 -0
  119. package/dist/mesh/writers/iwm.d.ts +2 -0
  120. package/dist/mesh/writers/mz3.d.ts +5 -0
  121. package/dist/mesh/writers/obj.d.ts +2 -0
  122. package/dist/mesh/writers/stl.d.ts +2 -0
  123. package/dist/mrs/MrsScene.d.ts +211 -0
  124. package/dist/niivuegpu.js +41 -0
  125. package/dist/niivuegpu.webgl2.js +90 -0
  126. package/dist/niivuegpu.webgpu.js +88 -0
  127. package/dist/signal/NVSignal.d.ts +39 -0
  128. package/dist/signal/detect.d.ts +13 -0
  129. package/dist/signal/mrs.d.ts +42 -0
  130. package/dist/signal/persistence.d.ts +26 -0
  131. package/dist/signal/processing.d.ts +84 -0
  132. package/dist/signal/readers/nii.d.ts +15 -0
  133. package/dist/signal/readers/tsv.d.ts +13 -0
  134. package/dist/signal/sidecar.d.ts +32 -0
  135. package/dist/view/NVAnnotation.d.ts +17 -0
  136. package/dist/view/NVColorbar.d.ts +35 -0
  137. package/dist/view/NVCrosscut.d.ts +7 -0
  138. package/dist/view/NVCrosshair.d.ts +20 -0
  139. package/dist/view/NVDrawingTexture.d.ts +10 -0
  140. package/dist/view/NVFont.d.ts +58 -0
  141. package/dist/view/NVGraph.d.ts +187 -0
  142. package/dist/view/NVLegend.d.ts +37 -0
  143. package/dist/view/NVLine.d.ts +6 -0
  144. package/dist/view/NVMeasurement.d.ts +14 -0
  145. package/dist/view/NVMeshView.d.ts +17 -0
  146. package/dist/view/NVOrient.d.ts +25 -0
  147. package/dist/view/NVPerfMarks.d.ts +80 -0
  148. package/dist/view/NVRenderVolumeData.d.ts +6 -0
  149. package/dist/view/NVRenderer.d.ts +9 -0
  150. package/dist/view/NVRuler.d.ts +12 -0
  151. package/dist/view/NVSliceLayout.d.ts +97 -0
  152. package/dist/view/NVUILayout.d.ts +13 -0
  153. package/dist/view/sliceUtils.d.ts +3 -0
  154. package/dist/viewport.js +162 -0
  155. package/dist/volume/ChunkExplode.d.ts +45 -0
  156. package/dist/volume/ChunkResidency.d.ts +167 -0
  157. package/dist/volume/ChunkVisibility.d.ts +95 -0
  158. package/dist/volume/NVVolume.d.ts +24 -0
  159. package/dist/volume/TensorProcessing.d.ts +16 -0
  160. package/dist/volume/chunkBudget.d.ts +20 -0
  161. package/dist/volume/chunking.d.ts +208 -0
  162. package/dist/volume/loadBridge.d.ts +10 -0
  163. package/dist/volume/modulation.d.ts +46 -0
  164. package/dist/volume/mrsi.d.ts +49 -0
  165. package/dist/volume/orientChunked.d.ts +77 -0
  166. package/dist/volume/readers/afni.d.ts +7 -0
  167. package/dist/volume/readers/bmp.d.ts +7 -0
  168. package/dist/volume/readers/ecat.d.ts +7 -0
  169. package/dist/volume/readers/fib.d.ts +7 -0
  170. package/dist/volume/readers/iwi.d.ts +7 -0
  171. package/dist/volume/readers/mgh.d.ts +7 -0
  172. package/dist/volume/readers/mha.d.ts +7 -0
  173. package/dist/volume/readers/mif.d.ts +7 -0
  174. package/dist/volume/readers/nii.d.ts +7 -0
  175. package/dist/volume/readers/npy.d.ts +7 -0
  176. package/dist/volume/readers/nrrd.d.ts +7 -0
  177. package/dist/volume/readers/src.d.ts +7 -0
  178. package/dist/volume/readers/vmr.d.ts +7 -0
  179. package/dist/volume/transforms/index.d.ts +90 -0
  180. package/dist/volume/utils.d.ts +183 -0
  181. package/dist/volume/writers/index.d.ts +6 -0
  182. package/dist/volume/writers/iwi.d.ts +3 -0
  183. package/dist/volume/writers/nii.d.ts +3 -0
  184. package/dist/wgpu/NVViewGPU.d.ts +119 -0
  185. package/dist/wgpu/bench.d.ts +33 -0
  186. package/dist/wgpu/colorbar.d.ts +40 -0
  187. package/dist/wgpu/crosshair.d.ts +21 -0
  188. package/dist/wgpu/depthPick.d.ts +27 -0
  189. package/dist/wgpu/font.d.ts +24 -0
  190. package/dist/wgpu/line.d.ts +13 -0
  191. package/dist/wgpu/mesh.d.ts +13 -0
  192. package/dist/wgpu/orient.d.ts +77 -0
  193. package/dist/wgpu/orientChunked.d.ts +44 -0
  194. package/dist/wgpu/polygon.d.ts +16 -0
  195. package/dist/wgpu/polygon3d.d.ts +22 -0
  196. package/dist/wgpu/render.d.ts +354 -0
  197. package/dist/wgpu/slice.d.ts +81 -0
  198. package/dist/wgpu/thumbnail.d.ts +17 -0
  199. package/dist/wgpu/volumeShaderLib.d.ts +1 -0
  200. package/dist/wgpu/webgpu.d.ts +3 -0
  201. package/dist/wgpu/wgpu.d.ts +6 -0
  202. package/dist/workers/NVWorker.d.ts +41 -0
  203. package/dist/workers/transform.worker.d.ts +12 -0
  204. package/dist/workers/volumeLoad.worker.d.ts +14 -0
  205. package/package.json +92 -106
  206. package/build/drawing/index.d.ts +0 -128
  207. package/build/drawing/index.js +0 -8919
  208. package/build/drawing/index.js.map +0 -1
  209. package/build/index.min.js +0 -1
  210. package/build/metafile-esm.json +0 -1
  211. package/build/niivue/index.d.ts +0 -3524
  212. package/build/niivue/index.js +0 -45515
  213. package/build/niivue/index.js.map +0 -1
  214. package/build/nvdocument-Bc0slj3Z.d.ts +0 -1938
  215. package/build/utils/index.d.ts +0 -29
  216. package/build/utils/index.js +0 -597
  217. package/build/utils/index.js.map +0 -1
  218. package/dist/index.js +0 -54270
  219. package/dist/index.js.map +0 -1
  220. package/dist/index.min.js +0 -1
  221. package/dist/metafile-esm.json +0 -1
  222. package/dist/niivue.umd.js +0 -2499
  223. package/src/cmaps/_itksnap.json +0 -55
  224. package/src/cmaps/_slicer3d.json +0 -355
  225. package/src/cmaps/actc.json +0 -7
  226. package/src/cmaps/afni_blues_inv.json +0 -9
  227. package/src/cmaps/afni_reds_inv.json +0 -7
  228. package/src/cmaps/batlow.json +0 -7
  229. package/src/cmaps/bcgwhw.json +0 -32
  230. package/src/cmaps/bcgwhw_dark.json +0 -32
  231. package/src/cmaps/blue.json +0 -7
  232. package/src/cmaps/blue2cyan.json +0 -7
  233. package/src/cmaps/blue2magenta.json +0 -7
  234. package/src/cmaps/blue2red.json +0 -7
  235. package/src/cmaps/bluegrn.json +0 -7
  236. package/src/cmaps/bone.json +0 -7
  237. package/src/cmaps/bronze.json +0 -7
  238. package/src/cmaps/cet_l17.json +0 -93
  239. package/src/cmaps/cividis.json +0 -7
  240. package/src/cmaps/cool.json +0 -7
  241. package/src/cmaps/copper.json +0 -7
  242. package/src/cmaps/copper2.json +0 -7
  243. package/src/cmaps/ct_airways.json +0 -9
  244. package/src/cmaps/ct_artery.json +0 -9
  245. package/src/cmaps/ct_bones.json +0 -9
  246. package/src/cmaps/ct_brain.json +0 -9
  247. package/src/cmaps/ct_brain_gray.json +0 -9
  248. package/src/cmaps/ct_cardiac.json +0 -9
  249. package/src/cmaps/ct_head.json +0 -9
  250. package/src/cmaps/ct_kidneys.json +0 -9
  251. package/src/cmaps/ct_liver.json +0 -9
  252. package/src/cmaps/ct_muscles.json +0 -9
  253. package/src/cmaps/ct_scalp.json +0 -9
  254. package/src/cmaps/ct_skull.json +0 -9
  255. package/src/cmaps/ct_soft.json +0 -9
  256. package/src/cmaps/ct_soft_tissue.json +0 -9
  257. package/src/cmaps/ct_surface.json +0 -9
  258. package/src/cmaps/ct_vessels.json +0 -9
  259. package/src/cmaps/ct_w_contrast.json +0 -9
  260. package/src/cmaps/cubehelix.json +0 -22
  261. package/src/cmaps/electric_blue.json +0 -7
  262. package/src/cmaps/freesurfer.json +0 -27
  263. package/src/cmaps/ge_color.json +0 -7
  264. package/src/cmaps/gold.json +0 -7
  265. package/src/cmaps/gray.json +0 -7
  266. package/src/cmaps/green.json +0 -7
  267. package/src/cmaps/green2cyan.json +0 -7
  268. package/src/cmaps/green2orange.json +0 -7
  269. package/src/cmaps/hot.json +0 -7
  270. package/src/cmaps/hotiron.json +0 -7
  271. package/src/cmaps/hsv.json +0 -7
  272. package/src/cmaps/index.ts +0 -72
  273. package/src/cmaps/inferno.json +0 -7
  274. package/src/cmaps/jet.json +0 -7
  275. package/src/cmaps/kry.json +0 -7
  276. package/src/cmaps/linspecer.json +0 -7
  277. package/src/cmaps/lipari.json +0 -7
  278. package/src/cmaps/magma.json +0 -7
  279. package/src/cmaps/mako.json +0 -7
  280. package/src/cmaps/navia.json +0 -7
  281. package/src/cmaps/nih.json +0 -7
  282. package/src/cmaps/plasma.json +0 -7
  283. package/src/cmaps/random.json +0 -90
  284. package/src/cmaps/red.json +0 -7
  285. package/src/cmaps/redyell.json +0 -7
  286. package/src/cmaps/rocket.json +0 -7
  287. package/src/cmaps/roi_i256.json +0 -92
  288. package/src/cmaps/surface.json +0 -7
  289. package/src/cmaps/thermal.json +0 -7
  290. package/src/cmaps/turbo.json +0 -7
  291. package/src/cmaps/violet.json +0 -7
  292. package/src/cmaps/viridis.json +0 -7
  293. package/src/cmaps/warm.json +0 -7
  294. package/src/cmaps/winter.json +0 -7
  295. package/src/cmaps/x_rain.json +0 -7
  296. package/src/colortables.ts +0 -289
  297. package/src/drawing/index.ts +0 -13
  298. package/src/drawing/masks.ts +0 -500
  299. package/src/drawing/rle.ts +0 -97
  300. package/src/drawing/undo.ts +0 -28
  301. package/src/events.ts +0 -144
  302. package/src/fonts/Garamond.json +0 -1491
  303. package/src/fonts/Garamond.png +0 -0
  304. package/src/fonts/GaramondBold.json +0 -1506
  305. package/src/fonts/GaramondBold.png +0 -0
  306. package/src/fonts/Roboto-Regular.json +0 -1496
  307. package/src/fonts/Roboto-Regular.png +0 -0
  308. package/src/fonts/Ubuntu.png +0 -0
  309. package/src/fonts/UbuntuBold.json +0 -1506
  310. package/src/fonts/UbuntuBold.png +0 -0
  311. package/src/index.html +0 -152
  312. package/src/index_histo.html +0 -233
  313. package/src/index_magic.html +0 -223
  314. package/src/index_zarr_viewer.html +0 -785
  315. package/src/logger.ts +0 -74
  316. package/src/matcaps/Cortex.jpg +0 -0
  317. package/src/matcaps/Cream.jpg +0 -0
  318. package/src/matcaps/Fuzzy.jpg +0 -0
  319. package/src/matcaps/Gold.jpg +0 -0
  320. package/src/matcaps/Peach.jpg +0 -0
  321. package/src/matcaps/Plastic.jpg +0 -0
  322. package/src/matcaps/Shiny.jpg +0 -0
  323. package/src/niivue/core/CoordinateTransform.ts +0 -700
  324. package/src/niivue/core/README.md +0 -122
  325. package/src/niivue/core/ShaderManager.ts +0 -623
  326. package/src/niivue/core/gl.ts +0 -358
  327. package/src/niivue/data/ConnectomeManager.ts +0 -178
  328. package/src/niivue/data/FileLoader.ts +0 -324
  329. package/src/niivue/data/MeshManager.ts +0 -305
  330. package/src/niivue/data/VolumeColormap.ts +0 -87
  331. package/src/niivue/data/VolumeLayerRenderer.ts +0 -590
  332. package/src/niivue/data/VolumeManager.ts +0 -292
  333. package/src/niivue/data/VolumeModulation.ts +0 -135
  334. package/src/niivue/data/VolumeTexture.ts +0 -203
  335. package/src/niivue/descriptives.ts +0 -252
  336. package/src/niivue/drawing/DrawingManager.ts +0 -462
  337. package/src/niivue/drawing/FloodFillTool.ts +0 -749
  338. package/src/niivue/drawing/PenTool.ts +0 -647
  339. package/src/niivue/drawing/ShapeTool.ts +0 -298
  340. package/src/niivue/index.ts +0 -12516
  341. package/src/niivue/interaction/DragModeManager.ts +0 -565
  342. package/src/niivue/interaction/DropHandler.ts +0 -255
  343. package/src/niivue/interaction/EventController.ts +0 -298
  344. package/src/niivue/interaction/KeyboardController.ts +0 -240
  345. package/src/niivue/interaction/MouseController.ts +0 -410
  346. package/src/niivue/interaction/TouchController.ts +0 -434
  347. package/src/niivue/interaction/WheelController.ts +0 -274
  348. package/src/niivue/interaction/index.ts +0 -11
  349. package/src/niivue/navigation/CameraController.ts +0 -129
  350. package/src/niivue/navigation/ClipPlaneManager.ts +0 -294
  351. package/src/niivue/navigation/LayoutManager.ts +0 -709
  352. package/src/niivue/navigation/SliceNavigation.ts +0 -482
  353. package/src/niivue/processing/ImageProcessing.ts +0 -1159
  354. package/src/niivue/rendering/MeshRenderer.ts +0 -521
  355. package/src/niivue/rendering/SceneRenderer.ts +0 -405
  356. package/src/niivue/rendering/SliceRenderer.ts +0 -450
  357. package/src/niivue/rendering/UIElementRenderer.ts +0 -772
  358. package/src/niivue/rendering/VolumeRenderer.ts +0 -554
  359. package/src/niivue/texture-constants.ts +0 -23
  360. package/src/niivue-object3D.ts +0 -382
  361. package/src/niivue.css +0 -105
  362. package/src/nvconnectome.ts +0 -454
  363. package/src/nvdocument.ts +0 -857
  364. package/src/nvimage/AffineProcessor.ts +0 -163
  365. package/src/nvimage/ColormapManager.ts +0 -84
  366. package/src/nvimage/CoordinateTransform.ts +0 -178
  367. package/src/nvimage/ImageDataProcessor.ts +0 -207
  368. package/src/nvimage/ImageFactory.ts +0 -354
  369. package/src/nvimage/ImageMetadata.ts +0 -82
  370. package/src/nvimage/ImageOrientation.ts +0 -391
  371. package/src/nvimage/ImageReaders/afni.ts +0 -260
  372. package/src/nvimage/ImageReaders/brainvoyager.ts +0 -138
  373. package/src/nvimage/ImageReaders/dsistudio.ts +0 -184
  374. package/src/nvimage/ImageReaders/ecat.ts +0 -119
  375. package/src/nvimage/ImageReaders/image.ts +0 -78
  376. package/src/nvimage/ImageReaders/index.ts +0 -22
  377. package/src/nvimage/ImageReaders/itk.ts +0 -163
  378. package/src/nvimage/ImageReaders/mgh.ts +0 -394
  379. package/src/nvimage/ImageReaders/mrtrix.ts +0 -323
  380. package/src/nvimage/ImageReaders/nii.ts +0 -56
  381. package/src/nvimage/ImageReaders/nrrd.ts +0 -318
  382. package/src/nvimage/ImageReaders/numpy.ts +0 -222
  383. package/src/nvimage/ImageReaders/zarr.ts +0 -93
  384. package/src/nvimage/ImageWriter.ts +0 -317
  385. package/src/nvimage/IntensityCalibration.ts +0 -280
  386. package/src/nvimage/RenderingUtils.ts +0 -158
  387. package/src/nvimage/StreamingLoader.ts +0 -143
  388. package/src/nvimage/TensorProcessing.ts +0 -108
  389. package/src/nvimage/VolumeUtils.ts +0 -331
  390. package/src/nvimage/ZarrProcessor.ts +0 -114
  391. package/src/nvimage/affineUtils.ts +0 -144
  392. package/src/nvimage/index.ts +0 -1399
  393. package/src/nvimage/utils.ts +0 -677
  394. package/src/nvimage/zarr/NVZarrHelper.ts +0 -1041
  395. package/src/nvimage/zarr/ZarrChunkCache.ts +0 -133
  396. package/src/nvimage/zarr/ZarrChunkClient.ts +0 -544
  397. package/src/nvimage/zarr/index.ts +0 -17
  398. package/src/nvlabel.ts +0 -106
  399. package/src/nvmesh-loaders.ts +0 -4043
  400. package/src/nvmesh-types.ts +0 -161
  401. package/src/nvmesh-utilities.ts +0 -454
  402. package/src/nvmesh.ts +0 -2084
  403. package/src/nvserializer.ts +0 -809
  404. package/src/nvutilities.ts +0 -680
  405. package/src/orientCube.ts +0 -32
  406. package/src/shader-srcs.ts +0 -2489
  407. package/src/shader.ts +0 -77
  408. package/src/types.ts +0 -294
  409. package/src/utils/file-utils.ts +0 -33
  410. package/src/utils/image-utils.ts +0 -91
  411. package/src/utils/index.ts +0 -5
  412. package/src/utils/legacy-migrate.ts +0 -408
  413. package/src/utils/math-utils.ts +0 -52
  414. package/src/utils/nice.ts +0 -27
  415. package/src/utils/webgl-utils.ts +0 -40
package/LICENSE ADDED
@@ -0,0 +1,34 @@
1
+ BSD 2-Clause License
2
+
3
+ Copyright (c) 2026, NiiVue
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+
11
+ 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
+
15
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
19
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
22
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
23
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25
+
26
+ -------------------------------------------------------------------------------
27
+
28
+ Third-party acknowledgment
29
+
30
+ The magnetic resonance spectroscopy (MRS/MRSI) features in this package port
31
+ algorithms from fsleyes-plugin-mrs, distributed under the BSD 3-Clause License
32
+ (Copyright (c) 2021, William Clarke, University of Oxford. All rights reserved).
33
+ The upstream license is reproduced verbatim in LICENSE.fsleyes-plugin-mrs and the
34
+ porting provenance is documented in PORTING.md (both shipped in this package).
@@ -0,0 +1,29 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2020-2021, William Clarke, University of Oxford
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ 1. Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ 3. Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/PORTING.md ADDED
@@ -0,0 +1,49 @@
1
+ # Porting provenance: fsleyes-plugin-mrs -> NiiVue
2
+
3
+ NiiVue's MRS support — the core spectral math and the `MrsScene` controller —
4
+ ports algorithms from **fsleyes-plugin-mrs** (BSD-3-Clause, (c) 2021 William
5
+ Clarke, University of Oxford; co-author Vasilis Karlaftis; acks Paul McCarthy).
6
+ The upstream license is shipped verbatim as `LICENSE.fsleyes-plugin-mrs`.
7
+
8
+ The spectral math lives in NiiVue **core** (`packages/niivue/src/signal/processing.ts`
9
+ and `packages/niivue/src/volume/mrsi.ts`) so it can be shared with single-voxel
10
+ spectroscopy (`svs.html`); this package supplies the FSL-MRS display defaults,
11
+ the range-to-map tool, and the scene controller.
12
+
13
+ NiiVue follows camelCase / `NV*` naming; where it does not conflict, function
14
+ and constant names mirror the upstream so the port is auditable.
15
+
16
+ ## Function-by-function map
17
+
18
+ | NiiVue (TypeScript) | Upstream (Python) | Notes |
19
+ |---|---|---|
20
+ | `GYRO_MAG_RATIO`, `PPM_SHIFT`, `PPM_RANGE` (core `processing.ts`) | `constants.py` (`GYRO_MAG_RATIO`, `PPM_SHIFT`, `PPM_RANGE`) | dict literals ported verbatim |
21
+ | `ppmRefForNucleus()` (core) | `PPM_SHIFT[nucleus]` lookup | the additive ppm offset (1H = 4.65) |
22
+ | `halveFirstPoint()` (core) | `calcSpectrum`: `data[..., 0] *= 0.5` (`utils.py`) | first-FID-point scaling |
23
+ | `deriveSpectroscopySeries()` FFT+fftshift (core) | `calcSpectrum`: `np.fft.fft` then `np.fft.fftshift` (`utils.py`) | no conjugation |
24
+ | Hz axis `(i-half)/(nFFT*dwell)` (core) | `calcFrequencies`: `fftfreq(n, dwell)` + `fftshift` (`powerspectrumseries.py`) | dwell = `pixdim[4]` |
25
+ | Hz->ppm `-hz/specFreq + shift` (core) | `_set_mrs_plot_scale`: `xScale = -1/spec_freq`, `xOffset = PPM_SHIFT` (`views.py`) | display-only transform |
26
+ | `apodize()` (core) | `apodize`: `exp(-t/(1/broadening))`, `t = linspace(0, dwell*(N-1), N)` (`utils.py`) | exponential line-broadening |
27
+ | `phaseCorrection()` (core) | `phaseCorrection`: `exp(1j*2*pi*(p0/360 + freqs*p1))` (`powerspectrumseries.py`) | p0 degrees, p1 seconds (UI ms /1000) |
28
+ | `integratePpmBandMap()` (core) | `range_tool.draw_overlay`: apodize -> `calcSpectrum` -> `phaseCorrection` -> `sum(abs|real(spectrum[..., band]), axis=-1)` (`range_tool.py`) | per-voxel band integral |
29
+ | `makeMetaboliteMap()` naming `SpecSum_{lo}_{hi}` | `range_tool.draw_overlay`: `f'SpecSum_{lo:0.1f}_{hi:0.1f}'` | overlay name |
30
+ | transient averaging in `deriveSpectroscopySeries` / `integratePpmBandMap` | `apply_higher_dim_operations` mean branch (`utils.py`) | dims 5-7 mean reduction (index/diff deferred) |
31
+
32
+ ## Reference parity values
33
+
34
+ `packages/niivue/src/signal/processing.test.ts` mirrors the upstream
35
+ `tests/test_utils.py` cases:
36
+
37
+ - `calcSpectrum([1,2,3,4])` -> `fftshift(fft([0.5,2,3,4]))` = `[-2.5, -2.5-2j, 9.5, -2.5+2j]`
38
+ - `apodize([1,2,3,4], dwell=0.1, broadening=1)` -> `[1,2,3,4] * exp(-[0,0.1,0.2,0.3])`
39
+ - `phaseCorrection` zero-order rotation (p0 in degrees).
40
+
41
+ ## Deferred / not yet ported
42
+
43
+ - `apply_higher_dim_operations` index/difference branches and DIM_COIL SVD coil
44
+ combination (the demo dataset has no higher dims; only the mean branch is used).
45
+ - MRSI fit-results loading (`tools.py`: tree + colourscheme -> fit/baseline/
46
+ residual spectra and concentration/QC maps). Deferred — the demo dataset has
47
+ no `fsl_mrsi` results directory. When ported, the upstream restricted-`eval`
48
+ colourscheme heuristic will be replaced with a safe expression evaluator.
49
+ - Interactive Ctrl/Shift-drag phasing (`profiles.py`): the demo uses sliders.
package/README.md CHANGED
@@ -1,14 +1,210 @@
1
- # NiiVue
1
+ # NiiVueGPU
2
2
 
3
- NiiVue is web-based visualization tool for neuroimaging that can run on any operating system and any web device (phone, tablet, computer). This repository contains only the **core NiiVue package** that can be embedded into other projects. See [niivue.com](https://niivue.com/) for examples and documentation.
3
+ NiiVue is a tool for visualizing volumes, meshes, and tractography streamlines commonly used in neuroimaging. The original NiiVue project evolved organically, resulting in tightly coupled model, view, and controller components. This repository refactors the codebase to improve maintainability and to support emerging technologies such as WebGPU.
4
4
 
5
- ## Local Development
5
+ ## Getting Started
6
6
 
7
- To run a hot-loading development that is updated whenever you save changes to any source files, you can run:
7
+ ### Prerequisites
8
8
 
9
+ - [Bun](https://bun.sh/)
10
+ - A browser with WebGPU support (Chrome, Firefox). Safari works if you have a recent MacOS (version 26) or iOS. Older browsers will fall back to the WebGL2 renderer.
11
+
12
+ ### Build Commands
13
+
14
+ ```bash
15
+ bun install # Install dependencies
16
+ bun run dev # Hot-reload dev server
17
+ bun run build # Library build to ./dist (published npm package)
18
+ bun run deploy # Production examples-site build to ./dist (GitHub Pages)
19
+ bun run demo # Build examples site and serve locally
20
+ bun run lint # Biome check
21
+ bun run lint:fix # Biome auto-fix
22
+ bun run typecheck # TypeScript type checking (tsc --noEmit)
9
23
  ```
10
- git clone git@github.com:niivue/niivue.git
11
- cd niivue
12
- npm install
13
- npm run dev
24
+
25
+ ### Perf instrumentation
26
+
27
+ The renderer carries `performance.mark`/`measure` instrumentation
28
+ (`src/view/NVPerfMarks.ts`) gated on a single runtime flag. Consumers:
29
+
30
+ - **App code:** `nv.perf.enabled = true`, then listen for the
31
+ `perfFrame` event to receive `{ tag, cpuMs, submitMs, totalMs, phases }`
32
+ per render. Tag user-driven frames via `nv.perf.tagFrame('myAction')`
33
+ before mutating state.
34
+ - **Benchmark harness** at `examples/benchmark.html` flips the same
35
+ flag and reads `consumeFrameStats()` plus the `niivue:render-*`
36
+ PerformanceObserver entries.
37
+
38
+ When `enabled` is `false` every helper bails on its first line; cost
39
+ in production is one well-predicted branch per call site. See
40
+ `benchmarks/README.md` for the harness workflow.
41
+
42
+ ### Development Workflows
43
+
44
+ - **`bun run dev`** — Runs the `demos/` pages with hot reloading. A Vite plugin intercepts `import '../dist/niivuegpu.mjs'` and redirects it to source, so demo scripts stay identical to the deployed versions but get full HMR. Asset directories in `demos/` are symlinked to `public/` on first run.
45
+ - **`bun run demo`** — Builds the library to `demos/dist/`, copies assets, and serves with `http-server`. Use this to test the actual built output or before deploying to GitHub Pages.
46
+
47
+ ## Usage
48
+
49
+ Add a `<canvas>` to your page and attach NiiVueGPU to it:
50
+
51
+ ```html
52
+ <canvas id="gl1"></canvas>
53
+ <script type="module">
54
+ import NiiVue from '@niivue/niivue'
55
+
56
+ const nv = new NiiVue()
57
+ await nv.attachToCanvas(document.getElementById('gl1'))
58
+ await nv.loadVolumes([{ url: '/volumes/mni152.nii.gz' }])
59
+ </script>
14
60
  ```
61
+
62
+ ### Backend-specific distributions
63
+
64
+ By default, `@niivue/niivue` includes both backends (WebGPU + WebGL2 fallback):
65
+
66
+ ```js
67
+ import NiiVue from '@niivue/niivue'
68
+ ```
69
+
70
+ You can also import backend-only builds to reduce package size:
71
+
72
+ ```js
73
+ import NiiVueWebGPU from '@niivue/niivue/webgpu' // WebGPU-only
74
+ import NiiVueWebGL2 from '@niivue/niivue/webgl2' // WebGL2-only
75
+ ```
76
+
77
+ In backend-only builds, selecting the missing backend throws an explicit error.
78
+
79
+ ### Load a mesh
80
+
81
+ ```js
82
+ await nv.loadMeshes([{ url: '/meshes/brain.mz3' }])
83
+ ```
84
+
85
+ ### Signals (physio and spectroscopy)
86
+
87
+ Alongside spatial volumes and meshes, NiiVue can load **signals** — a third,
88
+ non-spatial data class shown as 2-D line plots rather than slices. Two kinds are
89
+ supported: `physio` (BIDS time-series TSV) and `spectroscopy` (NIfTI-MRS complex
90
+ FID). Sibling `.json` sidecars are fetched automatically for axis metadata
91
+ (sampling rate / StartTime for physio, SpectrometerFrequency / ResonantNucleus
92
+ for spectroscopy).
93
+
94
+ ```js
95
+ // BIDS physio (auto-fetches the sibling .json sidecar)
96
+ await nv.loadSignals([{ url: '/signals/recording_physio.tsv.gz' }])
97
+
98
+ // NIfTI-MRS spectroscopy; setSignal drives the on-demand FFT + ppm windowing
99
+ await nv.loadSignals([{ url: '/signals/svs_se_30.nii.gz' }])
100
+ nv.setSignal(0, { display: { average: true, mode: 'real', ppmRange: [1.9, 3.3] } })
101
+ ```
102
+
103
+ NIfTI files are routed to the signal loader when they have no spatial extent
104
+ (dim1-3 == 1, dim4 > 1); pass `asSignal` to override. MRS sidecar/header fields do
105
+ **not** affect routing — a spatial spectroscopic image (MRSI/CSI) carries them too,
106
+ so it stays on the volume path.
107
+
108
+ A physio signal can be associated with a 4D volume by passing `attachToId` (the
109
+ volume's id). The graph then shows the crosshair BOLD time-course together with
110
+ each physio trace at its native sampling rate on a shared time axis, clamped to
111
+ the imaging window; clicking the graph scrubs the volume to the nearest frame.
112
+
113
+ A dense signal graph can be panned and zoomed via on-graph buttons (the view
114
+ follows the cursor on wheel/frame steps) or the controller API (`graphZoom`,
115
+ `graphPan`); `graphLineWidth` / `graphLineAlpha` tune trace thickness and opacity
116
+ for overlapping series, and `graphShowVolumeTimecourse` toggles the BOLD trace.
117
+ Missing physio samples are left as gaps and marked with a short tick along the
118
+ bottom axis (the "missing-data rug").
119
+
120
+ Signals can carry **annotations** — text labels anchored to a position in the
121
+ graph's own data units (e.g. ppm for spectroscopy). They translate as the x-axis
122
+ window is panned/zoomed and are hidden when out of range. A `y` of `-Infinity` or
123
+ `+Infinity` pins the label to the bottom or top of the plot. Annotations render on
124
+ the signal graph (spectrum / physio plot); they are not currently drawn on the
125
+ volume+physio association time-course view.
126
+
127
+ ```js
128
+ // Label metabolite peaks pinned to the bottom of the spectrum
129
+ await nv.loadSignals([{
130
+ url: '/signals/svs_se_30.nii.gz',
131
+ annotations: [
132
+ { text: 'NAA', x: 2.0, y: -Infinity },
133
+ { text: 'Cr', x: 3.0, y: -Infinity },
134
+ { text: 'Cho', x: 3.2, y: -Infinity },
135
+ ],
136
+ }])
137
+ nv.setSignal(0, { annotations: [/* replace the full set */] })
138
+ ```
139
+
140
+ See `examples/svs.html` (spectroscopy, with NAA/Cr/Cho annotations and a scene
141
+ selector pairing the spectrum with the participant's T2w and an outline-shaded
142
+ "voxel" marker at the sampling location), `examples/physio.html` (physio), and
143
+ `examples/physio.bold.html` (a task-fMRI run with per-trace fMRI/respiratory/
144
+ cardiac toggles, on-graph pan/zoom, and a volume+physio association graph) for
145
+ interactive demos.
146
+
147
+ #### Spatial spectroscopic imaging (MRSI/CSI)
148
+
149
+ A complex 4-D NIfTI-MRS volume (dim1-3 = space, dim4 = FID) stays on the volume
150
+ path and is driven by the core `MrsScene` controller: it loads an anatomy
151
+ reference plus the MRSI grid, shows the crosshair-voxel spectrum (which tracks
152
+ the crosshair like the FSLeyes MRS plugin), and generates ppm-band metabolite
153
+ maps. See `examples/mrsi.html`. The spectral transforms and the `MrsScene`
154
+ controller are ported from
155
+ [fsleyes-plugin-mrs](https://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes-plugin-mrs)
156
+ (BSD-3-Clause); see `PORTING.md` for the function-by-function provenance map.
157
+
158
+ ### Change slice type and colormap
159
+
160
+ ```js
161
+ nv.sliceType = 3 // 0=Axial, 1=Coronal, 2=Sagittal, 3=Multi, 4=Render
162
+ nv.setVolume(0, { colormap: 'hot' }) // apply colormap to first volume
163
+ ```
164
+
165
+ ### Configuration options
166
+
167
+ Pass options to the constructor to customize the viewer:
168
+
169
+ ```js
170
+ const nv = new NiiVue({
171
+ isColorbarVisible: true,
172
+ backgroundColor: [0, 0, 0, 1],
173
+ clipPlaneColor: [1, 1, 1, 0.5],
174
+ })
175
+ ```
176
+
177
+ ### Testing
178
+
179
+ The package includes a unit test suite for non-rendering (server-side) logic using the [Bun test runner](https://bun.sh/docs/cli/test). Tests are co-located with source files as `*.test.ts`.
180
+
181
+ ```bash
182
+ bun test # Run all tests with coverage
183
+ bun test src/drawing/ # Run tests in a specific directory
184
+ bun test --watch # Watch mode
185
+ ```
186
+
187
+ Coverage is enabled by default (configured in `bunfig.toml`) and outputs both a console summary and an `lcov` report to `coverage/`. Tested modules include:
188
+
189
+ - **Drawing tools** — RLE codec, pen/line/flood-fill, undo stack
190
+ - **Annotations** — undo/redo, point-in-polygon, slice projection, shape selection
191
+ - **Math/transforms** — vox↔mm conversions, spherical coordinates, slice plane equations
192
+ - **Volume utilities** — intensity range calculation, NIfTI header creation, voxel lookup, reorientation
193
+ - **Colormaps** — LUT generation, label colormap construction
194
+ - **Mesh I/O** — STL/OBJ writers, STL/OFF readers (roundtrip tests)
195
+
196
+ To run tests via Nx from the monorepo root:
197
+
198
+ ```bash
199
+ bunx nx test niivue
200
+ ```
201
+
202
+ ### Architecture
203
+
204
+ The codebase is written in **TypeScript** and follows an MVC pattern with dual rendering backends (WebGPU and WebGL2). See [CLAUDE.md](CLAUDE.md) for detailed architecture documentation, directory structure, code style, and module naming conventions.
205
+
206
+ ### Dependencies
207
+
208
+ - [nifti-reader-js](https://github.com/rii-mango/NIFTI-Reader-JS) — NIfTI file parsing
209
+ - [gl-matrix](https://glmatrix.net/) — Vector/matrix math (vec3, vec4, mat3, mat4)
210
+ - [cbor-x](https://github.com/nicolo-ribaudo/cbor-x) — CBOR encoding/decoding for document save/load and ITK-Wasm (.iwi.cbor) format support
@@ -0,0 +1,87 @@
1
+ import { AnnotationConfig, DrawConfig, InteractionConfig, LayoutConfig, MeshRenderConfig, UIConfig, VolumeRenderConfig } from './NVTypes';
2
+ export declare const NUM_CLIP_PLANE = 6;
3
+ export declare const DEFAULT_CLIP_PLANE: readonly [0, 0, 0, 2];
4
+ export declare enum COLORMAP_TYPE {
5
+ MIN_TO_MAX = 0,
6
+ ZERO_TO_MAX_TRANSPARENT_BELOW_MIN = 1,
7
+ ZERO_TO_MAX_TRANSLUCENT_BELOW_MIN = 2
8
+ }
9
+ export declare enum DRAG_MODE {
10
+ none = 0,
11
+ contrast = 1,
12
+ measurement = 2,
13
+ pan = 3,
14
+ slicer3D = 4,
15
+ callbackOnly = 5,
16
+ roiSelection = 6,
17
+ angle = 7,
18
+ crosshair = 8,
19
+ windowing = 9
20
+ }
21
+ export declare enum SHOW_RENDER {
22
+ NEVER = 0,
23
+ ALWAYS = 1,
24
+ AUTO = 2
25
+ }
26
+ export declare const NiiIntentCode: Readonly<{
27
+ readonly NIFTI_INTENT_NONE: 0;
28
+ readonly NIFTI_INTENT_CORREL: 2;
29
+ readonly NIFTI_INTENT_TTEST: 3;
30
+ readonly NIFTI_INTENT_FTEST: 4;
31
+ readonly NIFTI_INTENT_ZSCORE: 5;
32
+ readonly NIFTI_INTENT_LABEL: 1002;
33
+ readonly NIFTI_INTENT_NEURONAMES: 1005;
34
+ readonly NIFTI_INTENT_RGB_VECTOR: 2003;
35
+ }>;
36
+ export declare const NiiDataType: Readonly<{
37
+ readonly DT_NONE: 0;
38
+ readonly DT_BINARY: 1;
39
+ readonly DT_UINT8: 2;
40
+ readonly DT_INT16: 4;
41
+ readonly DT_INT32: 8;
42
+ readonly DT_FLOAT32: 16;
43
+ readonly DT_COMPLEX64: 32;
44
+ readonly DT_FLOAT64: 64;
45
+ readonly DT_RGB24: 128;
46
+ readonly DT_INT8: 256;
47
+ readonly DT_UINT16: 512;
48
+ readonly DT_UINT32: 768;
49
+ readonly DT_INT64: 1024;
50
+ readonly DT_UINT64: 1280;
51
+ readonly DT_FLOAT128: 1536;
52
+ readonly DT_COMPLEX128: 1792;
53
+ readonly DT_COMPLEX256: 2048;
54
+ readonly DT_RGBA32: 2304;
55
+ }>;
56
+ /** Check whether a volume is PAQD (Probabilistic Atlas Quad Datatype) */
57
+ export declare function isPaqd(hdr: {
58
+ intent_code: number;
59
+ datatypeCode: number;
60
+ }): boolean;
61
+ export declare const MULTIPLANAR_TYPE: {
62
+ readonly 0: "AUTO";
63
+ readonly 1: "COLUMN";
64
+ readonly 2: "GRID";
65
+ readonly 3: "ROW";
66
+ readonly AUTO: 0;
67
+ readonly COLUMN: 1;
68
+ readonly GRID: 2;
69
+ readonly ROW: 3;
70
+ };
71
+ export declare const SLICE_TYPE: Readonly<{
72
+ readonly AXIAL: 0;
73
+ readonly CORONAL: 1;
74
+ readonly SAGITTAL: 2;
75
+ readonly MULTIPLANAR: 3;
76
+ readonly RENDER: 4;
77
+ readonly NONE: 5;
78
+ }>;
79
+ /** Maps AXIAL→2, CORONAL→1, SAGITTAL→0 (the RAS dimension perpendicular to the slice). */
80
+ export declare function sliceTypeDim(sliceType: number): number;
81
+ export declare const LAYOUT_DEFAULTS: LayoutConfig;
82
+ export declare const UI_DEFAULTS: UIConfig;
83
+ export declare const VOLUME_DEFAULTS: VolumeRenderConfig;
84
+ export declare const MESH_DEFAULTS: MeshRenderConfig;
85
+ export declare const DRAW_DEFAULTS: DrawConfig;
86
+ export declare const INTERACTION_DEFAULTS: InteractionConfig;
87
+ export declare const ANNOTATION_DEFAULTS: AnnotationConfig;
@@ -0,0 +1,4 @@
1
+ import { default as NiiVueGPUBase, NiiVueOptions } from './NVControlBase';
2
+ export default class NiiVueGPU extends NiiVueGPUBase {
3
+ constructor(options?: NiiVueOptions);
4
+ }