@abi-software/scaffoldvuer 1.16.0-beta.1 → 1.16.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/scaffoldvuer.js +6263 -6252
- package/dist/scaffoldvuer.umd.cjs +176 -165
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/src/App.vue +40 -1
- package/src/components/ScaffoldVuer.vue +2 -2
- package/src/scripts/niftiHelper.js +2 -75
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abi-software/scaffoldvuer",
|
|
3
|
-
"version": "1.16.0
|
|
3
|
+
"version": "1.16.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"*.js"
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@abi-software/map-utilities": "1.8.
|
|
44
|
+
"@abi-software/map-utilities": "1.8.3",
|
|
45
45
|
"@abi-software/sparc-annotation": "^0.3.2",
|
|
46
46
|
"@abi-software/svg-sprite": "1.0.3",
|
|
47
47
|
"@element-plus/icons-vue": "^2.3.1",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"unplugin-vue-components": "^0.26.0",
|
|
54
54
|
"vue": "^3.4.21",
|
|
55
55
|
"vue-router": "^4.2.5",
|
|
56
|
-
"zincjs": "
|
|
56
|
+
"zincjs": "1.20.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@babel/eslint-parser": "^7.28.0",
|
package/src/App.vue
CHANGED
|
@@ -605,12 +605,51 @@ export default {
|
|
|
605
605
|
testSlides(this.$refs.scaffold, texture_prefix);
|
|
606
606
|
},
|
|
607
607
|
multipleNifti: async function () {
|
|
608
|
+
const v1 = {
|
|
609
|
+
"id": "mesh-location-orientation",
|
|
610
|
+
"locations": [
|
|
611
|
+
{
|
|
612
|
+
"identifier": 1,
|
|
613
|
+
"label": "original",
|
|
614
|
+
"orientation": [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0],
|
|
615
|
+
"position": [-283, -363, 1090],
|
|
616
|
+
"scale": [540, 540, 276],
|
|
617
|
+
"flipY": false,
|
|
618
|
+
"flipZ": true,
|
|
619
|
+
"reference_point": "corner"
|
|
620
|
+
}
|
|
621
|
+
],
|
|
622
|
+
"settings": {
|
|
623
|
+
"slides": [
|
|
624
|
+
{
|
|
625
|
+
"direction": "x",
|
|
626
|
+
"value": 0.5
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
"direction": "y",
|
|
630
|
+
"value": 0.5
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
"direction": "z",
|
|
634
|
+
"value": 0.45
|
|
635
|
+
}
|
|
636
|
+
]
|
|
637
|
+
},
|
|
638
|
+
"type": "slides"
|
|
639
|
+
}
|
|
640
|
+
const options = {
|
|
641
|
+
hideWhitePixel: false,
|
|
642
|
+
hideBlackPixel: false,
|
|
643
|
+
keepScalePosition: true,
|
|
644
|
+
filterByValue: true,
|
|
645
|
+
timeEnabled: true,
|
|
646
|
+
}
|
|
608
647
|
const urls = [
|
|
609
648
|
"https://mapcore-bucket1.s3.us-west-2.amazonaws.com/digital_twins/080626-demo/downsample_phase_1.nii.gz",
|
|
610
649
|
"https://mapcore-bucket1.s3.us-west-2.amazonaws.com/digital_twins/080626-demo/downsample_phase_3.nii.gz",
|
|
611
650
|
"https://mapcore-bucket1.s3.us-west-2.amazonaws.com/digital_twins/080626-demo/downsample_phase_5.nii.gz"
|
|
612
651
|
]
|
|
613
|
-
const newTexture = await this.$refs.scaffold.readNIFTIFromSource(urls, true, this.maskUrl);
|
|
652
|
+
const newTexture = await this.$refs.scaffold.readNIFTIFromSource(urls, true, this.maskUrl, v1, options, true);
|
|
614
653
|
newTexture.timeEnabled = true;
|
|
615
654
|
newTexture.setIsPickable(false);
|
|
616
655
|
const scene = this.$refs.scaffold.$module.scene;
|
|
@@ -3132,8 +3132,8 @@ export default {
|
|
|
3132
3132
|
this.setMarkerModeForObjectsWithName(key, value, "on");
|
|
3133
3133
|
}
|
|
3134
3134
|
},
|
|
3135
|
-
readNIFTIFromSource: async function(urls, useHeaderInfo, maskURL) {
|
|
3136
|
-
const newTexture = await readNIFTIFromSource(urls, useHeaderInfo, maskURL);
|
|
3135
|
+
readNIFTIFromSource: async function(urls, useHeaderInfo, maskURL, settings, options) {
|
|
3136
|
+
const newTexture = await readNIFTIFromSource(urls, useHeaderInfo, maskURL, settings, options);
|
|
3137
3137
|
return newTexture;
|
|
3138
3138
|
},
|
|
3139
3139
|
},
|
|
@@ -1,81 +1,8 @@
|
|
|
1
1
|
//import * as nifti from 'nifti-reader-js';
|
|
2
2
|
import { createPrimitivesFromNIFTI } from "zincjs/src/loaders/niftiReader.js";
|
|
3
3
|
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
hideBlackPixel: false,
|
|
7
|
-
keepScalePosition: true,
|
|
8
|
-
filterByValue: true,
|
|
9
|
-
timeEnabled: true,
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const textureSettings = {
|
|
13
|
-
v1: {
|
|
14
|
-
"id": "mesh-location-orientation",
|
|
15
|
-
"locations": [
|
|
16
|
-
{
|
|
17
|
-
"identifier": 1,
|
|
18
|
-
"label": "original",
|
|
19
|
-
"orientation": [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0],
|
|
20
|
-
"position": [-283, -363, 1090],
|
|
21
|
-
"scale": [540, 540, 276],
|
|
22
|
-
"flipY": false,
|
|
23
|
-
"reference_point": "corner"
|
|
24
|
-
}
|
|
25
|
-
],
|
|
26
|
-
"settings": {
|
|
27
|
-
"slides": [
|
|
28
|
-
{
|
|
29
|
-
"direction": "x",
|
|
30
|
-
"value": 0.5
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"direction": "y",
|
|
34
|
-
"value": 0.5
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"direction": "z",
|
|
38
|
-
"value": 0.45
|
|
39
|
-
}
|
|
40
|
-
]
|
|
41
|
-
},
|
|
42
|
-
"type": "slides"
|
|
43
|
-
},
|
|
44
|
-
v2: {
|
|
45
|
-
"id": "mesh-location-orientation",
|
|
46
|
-
"locations": [
|
|
47
|
-
{
|
|
48
|
-
"identifier": 1,
|
|
49
|
-
"label": "original",
|
|
50
|
-
"orientation": [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0],
|
|
51
|
-
"position": [-183, -343, 1034],
|
|
52
|
-
"scale": [520, 520, 235],
|
|
53
|
-
"flipY": false,
|
|
54
|
-
"reference_point": "corner"
|
|
55
|
-
}
|
|
56
|
-
],
|
|
57
|
-
"settings": {
|
|
58
|
-
"slides": [
|
|
59
|
-
{
|
|
60
|
-
"direction": "x",
|
|
61
|
-
"value": 0.5
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"direction": "y",
|
|
65
|
-
"value": 0.5
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"direction": "z",
|
|
69
|
-
"value": 0.45
|
|
70
|
-
}
|
|
71
|
-
]
|
|
72
|
-
},
|
|
73
|
-
"type": "slides"
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
const readNIFTIFromSource = async (url, useHeaderInfo, maskURL) => {
|
|
78
|
-
const images = await createPrimitivesFromNIFTI(url, useHeaderInfo, maskURL, textureSettings['v1'], options);
|
|
4
|
+
const readNIFTIFromSource = async (url, useHeaderInfo, maskURL, settings, options) => {
|
|
5
|
+
const images = await createPrimitivesFromNIFTI(url, useHeaderInfo, maskURL, settings, options);
|
|
79
6
|
return images;
|
|
80
7
|
}
|
|
81
8
|
|