@abi-software/scaffoldvuer 1.15.6 → 1.16.0-beta.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abi-software/scaffoldvuer",
3
- "version": "1.15.6",
3
+ "version": "1.16.0-beta.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.3",
44
+ "@abi-software/map-utilities": "1.8.2",
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": "1.19.0"
56
+ "zincjs": "^1.19.2"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@babel/eslint-parser": "^7.28.0",
package/src/App.vue CHANGED
@@ -255,6 +255,11 @@
255
255
  Arm slides
256
256
  </el-button>
257
257
  </el-col>
258
+ <el-col :span="auto">
259
+ <el-button size="small" @click="multipleNifti()">
260
+ Time x Nifti
261
+ </el-button>
262
+ </el-col>
258
263
  </el-row>
259
264
  <el-row :gutter="20" justify="center" align="middle">
260
265
  <el-col :span="auto">
@@ -321,6 +326,7 @@
321
326
  <script>
322
327
  /* eslint-disable no-alert, no-console */
323
328
  import { AnnotationService } from '@abi-software/sparc-annotation'
329
+ import { ElMessage } from 'element-plus';
324
330
  import { markRaw, shallowRef } from 'vue';
325
331
  import { ScaffoldVuer } from "./components/index.js";
326
332
  import DropZone from "./app/DropZone.vue";
@@ -598,6 +604,21 @@ export default {
598
604
  this.$refs.scaffold.clearScene();
599
605
  testSlides(this.$refs.scaffold, texture_prefix);
600
606
  },
607
+ multipleNifti: async function () {
608
+ const urls = [
609
+ "https://mapcore-bucket1.s3.us-west-2.amazonaws.com/digital_twins/080626-demo/downsample_phase_1.nii.gz",
610
+ "https://mapcore-bucket1.s3.us-west-2.amazonaws.com/digital_twins/080626-demo/downsample_phase_3.nii.gz",
611
+ "https://mapcore-bucket1.s3.us-west-2.amazonaws.com/digital_twins/080626-demo/downsample_phase_5.nii.gz"
612
+ ]
613
+ const newTexture = await this.$refs.scaffold.readNIFTIFromSource(urls, true, this.maskUrl);
614
+ newTexture.timeEnabled = true;
615
+ newTexture.setIsPickable(false);
616
+ const scene = this.$refs.scaffold.$module.scene;
617
+ newTexture.setBrightness(0.38);
618
+ newTexture.setContrast(3.5);
619
+ scene.addZincObject(newTexture);
620
+ console.log(newTexture)
621
+ },
601
622
  saveSettings: function () {
602
623
  this.sceneSettings.push(this.$refs.scaffold.getState());
603
624
  },
@@ -454,6 +454,7 @@ import {
454
454
  } from '@element-plus/icons-vue'
455
455
  import PrimitiveControls from "./PrimitiveControls.vue";
456
456
  import ScaffoldOverlay from "./ScaffoldOverlay.vue";
457
+ import { readNIFTIFromSource } from "../scripts/niftiHelper.js"
457
458
  import ScaffoldTooltip from "./ScaffoldTooltip.vue";
458
459
  import ScaffoldTreeControls from "./ScaffoldTreeControls.vue";
459
460
  import { MapSvgIcon, MapSvgSpriteColor } from "@abi-software/svg-sprite";
@@ -3131,6 +3132,10 @@ export default {
3131
3132
  this.setMarkerModeForObjectsWithName(key, value, "on");
3132
3133
  }
3133
3134
  },
3135
+ readNIFTIFromSource: async function(urls, useHeaderInfo, maskURL) {
3136
+ const newTexture = await readNIFTIFromSource(urls, useHeaderInfo, maskURL);
3137
+ return newTexture;
3138
+ },
3134
3139
  },
3135
3140
  };
3136
3141
  </script>
@@ -6,7 +6,7 @@ import {
6
6
 
7
7
  const options = {
8
8
  hideWhitePixel: false,
9
- hideBlackPixel: true,
9
+ hideBlackPixel: false,
10
10
  keepScalePosition: true,
11
11
  filterByValue: true,
12
12
  timeEnabled: true,