Skip to content

Commit

Permalink
update density
Browse files Browse the repository at this point in the history
  • Loading branch information
LinkunGao committed Sep 27, 2024
1 parent 03ad8cc commit 2abc9eb
Show file tree
Hide file tree
Showing 48 changed files with 81,625 additions and 142 deletions.
12 changes: 6 additions & 6 deletions frontend/assets/data/topics.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dataFile": "breast-main",
"category": "success",
"subTitle": "subSuccess",
"model": { "name": "NoInfarct" }
"model": { "name": "normal" }
}
}
},
Expand All @@ -27,7 +27,7 @@
"dataFile": "breast-main",
"category": "success",
"subTitle": "subSuccess",
"model": { "name": "NoInfarct" }
"model": { "name": "normal" }
},
"2": {
"title": "25%-50% FG",
Expand All @@ -36,7 +36,7 @@
"dataFile": "breast-main",
"category": "success",
"subTitle": "subSuccess",
"model": { "name": "NoInfarct" }
"model": { "name": "density_2" }
},
"3": {
"title": "51%-75% FG",
Expand All @@ -45,7 +45,7 @@
"dataFile": "breast-main",
"category": "success",
"subTitle": "subSuccess",
"model": { "name": "NoInfarct" }
"model": { "name": "density_3" }
},
"4": {
"title": ">75% FG",
Expand All @@ -54,12 +54,12 @@
"dataFile": "breast-main",
"category": "success",
"subTitle": "subSuccess",
"model": { "name": "NoInfarct" }
"model": { "name": "density_4" }
}
}
},
"benign": {
"title": "Conditions",
"title": "Benign",
"heading": "Breast Benign Conditions",
"icon": "mdi-lightning-bolt",
"subTopics": {
Expand Down
Binary file added frontend/assets/images/loading/loading.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions frontend/assets/images/loading/loading.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 4 additions & 15 deletions frontend/components/about/Logo.vue
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@
<template>
<div class="logo">
<img src="~assets/images/logo1.png" />
<img src="~assets/images/logo2.png" />
<img src="~assets/images/logo3.png" />
<div class="flex flex-col justify-end items-end">
<img class="w-32 h-auto my-1 mx-5" src="~assets/images/logo1.png" />
<img class="w-32 h-auto my-1 mx-5" src="~assets/images/logo2.png" />
<img class="w-48 h-auto my-1 mx-5" src="~assets/images/logo3.png" />
</div>
</template>

<style scoped lang="scss">
.logo {
display: flex;
flex-direction: column;
img {
width: 250px;
height: auto;
margin: 5px 0;
}
}
</style>
44 changes: 39 additions & 5 deletions frontend/components/model/LeftModel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,25 @@ export default {
panelStyle: null,
model_panel: null,
model_title: null,
navPanelName: null,
modelUrlsArray:{
normal: [
"modelView/density-1/left/density25.glb",
"modelView/density-1/left/left_breast_view.json",
],
density_2:[
"modelView/density-2/left/density50.glb",
"modelView/density-2/left/left_breast_view.json",
],
density_3:[
"modelView/density-3/left/density75.glb",
"modelView/density-3/left/left_breast_view.json",
],
density_4:[
"modelView/density-4/left/density100.glb",
"modelView/density-4/left/left_breast_view.json",
]
},
};
},
Expand All @@ -40,6 +59,9 @@ export default {
this.$nuxt.$on("panel-height", this.setupPanelHeight);
this.model_panel = "model_name";
this.model_title = "model_title";
this.$nuxt.$on("onNavChange", this.onNavChange);
this.start();
Expand All @@ -64,20 +86,30 @@ export default {
}, 500);
}
},
onNavChange(modelName) {
this.navPanelName = modelName;
this.loadModel(this.modelUrlsArray[this.navPanelName][0], this.navPanelName+"left");
},
start() {
this.loadModel("modelView/breast-l.glb", "breastmodel");
if (this.navPanelName === null) {
this.loadModel(this.modelUrlsArray.normal[0], this.navPanelName+"left");
}else{
this.loadModel(this.modelUrlsArray[this.navPanelName][0], this.navPanelName+"left");
}
},
loadModel(model_url, model_name) {
const viewURL = "modelView/left_breast_view.json";
let viewURL = "";
if (this.navPanelName === null) {
viewURL = this.modelUrlsArray.normal[1];
} else {
viewURL = this.modelUrlsArray[this.navPanelName][1];
}
this.scene = this.baseRenderer.getSceneByName(model_name);
if (this.scene === undefined) {
this.scene = this.baseRenderer.createScene(model_name);
this.scene.addLights();
// this.scene.controls.staticMoving = true;
// this.scene.controls.rotateSpeed = 3.0;
// this.scene.controls.panSpeed = 3.0;
this.scene.controls.panSpeed = 0.2;
this.baseRenderer.setCurrentScene(this.scene);
Expand All @@ -98,6 +130,8 @@ export default {
this.scene.updateBackground("#fab9c5", "#fab9c5");
this.Copper.setHDRFilePath("environment/venice_sunset_1k.hdr");
this.baseRenderer.updateEnvironment();
}else{
this.baseRenderer.setCurrentScene(this.scene);
}
this.scene.onWindowResize();
},
Expand Down
Loading

0 comments on commit 2abc9eb

Please sign in to comment.