webgl export - na-mic.org

26
NA-MIC National Alliance for Medical Image Computing http://www.na-mic.org WebGL Export Nicolas Rannou, Daniel Haehn Boston Children's Hospital [email protected] (857-218-5140) NA-MIC Tutorial Contest: Summer 2012 © 2011, All Rights Reserved

Upload: others

Post on 31-Dec-2021

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: WebGL Export - na-mic.org

NA-MICNational Alliance for Medical Image Computing http://www.na-mic.org

WebGL Export

Nicolas Rannou, Daniel Haehn

Boston Children's [email protected] (857-218-5140)

NA-MIC Tutorial Contest: Summer 2012

© 2011, All Rights Reserved

Page 2: WebGL Export - na-mic.org

National Alliance for Medical Image Computing http://www.na-mic.org

Learning Objective

Export data from Slicer to visualize it in a web browser

Audience: End-users

© 2011, All Rights Reserved

Page 3: WebGL Export - na-mic.org

National Alliance for Medical Image Computing http://www.na-mic.org

Motivation

© 2011, All Rights Reserved

Many times researchers want to share the data they generate from Slicer.

The “WebGL Export” module allows researchers to bring their data to the web.

It opens new perspectives and will impact research in the following aspects:

Collaboration/Sharing data

Publication/Grant Application

Access your data from anywhere with your smart phone or tablet

Page 4: WebGL Export - na-mic.org

National Alliance for Medical Image Computing http://www.na-mic.org

Pre-requisite

© 2011, All Rights Reserved

Slicer4 Data Loading and 3D Visualization

The Data loading and 3D visualization course guides through the basics of loading and viewing volumes and 3D models in Slicer4 .

Author: Sonia Pujol, Ph.D.

http://www.slicer.org/slicerWiki/index.php/Documentation/4.0/Training#Slicer4_Data_Loading_and_3D_Visualization

Slicer4 Data Loading and 3D Visualization

The Data loading and 3D visualization course guides through the basics of loading and viewing volumes and 3D models in Slicer4 .

Author: Sonia Pujol, Ph.D.

http://www.slicer.org/slicerWiki/index.php/Documentation/4.0/Training#Slicer4_Data_Loading_and_3D_Visualization

Page 5: WebGL Export - na-mic.org

National Alliance for Medical Image Computing http://www.na-mic.org

This tutorial requires the installation of the Slicer4.1release and the tutorial dataset. They are available at the following locations:

Slicer download pagehttp://www.slicer.org/pages/Downloads/

Tutorial dataset: NAC brain atlashttp://www.spl.harvard.edu/publications/bitstream/download/5276

