/SurficeWeb

Web based brain visualization

Primary LanguageJavaScriptBSD 2-Clause "Simplified" LicenseBSD-2-Clause

About

The Surfice web page is a way to view 3D meshes using a web browser. While it can view many types of 3D object, it works well with the desktop-based Surfice software. You can export images from Surfice Desktop to Surfice Web, allowing users to view your images on any device - phone, tablet or computer.

Here is an example of Surfice for Web.

Requirements

You need to have a web server. You simply copy the files from this repository to a folder that will be hosted as a web page. If you do not have a web server, you can make a free github repository that will be shared as a website. If you do use Github, make sure you do not copy this README.md file to you repository (the README file will be shown as a web page instead of the index.html file). An example of a Github-based web server is here here.

Installation

Simply copy the contents of this repository to a folder that will be displayed on the web. All the required components are included. You may want to edit the config.json file with a text editor to customize your viewer (for example displaying custom meshes).

Customize

The text file config.js includes a few values that you might want to change. Here are a few of the most relevant ones.

  • "mesh" determines the mesh that will be initially viewed, e.g. "Right.mz3",
  • "overlay" determines whether another mesh will be loaded on top of the first, e.g. "overlay.mz3". Set this to "" if you do not want to load an overlay mesh.
  • "elevation" is the elevation of the camera relative to the mesh in degrees.
  • "azimuth" sets the position of the camera with respect to the mesh.
  • "backColor" determines the back ground color (in hex), for example "#FFFFFF" for white or "#000000" for black.

How it works

  • The web viewer requires WebGL 1.0, and uses the three.js JavaScript library.
  • Interactive controls are provided by dat.gui.
  • Loading of compressed uses gunzip.min.js. Alternatively, pako will be used if available.

Alternatives

Surfice for Web provides a simple method for users of the Surfice desktop software to share results. However, there are a lot of great free tools that can do similar work.