Leveraging Web Technologies for Neuroimaging Research

Tarek Sherif

McGill Centre for Integrative Neuroscience

The Web was...

And then it was..

Then there as a bit of...

And now you have...

The Web is a Viable Platform

The Web is everywhere!

The Web is a Viable Platform

It's powerful

  • Create full-featured applications

The Web is a Viable Platform

It's easy to use

  • Everyone has a web browser
  • No installation of software
  • Always up to date

The Web is a Viable Platform

It's easy to create

          
  BrainBrowser.SurfaceViewer.start("brainbrowser", function(viewer) {
    viewer.render();

    viewer.loadColorMapFromURL("models/spectral.txt");
    viewer.loadModelFromURL("models/brain.obj", {
      format: "mniobj",
      complete: function() {
        viewer.loadIntensityDataFromURL("models/cortical-thickness.txt");
      }
    });

    viewer.autorotate.x = true;
    viewer.autorotate.y = true;

  });
        
      

Why do you care?

  • Big, distributed data
    • Hard to move around
    • Create applications that access them remotely
  • Sharing tools
    • Just need the URL
  • Sharing data
    • Through tools that explore them in a meaningful way
  • Collaboration

Case Study

The MACACC Dataset Viewer

  • 6.3 million data maps
  • 1TB of data
  • Viewer created using BrainBrowser

What changed?

  • JavaScript sucks less
  • WebGL and HTML5 for high-perfomance graphics
  • Web Workers for multithreading
  • WebSocket and WebRTC for communication

JavaScript

  • Much faster
    • Google made a big push with V8
    • Mozilla now pushing further with asm.js
  • More robust
    • EcmaScript 5 and EcmaScript 6
    • Add features that facilitate development of complex applications
    • Deprecate unsafe features

HTML5 Canvas 2D

  • High-performance, scriptable 2D drawing surface
  • Pixel-level image processing

WebGL

  • The browser talks directly to the graphics card
  • High-performance 3D graphics

Web Workers

  • JavaScript is single-threaded by design
  • Web Workers allow for true multi-threading
  • Compute-intensive tasks can be done in the browser without blocking UI or rendering

WebSocket and WebRTC

  • WebSocket: full-duplex communication between browser and server
  • WebRTC: direct communication between browsers
  • Create collaborative web applications

Thanks!

tsherif@gmail.com

http://tareksherif.ca

@thsherif