Giter Site home page Giter Site logo

sarbabi / webssm Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 870 KB

Published in Journal of Orthopaedics Research 2022. A Web-based 3D Statistical Shape Model Visualization, Interaction and Sampling Tool.

Python 20.35% Scala 11.28% HTML 2.81% JavaScript 65.56%
statistical-shape-models scala visualization vtkjs scalismo

webssm's Introduction

DOI

WebSSM

webssm a web-based tool for visualizing, manipulating and sampling statistical shape models in scalismo

Motivation

scalismo is a library for statistical shape modelling and model-based image analysis in Scala. 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.

Demo

  • you can see a video demo of how WebSSM looks in here.
  • an online demo is available in here
  • page on image sciences institute website ISI@UU

Paper

This tool is provided as a visualization tool for our paper: "Statistical Shape Model of the Talus Bone Morphology: A Comparison between Impinged and non-Impinged Ankles" published in The Journal of Orthopaedics Research 2022.

Screenshots

Tech/Framework used

  • Python
    • Flask
  • Scala
    • Scalismo
  • Javascript
    • Node.js
    • VTK.js

How to use

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.

step1. start by making your shape model ready for web

quick

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.

advanced

Follow the tutorial 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.

step2. continue with the backend

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: run the following commands in cmd or powershell, while in backend folder: python -m venv venv //creates a virtual environment in which requirements will be installed ./venv/Scripts/activate.bat //(if you're using powershell, change .bat to .ps1) pip install -r requirements.txt //installs requirement in the virtual environment

$env:FLASK_APP = "app.py" flask run

step3. finish with frontend

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.

advanced

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. 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

deployment on server

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 ([email protected]) or in Scalismo google discussion group, I'll provide you with an step-by-step guide.

your contribution

a lot of rooms for improvement and other ideas can be implemented in the code with pretty much little changes, a few shown bellow:

multiple view

for instance in case you're visualizing like a joint, there's possiblity to show them in the same page. an example is bellow: webssm-two_win

tuning the MoVs to more than 3SD of mean shape

here you see an example of the shape, you can change the MoVs to something far to 10 SD in this example: webssm-meer-than-3SD

webssm's People

Contributors

sarbabi avatar

Stargazers

 avatar Omid Safarzadeh avatar

Watchers

 avatar Ondřej Klíma avatar

Forkers

wym7574

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.