Courtesy of Halle M., Talos I-F., Jakab M., Farough S., Meier D., Wald L., Fischl B., Kikinis R. (http://www.spl.harvard.edu/publications/item/view/2037)

x

Material

© 2011, All Rights Reserved

Page 6: WebGL Export - na-mic.org

National Alliance for Medical Image Computing http://www.na-mic.org

This tutorial has been tested on:

Linux:

Ubuntu 12.04 x86_64

Mac OSX:

Lion

Windows:

XP x64

Platforms

© 2011, All Rights Reserved

Page 7: WebGL Export - na-mic.org

National Alliance for Medical Image Computing http://www.na-mic.org

• Load data

• Modify data

• Export data

• Share data

Overview

© 2011, All Rights Reserved

Page 8: WebGL Export - na-mic.org

National Alliance for Medical Image Computing http://www.na-mic.org

Load data

© 2011, All Rights Reserved

• Load data

• Modify data

• Export data

• Share data

Page 9: WebGL Export - na-mic.org

National Alliance for Medical Image Computing http://www.na-mic.org

Load data

© 2011, All Rights Reserved

Load the scene

Page 10: WebGL Export - na-mic.org

National Alliance for Medical Image Computing http://www.na-mic.org

Load data

© 2011, All Rights Reserved

Look in the directory containing thetutorial dataset

Select brain-atlas-hierarchy.mrml

Open it

Page 11: WebGL Export - na-mic.org

National Alliance for Medical Image Computing http://www.na-mic.org

Load data

© 2011, All Rights Reserved

The NAC brain atlas opens...The NAC brain atlas opens...

Page 12: WebGL Export - na-mic.org

National Alliance for Medical Image Computing http://www.na-mic.org

Modify data

© 2011, All Rights Reserved

• Load data

• Modify data

• Export data

• Share data

Page 13: WebGL Export - na-mic.org

National Alliance for Medical Image Computing http://www.na-mic.org

Modify data - Visibility

© 2011, All Rights Reserved

Open the “Models” module

Select “left cerebral hemisphere”

Click on the “eye” to hide the model

Page 14: WebGL Export - na-mic.org

National Alliance for Medical Image Computing http://www.na-mic.org

Modify data - Color

© 2011, All Rights Reserved

Select “corpus callosum” label

Click on the color button

Modify the color to white

Page 15: WebGL Export - na-mic.org

National Alliance for Medical Image Computing http://www.na-mic.org

Modify data - Opacity

© 2011, All Rights Reserved

Select “left cerebellar cortex” label

Modify the opacity

Page 16: WebGL Export - na-mic.org

National Alliance for Medical Image Computing http://www.na-mic.org

Modify data - Background

© 2011, All Rights Reserved

Click on the “pin”

Click on the “eye”

Select “Black background”

Page 17: WebGL Export - na-mic.org

National Alliance for Medical Image Computing http://www.na-mic.org

Export data

© 2011, All Rights Reserved

• Load data

• Modify data

• Export data

• Share data

Page 18: WebGL Export - na-mic.org

National Alliance for Medical Image Computing http://www.na-mic.org

Export data

© 2011, All Rights Reserved

Open “WebGL Export” module

Work in Progress

Page 19: WebGL Export - na-mic.org

National Alliance for Medical Image Computing http://www.na-mic.org

Export data

© 2011, All Rights Reserved

Select the output directory

Export to WebGL!

Page 20: WebGL Export - na-mic.org

National Alliance for Medical Image Computing http://www.na-mic.org

Export data

© 2011, All Rights Reserved

Your default web browser will opena WebGL visualization of the data

Your default web browser will opena WebGL visualization of the data

Et voila!Et voila!

Page 21: WebGL Export - na-mic.org

National Alliance for Medical Image Computing http://www.na-mic.org

Export data

© 2011, All Rights Reserved

Same models visibility

Same models color

Same models opacity

Same background color

Same camera orientation

Slicer 4.1 Firefox 12

Page 22: WebGL Export - na-mic.org

National Alliance for Medical Image Computing http://www.na-mic.org

Share data

© 2011, All Rights Reserved

• Load data

• Modify data

• Export data

• Share data

Page 23: WebGL Export - na-mic.org

National Alliance for Medical Image Computing http://www.na-mic.org

Share data

© 2011, All Rights Reserved

• Output directory structure

index.html

model3.vtk

model5.vtk

model6.vtk

model1.vtk model2.vtk

model4.vtk

...

.

.

. . . .

.

.

Page 24: WebGL Export - na-mic.org

National Alliance for Medical Image Computing http://www.na-mic.org

• public directory

• Host on your own web server

Share data

© 2011, All Rights Reserved

Page 25: WebGL Export - na-mic.org

National Alliance for Medical Image Computing http://www.na-mic.org

Conclusion

© 2011, All Rights Reserved

• Publishing your research to the web is EASY

• Many use cases including:

• Collaboration/Sharing data

• Publication/Grant Application

• Access your data from anywhere with your smart phone or tablet

• Visit http://goXTK.com for more informations

Page 26: WebGL Export - na-mic.org

National Alliance for Medical Image Computing http://www.na-mic.org

National Alliance for Medical Image Computing

NIH U54EB005149

Acknowledgments

© 2011, All Rights Reserved

Daniel Haehn, Rudolph Pienaar, Ellen GrantFetal-Neonatal Neuroimaging & Developmental Science Center,Boston Children's Hospital

Special thanks to Sonia Pujol

Steve Pieper, Ron Kikinis, Slicer developersSurgical Planning Laboratory,Brigham and Women's Hospital