You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
a web-based tool for visualizing, manipulating and sampling statistical shape models in [scalismo](https://github.com/unibas-gravis/scalismo)
4
+
5
+
## Motivation
6
+
[scalismo](https://scalismo.org/) is a library for statistical shape modelling and model-based image analysis in Scala.
7
+
WebSSM aims to bringing these statistical shape models to the convenience of web. So anyone accessing the web can view and interact with your shape model, also create samples and download them for their use.
8
+
9
+
## Demo
10
+
you can see a Demo of how WebSSM looks in [here](https://www.youtube.com/watch?v=7YUsT4kE_Zg).
11
+
12
+
## Screenshots
13
+
14
+
## Tech/Framework used
15
+
- Python
16
+
- Flask
17
+
- Scala
18
+
- Scalismo
19
+
- Javascript
20
+
- Node.js
21
+
- VTK.js
22
+
23
+
## How to use
24
+
you can fork the project (click fork in top right of this page), then you can start working on the project from your GitHub account. Then clone the code to your local machine.
25
+
26
+
### step1. start by making your shape model ready for web
27
+
#### quick
28
+
Having sbt installed, place your statistical shape model file (.h5 extension) in `data` folder of `data-preparation` directory, then open a terminal and run `sbt run`. it will extract all required parameters from your shape model and writes them in 4 .csv files in the results folder.
29
+
#### advanced
30
+
Follow the [tutorial](https://scalismo.org/docs/ide) in Scalismo website, you'll be able to open the `data-preparatio` folder as a project in IntellijIdea IDE, make any change you like in the code and build it. It's especially useful for some cases that your shape model is too big for the lightweight web view, then you can change the code a bit to sample from the shape model.
31
+
32
+
### step2. continue with the backend
33
+
Within `backend` directory, place .csv file generated in step 1, into the folder `data`. In the `backend` folder open a terminal and do following tasks:
34
+
run the following commands in cmd or powershell, while in `backend` folder:
35
+
`python -m venv venv` //creates a virtual environment in which requirements will be installed
36
+
`./venv/Scripts/activate.bat` //(if you're using powershell, change .bat to .ps1)
37
+
`pip install -r requirements.txt` //installs requirement in the virtual environment
38
+
39
+
`$env:FLASK_APP = "app.py"`
40
+
`flask run`
41
+
42
+
### step3. finish with frontend
43
+
Now if you just open the `index.html` file from the `frontend` directory, into your browser, you should see the your shape model as you expect.
44
+
#### advanced
45
+
having Node.js installed, open a terminal in the `frontend` folder and run `npm install`. it will generate a folder called node_modules and installs everything you need to build the project.
46
+
In case you wanted to make changes in the frontend (like changing menus, adding functionalities, ...) you can make your changes basically in `src/webssm.js` file and then build the project with command `npx webpack --progress`
47
+
48
+
49
+
### deployment on server
50
+
enjoying viewing your shape model in your browser? if you want to deploy your web-based tool to your real server, you have a few more steps to do. Then if you send me a message in email or in [Scalismo google discussion group](https://groups.google.com/g/scalismo), I'll provide you with an easy step-by-step guide.
place your shape model (.h5) in data folder, then run the src code, it extracts the shape model parameters and places them in data folder as .csv files.
0 commit comments