@niivue/niivue 0.9.2 → 0.12.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 +73 -13
- package/dist/niivue.es.js +13937 -0
- package/dist/niivue.umd.js +541 -0
- package/package.json +22 -17
- package/src/cmaps/actc.json +9 -0
- package/src/cmaps/blue.json +9 -0
- package/src/cmaps/blue2red.json +9 -0
- package/src/cmaps/bluegrn.json +9 -0
- package/src/cmaps/bone.json +9 -0
- package/src/cmaps/bronze.json +9 -0
- package/src/cmaps/cividis.json +9 -0
- package/src/cmaps/cool.json +9 -0
- package/src/cmaps/copper.json +9 -0
- package/src/cmaps/copper2.json +9 -0
- package/src/cmaps/ct_airways.json +9 -0
- package/src/cmaps/ct_bones.json +9 -0
- package/src/cmaps/ct_brain.json +9 -0
- package/src/cmaps/ct_brain_gray.json +9 -0
- package/src/cmaps/ct_cardiac.json +9 -0
- package/src/cmaps/ct_head.json +9 -0
- package/src/cmaps/ct_kidneys.json +9 -0
- package/src/cmaps/ct_liver.json +9 -0
- package/src/cmaps/ct_muscles.json +9 -0
- package/src/cmaps/ct_scalp.json +9 -0
- package/src/cmaps/ct_skull.json +9 -0
- package/src/cmaps/ct_soft.json +9 -0
- package/src/cmaps/ct_soft_tissue.json +9 -0
- package/src/cmaps/ct_surface.json +9 -0
- package/src/cmaps/ct_vessels.json +9 -0
- package/src/cmaps/ct_w_contrast.json +9 -0
- package/src/cmaps/cubehelix.json +24 -0
- package/src/cmaps/electric_blue.json +9 -0
- package/src/cmaps/ge_color.json +9 -0
- package/src/cmaps/gold.json +9 -0
- package/src/cmaps/gray.json +9 -0
- package/src/cmaps/green.json +9 -0
- package/src/cmaps/hot.json +9 -0
- package/src/cmaps/hotiron.json +9 -0
- package/src/cmaps/hsv.json +9 -0
- package/src/cmaps/index.js +52 -0
- package/src/cmaps/inferno.json +9 -0
- package/src/cmaps/jet.json +9 -0
- package/src/cmaps/linspecer.json +9 -0
- package/src/cmaps/magma.json +9 -0
- package/src/cmaps/mako.json +9 -0
- package/src/cmaps/nih.json +9 -0
- package/src/cmaps/plasma.json +9 -0
- package/src/cmaps/random.json +92 -0
- package/src/cmaps/red.json +9 -0
- package/src/cmaps/redyell.json +9 -0
- package/src/cmaps/rocket.json +9 -0
- package/src/cmaps/surface.json +9 -0
- package/src/cmaps/violet.json +9 -0
- package/src/cmaps/viridis.json +9 -0
- package/src/cmaps/warm.json +9 -0
- package/src/cmaps/winter.json +9 -0
- package/src/cmaps/x_rain.json +9 -0
- package/src/fonts/Garamond.json +1491 -0
- package/src/fonts/Garamond.png +0 -0
- package/src/fonts/GaramondBold.json +1506 -0
- package/src/fonts/GaramondBold.png +0 -0
- package/src/fonts/Roboto-Regular.json +1496 -0
- package/src/fonts/Roboto-Regular.png +0 -0
- package/src/fonts/Ubuntu.json +1506 -0
- package/src/fonts/Ubuntu.png +0 -0
- package/src/fonts/UbuntuBold.json +1506 -0
- package/src/fonts/UbuntuBold.png +0 -0
- package/src/index.html +80 -0
- package/src/mni152.nii.gz +0 -0
- package/src/niivue-object3D.js +31 -0
- package/src/niivue-shader3D.js +11 -0
- package/src/niivue.js +2643 -0
- package/src/nvimage.js +486 -0
- package/src/shader-srcs.js +519 -0
- package/src/shader.js +76 -0
- package/dist/niivue.js +0 -2
package/package.json
CHANGED
|
@@ -1,25 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@niivue/niivue",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "minimal webgl2 nifti image viewer",
|
|
5
|
-
"main": "
|
|
5
|
+
"main": "./src/niivue.js",
|
|
6
|
+
"unpkg": "./dist/niivue.umd.js",
|
|
6
7
|
"scripts": {
|
|
7
|
-
"
|
|
8
|
-
"build
|
|
8
|
+
"dev": "vite",
|
|
9
|
+
"build": "npx prettier --write src/ && npx vite build --emptyOutDir && npm run copy-test && npm run copy-demo && npm run copy-doc",
|
|
10
|
+
"build-win": "npx prettier --write src/ && npx vite build --emptyOutDir && npm run copy-test-win && npm run copy-demo-win && npm run copy-doc-win",
|
|
9
11
|
"demo": "npm run build && npx http-server demos/",
|
|
10
12
|
"demo-win": "npm run build-win && npx http-server demos/",
|
|
11
|
-
"copy-test": "cp ./dist/niivue.js ./tests/niivue.js",
|
|
12
|
-
"copy-test-win": "copy .\\dist\\niivue.js .\\tests\\niivue.js",
|
|
13
|
-
"copy-demo": "cp ./dist/niivue.js ./demos/niivue.js",
|
|
14
|
-
"copy-demo-win": "copy .\\dist\\niivue.js .\\demos\\niivue.js",
|
|
13
|
+
"copy-test": "cp ./dist/niivue.umd.js ./tests/niivue.umd.js",
|
|
14
|
+
"copy-test-win": "copy .\\dist\\niivue.umd.js .\\tests\\niivue.umd.js",
|
|
15
|
+
"copy-demo": "cp ./dist/niivue.umd.js ./demos/niivue.umd.js",
|
|
16
|
+
"copy-demo-win": "copy .\\dist\\niivue.umd.js .\\demos\\niivue.umd.js",
|
|
15
17
|
"copy-doc": "cp -r ./demos/* ./docs/",
|
|
16
18
|
"copy-doc-win": "robocopy .\\demos .\\docs /E",
|
|
17
|
-
"test": "npm run build && jest
|
|
18
|
-
"test-win": "npm run build-win && jest
|
|
19
|
+
"test": "npm run build && jest --maxWorkers=1",
|
|
20
|
+
"test-win": "npm run build-win && jest --maxWorkers=1",
|
|
19
21
|
"pub": "npm publish --access public"
|
|
20
22
|
},
|
|
21
23
|
"files": [
|
|
22
|
-
"
|
|
24
|
+
"src",
|
|
25
|
+
"dist"
|
|
23
26
|
],
|
|
24
27
|
"repository": {
|
|
25
28
|
"type": "git",
|
|
@@ -38,19 +41,21 @@
|
|
|
38
41
|
"url": "https://github.com/niivue/niivue/issues"
|
|
39
42
|
},
|
|
40
43
|
"homepage": "https://github.com/niivue/niivue#readme",
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"gl-matrix": "^3.3.0",
|
|
46
|
+
"nifti-reader-js": "^0.5.4",
|
|
47
|
+
"rxjs": "^7.1.0",
|
|
48
|
+
"uuid": "^8.3.2"
|
|
49
|
+
},
|
|
41
50
|
"devDependencies": {
|
|
42
|
-
"
|
|
51
|
+
"eslint": "^8.2.0",
|
|
43
52
|
"express": "^4.17.1",
|
|
44
|
-
"gl-matrix": "^3.3.0",
|
|
45
53
|
"http-server": "^0.12.3",
|
|
46
54
|
"jest": "^27.0.6",
|
|
47
55
|
"jest-image-snapshot": "^4.5.1",
|
|
48
56
|
"jest-puppeteer": "^5.0.4",
|
|
49
|
-
"nifti-reader-js": "^0.5.4",
|
|
50
57
|
"prettier": "^2.3.2",
|
|
51
58
|
"puppeteer": "^9.1.1",
|
|
52
|
-
"
|
|
53
|
-
"webpack": "^5.34.0",
|
|
54
|
-
"webpack-cli": "^4.6.0"
|
|
59
|
+
"vite": "^2.6.14"
|
|
55
60
|
}
|
|
56
61
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"min": -590,
|
|
3
|
+
"max": 600,
|
|
4
|
+
"R": [0, 241, 241, 248, 248, 178, 178, 232, 255, 255, 255],
|
|
5
|
+
"G": [0, 156, 156, 222, 222, 36, 36, 51, 255, 255, 255],
|
|
6
|
+
"B": [0, 130, 130, 169, 169, 24, 24, 37, 255, 255, 255],
|
|
7
|
+
"A": [0, 8, 0, 0, 0, 64, 64, 0, 0, 222, 222],
|
|
8
|
+
"I": [0, 2, 3, 64, 122, 142, 172, 182, 252, 253, 255]
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"min": -590,
|
|
3
|
+
"max": 600,
|
|
4
|
+
"R": [0, 241, 241, 248, 248, 178, 232, 255, 255],
|
|
5
|
+
"G": [0, 156, 156, 222, 222, 36, 51, 255, 255],
|
|
6
|
+
"B": [0, 130, 130, 169, 169, 24, 37, 255, 255],
|
|
7
|
+
"A": [0, 63, 105, 135, 167, 184, 228, 228, 228],
|
|
8
|
+
"I": [0, 1, 52, 127, 137, 162, 172, 252, 255]
|
|
9
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"min": 0,
|
|
3
|
+
"max": 0,
|
|
4
|
+
"R": [
|
|
5
|
+
0, 13, 21, 26, 27, 25, 22, 21, 22, 28, 39, 54, 75, 98, 124, 148, 171, 189,
|
|
6
|
+
202, 210, 213, 211, 206, 200, 195, 193, 195, 201, 211, 225, 240, 255
|
|
7
|
+
],
|
|
8
|
+
"G": [
|
|
9
|
+
0, 5, 11, 20, 31, 44, 58, 72, 86, 99, 109, 116, 120, 122, 122, 122, 121,
|
|
10
|
+
121, 124, 129, 137, 147, 161, 175, 190, 205, 218, 229, 238, 245, 251, 255
|
|
11
|
+
],
|
|
12
|
+
"B": [
|
|
13
|
+
0, 14, 30, 46, 61, 71, 77, 78, 75, 68, 60, 52, 48, 47, 53, 65, 83, 105, 131,
|
|
14
|
+
157, 183, 205, 222, 235, 241, 243, 242, 240, 239, 240, 245, 255
|
|
15
|
+
],
|
|
16
|
+
"A": [
|
|
17
|
+
0, 4, 8, 12, 17, 21, 25, 29, 33, 37, 41, 45, 50, 54, 58, 62, 66, 70, 74, 78,
|
|
18
|
+
83, 87, 91, 95, 99, 103, 107, 111, 116, 120, 124, 128
|
|
19
|
+
],
|
|
20
|
+
"I": [
|
|
21
|
+
0, 8, 16, 25, 33, 41, 49, 58, 66, 74, 82, 90, 99, 107, 115, 123, 132, 140,
|
|
22
|
+
148, 156, 165, 173, 181, 189, 197, 206, 214, 222, 230, 239, 247, 255
|
|
23
|
+
]
|
|
24
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export { default as actc } from "./actc.json";
|
|
2
|
+
export { default as blue } from "./blue.json";
|
|
3
|
+
export { default as blue2red } from "./blue2red.json";
|
|
4
|
+
export { default as bluegrn } from "./bluegrn.json";
|
|
5
|
+
export { default as bone } from "./bone.json";
|
|
6
|
+
export { default as bronze } from "./bronze.json";
|
|
7
|
+
export { default as cividis } from "./cividis.json";
|
|
8
|
+
export { default as cool } from "./cool.json";
|
|
9
|
+
export { default as copper } from "./copper.json";
|
|
10
|
+
export { default as copper2 } from "./copper2.json";
|
|
11
|
+
export { default as ct_airways } from "./ct_airways.json";
|
|
12
|
+
export { default as ct_bones } from "./ct_bones.json";
|
|
13
|
+
export { default as ct_brain } from "./ct_brain.json";
|
|
14
|
+
export { default as ct_brain_gray } from "./ct_brain_gray.json";
|
|
15
|
+
export { default as ct_cardiac } from "./ct_cardiac.json";
|
|
16
|
+
export { default as ct_head } from "./ct_head.json";
|
|
17
|
+
export { default as ct_kidneys } from "./ct_kidneys.json";
|
|
18
|
+
export { default as ct_liver } from "./ct_liver.json";
|
|
19
|
+
export { default as ct_muscles } from "./ct_muscles.json";
|
|
20
|
+
export { default as ct_scalp } from "./ct_scalp.json";
|
|
21
|
+
export { default as ct_skull } from "./ct_skull.json";
|
|
22
|
+
export { default as ct_soft } from "./ct_soft.json";
|
|
23
|
+
export { default as ct_soft_tissue } from "./ct_soft_tissue.json";
|
|
24
|
+
export { default as ct_surface } from "./ct_surface.json";
|
|
25
|
+
export { default as ct_vessels } from "./ct_vessels.json";
|
|
26
|
+
export { default as ct_w_contrast } from "./ct_w_contrast.json";
|
|
27
|
+
export { default as cubehelix } from "./cubehelix.json";
|
|
28
|
+
export { default as electric_blue } from "./electric_blue.json";
|
|
29
|
+
export { default as ge_color } from "./ge_color.json";
|
|
30
|
+
export { default as gold } from "./gold.json";
|
|
31
|
+
export { default as gray } from "./gray.json";
|
|
32
|
+
export { default as green } from "./green.json";
|
|
33
|
+
export { default as hot } from "./hot.json";
|
|
34
|
+
export { default as hotiron } from "./hotiron.json";
|
|
35
|
+
export { default as hsv } from "./hsv.json";
|
|
36
|
+
export { default as inferno } from "./inferno.json";
|
|
37
|
+
export { default as jet } from "./jet.json";
|
|
38
|
+
export { default as linspecer } from "./linspecer.json";
|
|
39
|
+
export { default as magma } from "./magma.json";
|
|
40
|
+
export { default as mako } from "./mako.json";
|
|
41
|
+
export { default as nih } from "./nih.json";
|
|
42
|
+
export { default as plasma } from "./plasma.json";
|
|
43
|
+
export { default as random } from "./random.json";
|
|
44
|
+
export { default as red } from "./red.json";
|
|
45
|
+
export { default as redyell } from "./redyell.json";
|
|
46
|
+
export { default as rocket } from "./rocket.json";
|
|
47
|
+
export { default as surface } from "./surface.json";
|
|
48
|
+
export { default as violet } from "./violet.json";
|
|
49
|
+
export { default as viridis } from "./viridis.json";
|
|
50
|
+
export { default as warm } from "./warm.json";
|
|
51
|
+
export { default as winter } from "./winter.json";
|
|
52
|
+
export { default as x_rain } from "./x_rain.json";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"min": 0,
|
|
3
|
+
"max": 0,
|
|
4
|
+
"R": [94, 50, 90, 152, 215, 238, 249, 254, 252, 241, 209, 158],
|
|
5
|
+
"G": [79, 131, 186, 214, 240, 244, 237, 210, 157, 100, 57, 1],
|
|
6
|
+
"B": [162, 189, 167, 164, 155, 169, 168, 123, 86, 68, 79, 66],
|
|
7
|
+
"A": [0, 12, 23, 35, 47, 58, 70, 81, 93, 105, 116, 128],
|
|
8
|
+
"I": [0, 23, 46, 70, 93, 116, 139, 162, 185, 209, 232, 255]
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"min": 0,
|
|
3
|
+
"max": 0,
|
|
4
|
+
"R": [0, 85, 0, 0, 0, 0, 0, 0, 85, 255, 255, 255, 172],
|
|
5
|
+
"G": [0, 0, 0, 0, 85, 170, 255, 255, 255, 255, 85, 0, 0],
|
|
6
|
+
"B": [0, 170, 85, 255, 255, 170, 170, 0, 85, 0, 0, 0, 0],
|
|
7
|
+
"A": [0, 5, 10, 21, 26, 32, 37, 42, 48, 53, 64, 72, 85],
|
|
8
|
+
"I": [0, 15, 31, 63, 79, 95, 111, 127, 143, 159, 191, 217, 255]
|
|
9
|
+
}
|