Surgical Planning Laboratoryhttp://www.slicer.org-1-
Brigham and Women’s Hospital
Slicer Training 1 Loading and Viewing Data
Sonia Pujol, Ph.D.
Randy Gollub, M.D., Ph.D.
Surgical Planning Laboratoryhttp://www.slicer.org-2-
Brigham and Women’s Hospital
Acknowledgments
National Alliance for Medical Imaging
NIH U54EB005149
Neuroimage Analysis Center NIH P41RR013218
Surgical Planning Laboratoryhttp://www.slicer.org-3-
Brigham and Women’s Hospital
Disclaimer
It is the responsibility of the user of 3DSlicer
to comply with both the terms of the license
and with the applicable laws, regulations
and rules.
Surgical Planning Laboratoryhttp://www.slicer.org-4-
Brigham and Women’s Hospital
Welcome to 3D Slicer
Surgical Planning Laboratoryhttp://www.slicer.org-5-
Brigham and Women’s Hospital
Goal of this tutorial
Guiding you step by step through the process of Loading and Viewing Data within Slicer
Surgical Planning Laboratoryhttp://www.slicer.org-6-
Brigham and Women’s Hospital
Material
• Slicer2.5: https://share.spl.harvard.edu/share/birn/public/software/slicer2.5/slicer2.5-opt-win32-2005-05-23.zip
• Tutorial Data: tutorial-with-dicom.zip
Questions Answers
35 Exercises
Surgical Planning Laboratoryhttp://www.slicer.org-7-
Brigham and Women’s Hospital
Goal of the tutorial
Final result of the series of exercises
Surgical Planning Laboratoryhttp://www.slicer.org-8-
Brigham and Women’s Hospital
Overview of Training 1
• Part 1: Slicer Interface
• Part 2: Loading Data
• Part 3: Interacting with Data
Surgical Planning Laboratoryhttp://www.slicer.org-9-
Brigham and Women’s Hospital
Slicer Interface
Viewer
Menu
Tk window
Surgical Planning Laboratoryhttp://www.slicer.org-10-
Brigham and Women’s Hospital
Slicer Menu
Main Menu
Panels
Sliders
Buttons
Select the Volumes Module
Control Window
Surgical Planning Laboratoryhttp://www.slicer.org-11-
Brigham and Women’s Hospital
Panels and Tabs
• Each panel has tabs along the top
• Leftmost tab is Help• Panel may contain
controls and displays
The Panel of the Volumes Module
appears
Surgical Planning Laboratoryhttp://www.slicer.org-12-
Brigham and Women’s Hospital
Slicer Modules
• The architecture of Slicer is modular
Select Modules in the SubMenu
Surgical Planning Laboratoryhttp://www.slicer.org-13-
Brigham and Women’s Hospital
Slicer Modules
The list of Slicer Modules appears
Settings
IO
Application
Filtering
Segmentation
Registration
Measurement
Visualization
Examples
Unfield
Alpha
Surgical Planning Laboratoryhttp://www.slicer.org-14-
Brigham and Women’s Hospital
Slicer Modules: tutorialsSettings
IO
Application
Filtering
Segmentation
Registration
Measurement
Visualization
Examples
Unfiled
Alpha
•fMRIEngine ………. SlicerTraining 5
•Editor …………….. SlicerTraining 2
•Level-Sets ……….. SlicerTraining 3
•DTMRI ……………. SlicerTraining 4
Surgical Planning Laboratoryhttp://www.slicer.org-15-
Brigham and Women’s Hospital
Submenus
• HelpLinks to Slicer information
•File–Opening files–Saving files–Close–Exit
•ViewSelecting view mode
•ModulesSlicer Modules
Observe the different options of the Main Menu
Surgical Planning Laboratoryhttp://www.slicer.org-16-
Brigham and Women’s Hospital
Viewer window
• Upper part is 3D Viewer
• Lower part is 2D Viewer– 3 separate views– Independent controls
Observe the Viewer Window
Surgical Planning Laboratoryhttp://www.slicer.org-17-
Brigham and Women’s Hospital
Exercise 1: Slicer GUI
• Launch Slicer.– Observe Main window and Viewer window.
• Click File, View, Help, and Modules– Examine submenus
• Click Main Menu buttons: Data, Volumes, Models, Alignments, Editor, and ModelMaker– Click tabs– Examine panels
• Click More– Click modules: click tabs, examine panels
Surgical Planning Laboratoryhttp://www.slicer.org-18-
Brigham and Women’s Hospital
Overview of Training 1
• Part 1: Slicer Interface
• Part 2: Loading Data
• Part 3: Interacting with Data
Surgical Planning Laboratoryhttp://www.slicer.org-19-
Brigham and Women’s Hospital
Loading Data
Slicer can load
• Volumes …………………..
• Models …………………….A model is a 3D reconstruction of the anatomy
• Scenes …………………….Scene = Volume + Model
Surgical Planning Laboratoryhttp://www.slicer.org-20-
Brigham and Women’s Hospital
Loading Data
Slicer Power
Putting together Images and Surface
Surgical Planning Laboratoryhttp://www.slicer.org-21-
Brigham and Women’s Hospital
Loading Data
Slicer can load
• Volumes …………………..
• Models …………………….A model is a 3D reconstruction of the anatomy
• Scenes …………………….Scene = Volume + Model
Surgical Planning Laboratoryhttp://www.slicer.org-22-
Brigham and Women’s Hospital
Data representation
• Volume = collection of Image files• Image file = header + raw dataThe header contains the parameters of the image.
• Representation of an image:
2D Array of pixels containing the intensity values
Header
Raw Data
Header
Raw Data
Header
Raw Data
Header
Raw Data
Pixel (a,b)
Intensity
I (a,b)
a
b
Surgical Planning Laboratoryhttp://www.slicer.org-23-
Brigham and Women’s Hospital
Loading Volumes: Overview1. Main Data
2. Add VolumeProps tab of Volumes
panel appears
3. Browse to find the first image
4. Select first image of volume to load, and click Open
The number of the last image automatically appears
5. Apply
Surgical Planning Laboratoryhttp://www.slicer.org-24-
Brigham and Women’s Hospital
1. Main Data Add Volume Props
2. From Properties Change Basic DICOM
DICOM Volumes
Surgical Planning Laboratoryhttp://www.slicer.org-25-
Brigham and Women’s Hospital
3. Select DICOM Volume
A dialog box appears
4. Select directory and click OK
DICOM Volumes
A DICOM panel appears
Slicer searches for every DICOM file.
Surgical Planning Laboratoryhttp://www.slicer.org-26-
Brigham and Women’s Hospital
DICOM Volumes
• Name The name that the volume will have within Slicer
• Optional Description You may enter a description.
5. Change to something descriptive: “Cortex“
6. Click Header
Surgical Planning Laboratoryhttp://www.slicer.org-27-
Brigham and Women’s Hospital
Loading DICOM Volumes
The DICOM Header information panel appears
…Slicer loads the data
7. Click Apply
Surgical Planning Laboratoryhttp://www.slicer.org-28-
Brigham and Women’s Hospital
Visualization Support• Control Window: displays a zoomed view of
the position of the mouse on the selected image
Move the mouse inside an anatomical view
The value of the gray level of the pixel under the cursor appears in the corresponding slice
Surgical Planning Laboratoryhttp://www.slicer.org-29-
Brigham and Women’s Hospital
Viewing VolumesV toggle button controls
whether slice is visible in 3D Viewer
Click on the three V buttons to display the
Axial, Sagittal and Coronal images inside the Viewer
Surgical Planning Laboratoryhttp://www.slicer.org-30-
Brigham and Women’s Hospital
Viewing Volumes
The Axial, Sagittal and Coronal Images appear in the Viewer
Surgical Planning Laboratoryhttp://www.slicer.org-31-
Brigham and Women’s Hospital
Manipulating the images
Position the mouse on the images inside the Viewer
Left-click and move the mouse to the left
• Rotation
The images move to the left
Surgical Planning Laboratoryhttp://www.slicer.org-32-
Brigham and Women’s Hospital
Manipulating the images
Position the mouse on the images inside the Viewer
Right-click and move the mouse down
The viewer gets closer to the model
• Zoom
Surgical Planning Laboratoryhttp://www.slicer.org-33-
Brigham and Women’s Hospital
Manipulating the images
Position the mouse on the images inside the Viewer
Right-click and move the mouse up
The viewer moves away from the model
• Zoom
Surgical Planning Laboratoryhttp://www.slicer.org-34-
Brigham and Women’s Hospital
Viewing Volumes
Select the 3D View
The View Menu contains
different options to visualize the data
Surgical Planning Laboratoryhttp://www.slicer.org-35-
Brigham and Women’s Hospital
Viewing Volumes
3D Viewfocuses on 3D
Surgical Planning Laboratoryhttp://www.slicer.org-36-
Brigham and Women’s Hospital
Viewing Volumes
Select 4x512
The View Menu contains
different options to visualize the data
Surgical Planning Laboratoryhttp://www.slicer.org-37-
Brigham and Women’s Hospital
Viewing Volumes
4x512 view: larger image views to see details
Surgical Planning Laboratoryhttp://www.slicer.org-38-
Brigham and Women’s Hospital
Viewing Volumes (1 of 5)
Select 1x512
The View Menu contains
different options to visualize the data
Surgical Planning Laboratoryhttp://www.slicer.org-39-
Brigham and Women’s Hospital
Viewing Volumes
1x512 view: one large, three
small images
Surgical Planning Laboratoryhttp://www.slicer.org-40-
Brigham and Women’s Hospital
Viewing Volumes
The View Menu contains different options to visualize the data
Select 4x256
Surgical Planning Laboratoryhttp://www.slicer.org-41-
Brigham and Women’s Hospital
Viewing Volumes
4x256 view: smaller equal-sized images
Come back to Normal View
Surgical Planning Laboratoryhttp://www.slicer.org-42-
Brigham and Women’s Hospital
2D Viewer
• Three 2D windows (red, yellow, and green)Both grayscale and label map images in windows
• Slider selects which slice of volume to display • Field shows the slice number
1
2
1
2
3
3
Surgical Planning Laboratoryhttp://www.slicer.org-43-
Brigham and Women’s Hospital
Superimpose
• Bg (Background): displays volume in background layer • Fg (Foreground): displays volume in foreground layer
Superimposed over the background layer
4
5
4
5
Surgical Planning Laboratoryhttp://www.slicer.org-44-
Brigham and Women’s Hospital
2D Viewer
• Lb: displays label map
Displays results of a segmentation
Left click on Lb in the Axial View and select the Label Map named all
6
6
Surgical Planning Laboratoryhttp://www.slicer.org-45-
Brigham and Women’s Hospital
2D Viewer
Images in the label map layer appear as outlines around the structures that were segmented.
Surgical Planning Laboratoryhttp://www.slicer.org-46-
Brigham and Women’s Hospital
2D Viewer
Left Click on Fg in the Axial View and select the Volume named all
Surgical Planning Laboratoryhttp://www.slicer.org-47-
Brigham and Women’s Hospital
Volumes without Header
Motivations:• The DICOM file format incorporates all
the parameters that Slicer requires to render the data
• Other images files types may not
Slicer has a simple protocol for loading volumes without header
Surgical Planning Laboratoryhttp://www.slicer.org-48-
Brigham and Women’s Hospital
Volumes without Header1. Main Data
2. Add Volume
3. Browse to find the first image of the Volume spgr
4. Select first image I.001 of volume to load, and click Open
5. Click on Manual
6. Click on Apply
Surgical Planning Laboratoryhttp://www.slicer.org-49-
Brigham and Women’s Hospital
Volumes without Header• Preview
– small icon-size images in bottom panel (default size is 32x32 pixels)
• List Headers– displays header information
• Check- displays information about
how to group the data- helps to show when slices are
missing- useful when several DICOM
acquisitions are lumped together.
Click OK
Surgical Planning Laboratoryhttp://www.slicer.org-50-
Brigham and Women’s Hospital
File Pattern: Pattern of file names, in C syntax.
Example: a file named skin.001 has a pattern of %s.%03d.
Image Size: Number of pixels of image in x and y directions.
Volumes without Header
2
1
The Header section of the Props tab appears.
Surgical Planning Laboratoryhttp://www.slicer.org-51-
Brigham and Women’s Hospital
Volumes without Header
Pixel Size in the x and y directions. Slice Thickness z dimension of the voxel. Scan Order:
• LR = left to right • IS = inferior to superior • PA = posterior to anterior
Scalar Type: Data format of the pixel. Generally, it is Short (16 bit integer). Slice Tilt: The tilt of the gantry during an MRI.
34
56
7
3
4
5
6
7
Surgical Planning Laboratoryhttp://www.slicer.org-52-
Brigham and Women’s Hospital
Num Scalars:
Number of scalar components for each voxel. Gray-scale data: 1. Color data: 3.
Little Endian:
In little-endian architectures, the rightmost bytes are most significant. In big-endian architectures (Slicer default), the leftmost bytes (those with a lower address) are most significant.
DTI data, Swap, No Swap: Placeholders for future.
8
9
10
8
9
10
Click Apply to load the volume.
Volumes without Header
Surgical Planning Laboratoryhttp://www.slicer.org-53-
Brigham and Women’s Hospital
Volumes without Header
The spgr volume appears in the
Viewer
Surgical Planning Laboratoryhttp://www.slicer.org-54-
Brigham and Women’s Hospital
Loading Data
Slicer can load
• Volumes …………………..
• Models …………………….A model is a 3D reconstruction of the anatomy
• Scenes …………………….Scene = Volume + Model
Surgical Planning Laboratoryhttp://www.slicer.org-55-
Brigham and Women’s Hospital
Loading Models
1. Main Data Add ModelProps tab appears
2. Browse
3. Name field
4. Color pull-down menu
5. Click Apply to read in the model.
In dialog box, select the model named Vessels and click Open.
Make descriptive: Vessels
Select color for the 3D Viewer
Surgical Planning Laboratoryhttp://www.slicer.org-56-
Brigham and Women’s Hospital
Loading Models
The model of the vessels appears in
the Viewer.
Surgical Planning Laboratoryhttp://www.slicer.org-57-
Brigham and Women’s Hospital
Loading Data
Slicer can load
• Volumes …………………..
• Models …………………….A model is a 3D reconstruction of the anatomy
• Scenes …………………….Scene = Volume + Model
Surgical Planning Laboratoryhttp://www.slicer.org-58-
Brigham and Women’s Hospital
Loading a Scene
• File Open Scene.• Find the file tutorial.xml • Double-click it, • Wait for the volumes and models to load.
• A Scene is represented as an Xml file
Surgical Planning Laboratoryhttp://www.slicer.org-59-
Brigham and Women’s Hospital
Loading a Scene
The viewer displays the
tutorial Scene
Surgical Planning Laboratoryhttp://www.slicer.org-60-
Brigham and Women’s Hospital
Models representation
• A model is a 3D representation of the anatomy.
Type W (Wireframe) in the Main Window
Surgical Planning Laboratoryhttp://www.slicer.org-61-
Brigham and Women’s Hospital
Models representation
The triangles of the Model become visible in the Viewer.
Type S (Surface) to come back to Surface Mode rendering
Surgical Planning Laboratoryhttp://www.slicer.org-62-
Brigham and Women’s Hospital
Overview of Training 1
• Part 1: Slicer Interface
• Part 2: Loading Data
• Part 3: Interacting with Data
Surgical Planning Laboratoryhttp://www.slicer.org-63-
Brigham and Women’s Hospital
Manipulating a Model
The model appears in the
3D Viewer.
•Rotate the model: with left mouse button •Zoom the model: with right mouse button
Surgical Planning Laboratoryhttp://www.slicer.org-64-
Brigham and Women’s Hospital
Manipulating a Model
Put the mouse on the 3D Slicer icon
Surgical Planning Laboratoryhttp://www.slicer.org-65-
Brigham and Women’s Hospital
Manipulating a Model
The Control Window appears
Surgical Planning Laboratoryhttp://www.slicer.org-66-
Brigham and Women’s Hospital
Manipulating a Model
Position the mouse on the R letter
(Right) inside the window
Surgical Planning Laboratoryhttp://www.slicer.org-67-
Brigham and Women’s Hospital
Manipulating a Model
The View Panel shows the model
from the right side of the patient
Surgical Planning Laboratoryhttp://www.slicer.org-68-
Brigham and Women’s Hospital
Manipulating a Model
Click on the Spin button
Surgical Planning Laboratoryhttp://www.slicer.org-69-
Brigham and Women’s Hospital
Manipulating a Model
The model starts spinning inside the
Viewer Panel.
Surgical Planning Laboratoryhttp://www.slicer.org-70-
Brigham and Women’s Hospital
Manipulating a Model
Click on the Rock button
Surgical Planning Laboratoryhttp://www.slicer.org-71-
Brigham and Women’s Hospital
Manipulating a Model
The model starts rocking inside the
Viewer Panel.
Surgical Planning Laboratoryhttp://www.slicer.org-72-
Brigham and Women’s Hospital
Manipulating a Model
Come back to initial orientation of the Viewer Panel by clicking on the A letter (Anterior) inside the window.
Surgical Planning Laboratoryhttp://www.slicer.org-73-
Brigham and Women’s Hospital
Model Opacity1. Click on Models in the
Main Menu
2. Select the Display Tab
The properties Panel of the model appears
3. OpacitySet the opacity of the Skin model to 0.5
Surgical Planning Laboratoryhttp://www.slicer.org-74-
Brigham and Women’s Hospital
Model Opacity
Skin model
Opacity = 0.5
Surgical Planning Laboratoryhttp://www.slicer.org-75-
Brigham and Women’s Hospital
Model VisibilityVisibility on and off by
left clicking on the name of model in the list
Left Click on the Vessels Button in the list of models
Surgical Planning Laboratoryhttp://www.slicer.org-76-
Brigham and Women’s Hospital
Model Visibility
Vessels model Visibility 0ff
Surgical Planning Laboratoryhttp://www.slicer.org-77-
Brigham and Women’s Hospital
Global Visibility
• Show All to display all models in the 3D Viewer
Click Show None to display none of the models in the 3D Viewer
Surgical Planning Laboratoryhttp://www.slicer.org-78-
Brigham and Women’s Hospital
Viewing 3D Models
Show None Models have disappeared
Surgical Planning Laboratoryhttp://www.slicer.org-79-
Brigham and Women’s Hospital
2D Viewer
Left Click on Fg in the Axial View and select the Volume named all
Surgical Planning Laboratoryhttp://www.slicer.org-80-
Brigham and Women’s Hospital
2D Viewer
The volume all is superimposed on the images
Surgical Planning Laboratoryhttp://www.slicer.org-81-
Brigham and Women’s Hospital
Image Fusion
•Fade slider:
fades between foreground
and background.
Set the Fade slider to 0.5
Surgical Planning Laboratoryhttp://www.slicer.org-82-
Brigham and Women’s Hospital
2D Viewer
Fade slider effect
Surgical Planning Laboratoryhttp://www.slicer.org-83-
Brigham and Women’s Hospital
Clipping Models• Clipping: cutting away sections of a
model at one or more selected slices.
• The model is removed from one side of each selected slice, revealing the image of each selected slice and the rest of the visible model.
• Models Display tab
Surgical Planning Laboratoryhttp://www.slicer.org-84-
Brigham and Women’s Hospital
1. Click on Show all to make all the models visible 2. Right-click the Skin model in the list.
A drop-down menu appears.3. Select Clipping.4. Select the Clip tab of the Models panel
Clipping Models
Surgical Planning Laboratoryhttp://www.slicer.org-85-
Brigham and Women’s Hospital
Clipping Models
Click + or - to select which side of each slice to clip on.
Set the sides to: Red Slice +Yellow Slice –Green Slice -
Surgical Planning Laboratoryhttp://www.slicer.org-86-
Brigham and Women’s Hospital
Clipping Models
Clipping Model Result
Surgical Planning Laboratoryhttp://www.slicer.org-87-
Brigham and Women’s Hospital
Conclusion
• Intuitive Interface for Loading and Visualizing Data
• Slicer Outcome = fusion of Volumes and Surface
• Open-source tool for developing your own module