Skip to content

Commit

Permalink
fixed paint drag bugs, changed painting default method to sgementation
Browse files Browse the repository at this point in the history
  • Loading branch information
LinkunGao committed Oct 24, 2022
1 parent e28a53e commit 8d374a6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"preview": "vite preview"
},
"dependencies": {
"copper3d_visualisation": "^1.11.32",
"copper3d_visualisation": "^1.11.33",
"element-plus": "^2.2.17",
"sass": "^1.55.0",
"vue": "^3.2.37"
Expand Down
5 changes: 3 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ let dialog = ref(false);
onMounted(() => {
console.log(
"%cNRRD Segmentation App %cBeta:v2.1.8",
"%cNRRD Segmentation App %cBeta:v2.1.9",
"padding: 3px;color:white; background:#d94607",
"padding: 3px;color:white; background:#219EBC"
);
Expand Down Expand Up @@ -153,7 +153,7 @@ watchEffect(() => {
});
nrrdTools.setAllSlices(allSlices);
initSliceIndex.value = nrrdTools.getCurrentSliceIndex();
const getSliceNum = (index: number, contrastindex: number) => {
immediateSliceNum.value = index;
contrastNum.value = contrastindex;
Expand All @@ -165,6 +165,7 @@ watchEffect(() => {
nrrdTools.draw(scene as Copper.copperScene, gui);
scene?.addPreRenderCallbackFunction(nrrdTools.start);
initSliceIndex.value = nrrdTools.getCurrentSliceIndex();
max.value = nrrdTools.getMaxSliceNum()[0];
}
Expand Down
6 changes: 6 additions & 0 deletions src/components/NavBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ let previousMax = 0;
let isShowContrast = false;
let count = 0;
let magnification = 1;
let initFlag = false;
const emit = defineEmits([
"onSliceChange",
Expand Down Expand Up @@ -96,6 +97,7 @@ const onChangeSlider = () => {
watchEffect(() => {
initSliceIndex?.value && (sliceNum.value = initSliceIndex.value);
initFlag = true;
});
watchEffect(() => {
Expand All @@ -120,6 +122,10 @@ watchEffect(() => {
preViousSliceNum = sliceNum.value;
previousMax = max.value;
}
if (initFlag) {
sliceNum.value = initSliceIndex?.value as number;
initFlag = false;
}
});
</script>

Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,10 @@ copper3d_plugin_heartjs_config@^1.0.7:
resolved "https://registry.npmjs.org/copper3d_plugin_heartjs_config/-/copper3d_plugin_heartjs_config-1.0.7.tgz"
integrity sha512-rWhe19DQjC7Ap96uPKmQNy+IBihXTHelAowr5VdgHee+LDTLTLJ75IHsbBxi5ls1LHMxsXhGmWmT3Oy+pgva+Q==

copper3d_visualisation@^1.11.32:
version "1.11.32"
resolved "https://registry.yarnpkg.com/copper3d_visualisation/-/copper3d_visualisation-1.11.32.tgz#f76c292fc9e09889a96e67c7f0f9bfaa10cebd79"
integrity sha512-eOEfcaKKYpBPC2PhhejYcrXf06gS1Ph/jVHdM+07IbfL3QTxuP7FRmFGVbcDi7p0JEt1Jhb4TknTqWOaooJDsA==
copper3d_visualisation@^1.11.33:
version "1.11.33"
resolved "https://registry.yarnpkg.com/copper3d_visualisation/-/copper3d_visualisation-1.11.33.tgz#203f7fd0570c5d2a875a54d1abf3cf313cea0351"
integrity sha512-QF87k3SBgsXDfpTeLPp9SCUmEYMJCB2osaeJKsMvWzIRxcsM5dKmrhkWvtna6IpCYVcIFVhmRm9Phxc4fDgzoA==
dependencies:
"@types/dat.gui" "^0.7.7"
"@types/three" "^0.140.0"
Expand Down

0 comments on commit 8d374a6

Please sign in to comment.