Slicer Training 1 Loading and Viewing Data Sonia Pujol, Ph.D. Randy Gollub, M.D., Ph.D. Surgical Planning Laboratory -1- http://www.slicer.org Brigham and Women’s Hospital Acknowledgments National Alliance for Medical Image Computing NIH U54EB005149 Neuroimage Analysis Center NIH P41RR013218 Surgical Planning Laboratory -2- http://www.slicer.org 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 Laboratory -3- http://www.slicer.org Brigham and Women’s Hospital Welcome to 3D Slicer Surgical Planning Laboratory -4- http://www.slicer.org Brigham and Women’s Hospital Goal of the tutorial Guiding you step by step through the process of Loading and Viewing Data within Slicer Surgical Planning Laboratory -5- http://www.slicer.org Brigham and Women’s Hospital Material • Slicer 2.6 http://www.na-mic.org/Wiki/index.php/Slicer:Slicer2.6_Getting_Started • Sample Tutorial Data: tutorial-with-dicom.zip http://www.na-mic.org/Wiki/index.php/Slicer:Workshops:User_Training_101 Exercises Questions Surgical Planning Laboratory -6- http://www.slicer.org Answers Brigham and Women’s Hospital Goal of the tutorial Final result of the series of exercises Surgical Planning Laboratory -7- http://www.slicer.org Brigham and Women’s Hospital Overview • Part 1: Slicer Interface • Part 2: Loading Data • Part 3: Interacting with Data Surgical Planning Laboratory -8- http://www.slicer.org Brigham and Women’s Hospital Slicer Interface Menu Viewer Tk window Surgical Planning Laboratory -9- http://www.slicer.org Brigham and Women’s Hospital Slicer Menu Select the Volumes Module Surgical Planning Laboratory -10- http://www.slicer.org Brigham and Women’s Hospital Panels and Tabs The Panel of the Volumes Module appears Surgical Planning Laboratory -11- http://www.slicer.org Brigham and Women’s Hospital Slicer Menu Panels Sliders Buttons Control Window Surgical Planning Laboratory -12- http://www.slicer.org Brigham and Women’s Hospital Main Menu Observe the different options of the Main Menu •File –Opening files –Saving files –Closing files –Exit •View Selecting view mode Surgical Planning Laboratory -13- http://www.slicer.org •Modules Slicer Modules •Help Links to Slicer Modules information Brigham and Women’s Hospital Viewer window Observe the Viewer Window • Upper part is 3D Viewer • Lower part is 2D Viewer 3 separate views Independent controls Surgical Planning Laboratory -14- http://www.slicer.org Brigham and Women’s Hospital Slicer Modules The architecture of Slicer is modular Select Modules in the SubMenu Surgical Planning Laboratory -15- http://www.slicer.org Brigham and Women’s Hospital Slicer Modules Settings IO Application Filtering Segmentation Registration Measurement The list of Slicer Modules categories appears Visualization Examples Unfiled Alpha Surgical Planning Laboratory -16- http://www.slicer.org Brigham and Women’s Hospital Slicer Modules: tutorials Settings IO •fMRIEngine ………. SlicerTraining 5 Application •vtkFreeSurferReaders ... SlicerTraining 6 Filtering Segmentation •Editor …………….. SlicerTraining 2 Registration •Level-Sets ……….. SlicerTraining 3 Measurement Visualization •DTMRI ……………. SlicerTraining 4 Examples Unfiled Alpha Surgical Planning Laboratory -17- http://www.slicer.org 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 Laboratory -18- http://www.slicer.org Brigham and Women’s Hospital Overview • Part 1: Slicer Interface • Part 2: Loading Data • Part 3: Interacting with Data Surgical Planning Laboratory -19- http://www.slicer.org Brigham and Women’s Hospital Loading Data Slicer can load • Volumes ………………….. Surgical Planning Laboratory -20- http://www.slicer.org Brigham and Women’s Hospital Loading Data Slicer can load • Volumes ………………….. • Models ……………………. A model is a 3D reconstruction of the anatomy Surgical Planning Laboratory -21- http://www.slicer.org 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 Laboratory -22- http://www.slicer.org Brigham and Women’s Hospital Loading Data Slicer Advantage Putting together Images and Surface Surgical Planning Laboratory -23- http://www.slicer.org Brigham and Women’s Hospital Data representation Header Header Header Header Raw Data Raw Data Raw Data Raw Data Surgical Planning Laboratory -24- http://www.slicer.org • Volume = collection of image files • Image file = header + raw data The header contains the parameters of the image. Brigham and Women’s Hospital Data representation Header Header Header Header Raw Data Raw Data Raw Data Raw Data a The header contains the parameters of the image. Pixel (a,b) b Intensity I (a,b) Surgical Planning Laboratory -25- • Volume = collection of image files • Image file = header + raw data http://www.slicer.org • Representation of an image: 2D Array of pixels containing the intensity values Brigham and Women’s Hospital Loading DICOM Volumes Click on Add Volume in the Slicer Menu Surgical Planning Laboratory -26- http://www.slicer.org Brigham and Women’s Hospital Loading DICOM Volumes The Panel Props appears by default. Left-click on the Menu Properties and change Basic to DICOM Surgical Planning Laboratory -27- http://www.slicer.org Brigham and Women’s Hospital Loading DICOM Volumes The DICOM panel appears Click on Select DICOM Volume Surgical Planning Laboratory -28- http://www.slicer.org Brigham and Women’s Hospital Loading DICOM Volumes Select the directory dicom in the Tutorial-with-dicom dataset Surgical Planning Laboratory -29- http://www.slicer.org Brigham and Women’s Hospital Loading DICOM Volumes The list of DICOM studies appears. Click OK Surgical Planning Laboratory -30- http://www.slicer.org Brigham and Women’s Hospital Loading DICOM Volumes Slicer loads the dicom study Name : The name that the volume will have within Slicer Change to something descriptive: Cortex and click on Header Surgical Planning Laboratory -31- http://www.slicer.org Brigham and Women’s Hospital Loading DICOM Volumes The DICOM Header information panel appears Click Apply Surgical Planning Laboratory -32- http://www.slicer.org Brigham and Women’s Hospital Loading DICOM Volumes Slicer loads the DICOM volume of the brain Surgical Planning Laboratory -33- http://www.slicer.org 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 Surgical Planning Laboratory -34- http://www.slicer.org Brigham and Women’s Hospital Visualization Support The value of the gray level of the pixel under the cursor appears in the corresponding slice Surgical Planning Laboratory -35- http://www.slicer.org Brigham and Women’s Hospital Viewing Volumes V 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 Laboratory -36- http://www.slicer.org Brigham and Women’s Hospital Viewing Volumes The Axial, Sagittal and Coronal Images appear in the Viewer Surgical Planning Laboratory -37- http://www.slicer.org Brigham and Women’s Hospital Manipulating the images • Rotation Position the mouse on the images inside the Viewer Left-click and move the mouse to the left The images move to the left Surgical Planning Laboratory -38- http://www.slicer.org Brigham and Women’s Hospital Manipulating the images • Zoom Position the mouse on the images inside the Viewer Right-click and move the mouse down The viewer gets closer to the model Surgical Planning Laboratory -39- http://www.slicer.org Brigham and Women’s Hospital Manipulating the images • Zoom Position the mouse on the images inside the Viewer Right-click and move the mouse up The viewer moves away from the model Surgical Planning Laboratory -40- http://www.slicer.org Brigham and Women’s Hospital Viewing Volumes The View Menu contains different options to visualize the data Select the 3D View Surgical Planning Laboratory -41- http://www.slicer.org Brigham and Women’s Hospital Viewing Volumes 3D View focuses on 3D Surgical Planning Laboratory -42- http://www.slicer.org Brigham and Women’s Hospital Viewing Volumes The View Menu contains different options to visualize the data Select 4x512 Surgical Planning Laboratory -43- http://www.slicer.org Brigham and Women’s Hospital Viewing Volumes 4x512 view: larger image views to see details Surgical Planning Laboratory -44- http://www.slicer.org Brigham and Women’s Hospital Viewing Volumes The View Menu contains different options to visualize the data Select 1x512 Surgical Planning Laboratory -45- http://www.slicer.org Brigham and Women’s Hospital Viewing Volumes 1x512: one large TRANSVERSE view and three small images 1x512 COR: one large CORONAL view and three small images 1x512 SAG: one large SAGITTAL view and three small images Surgical Planning Laboratory -46- http://www.slicer.org Brigham and Women’s Hospital Viewing Volumes The View Menu contains different options to visualize the data Select 4x256 Surgical Planning Laboratory -47- http://www.slicer.org Brigham and Women’s Hospital Viewing Volumes 4x256 view: smaller equalsized images Come back to Normal View Surgical Planning Laboratory -48- http://www.slicer.org Brigham and Women’s Hospital 2D Viewer 2 3 1 1• Three 2D windows (red, yellow, and green) 2• Slider selects which slice of volume to display 3• Field shows the slice number Surgical Planning Laboratory -49- http://www.slicer.org Brigham and Women’s Hospital 2D Viewer 4 5 4• Bg (Background): displays volume in background layer 5• Fg (Foreground): displays volume in foreground layer Superimposed over the background layer Surgical Planning Laboratory -50- http://www.slicer.org 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 Surgical Planning Laboratory -51- http://www.slicer.org 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 Laboratory -52- http://www.slicer.org Brigham and Women’s Hospital Volumes without Header 1. Main Data 2. Add Volume 3. Browse to find the first image of the Volume spgr in the directory tutorial 4. Select first image I.001 of volume to load, and click Open 5. Click on Manual 6. Click on Apply Surgical Planning Laboratory -53- http://www.slicer.org Brigham and Women’s Hospital Volumes without Header The Header section of the Props tab appears. 1 File Pattern: Pattern of file names, in C syntax. Example: a file named skin.001 has a pattern of %s.%03d. 2 Image Size: Number of pixels of image in x and y directions. Surgical Planning Laboratory -54- http://www.slicer.org Brigham and Women’s Hospital Volumes without Header 3 4 6 3 5 7 Pixel Size in the x and y directions. 4 Slice Thickness z dimension of the voxel. 5 Scan Order: • LR = left to right • IS = inferior to superior • PA = posterior to anterior 6 Scalar Type: Data format of the pixel. Generally, it is Short (16 bit integer). 7 Slice Tilt: The tilt of the gantry during an MRI. Surgical Planning Laboratory -55- http://www.slicer.org Brigham and Women’s Hospital Volumes without Header 8 Num Scalars: Number of scalar components for each voxel. Gray-scale data: 1. Color data: 3. 9 Little Endian: 8 9 10 Click Apply to load the volume. Surgical Planning Laboratory -56- http://www.slicer.org 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. 10 DTI data, Swap, No Swap: Placeholders for future. Brigham and Women’s Hospital Volumes without Header The spgr volume appears in the Viewer Surgical Planning Laboratory -57- http://www.slicer.org 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 Laboratory -58- http://www.slicer.org Brigham and Women’s Hospital Loading Models In the main Menu select the module Data and Click on Add Model. Surgical Planning Laboratory -59- http://www.slicer.org Brigham and Women’s Hospital Loading Models The Props tab of the module Models appears Select the model named Vessels in the directory tutorial/models Click on Apply Surgical Planning Laboratory -60- http://www.slicer.org Brigham and Women’s Hospital Loading Models The model of the vessels appears in the Viewer. Surgical Planning Laboratory -61- http://www.slicer.org 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 Laboratory -62- http://www.slicer.org Brigham and Women’s Hospital Loading a Scene A Scene is represented as an Xml file. •Select File Open Scene in the Main Menu •Select the file tutorial.xml in the directory Tutorial-with-dicom/tutorial. Surgical Planning Laboratory -63- http://www.slicer.org Brigham and Women’s Hospital Loading a Scene The viewer displays the tutorial Scene Surgical Planning Laboratory -64- http://www.slicer.org Brigham and Women’s Hospital Loading a Scene The elements of the Scene are listed in the Menu Window Surgical Planning Laboratory -65- http://www.slicer.org Brigham and Women’s Hospital Overview • Part 1: Slicer Interface • Part 2: Loading Data • Part 3: Interacting with Data Surgical Planning Laboratory -66- http://www.slicer.org 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 Laboratory -67- http://www.slicer.org Brigham and Women’s Hospital Manipulating a Model Put the mouse on the 3D Slicer icon Surgical Planning Laboratory -68- http://www.slicer.org Brigham and Women’s Hospital Manipulating a Model The Control Window appears Surgical Planning Laboratory -69- http://www.slicer.org Brigham and Women’s Hospital Manipulating a Model Position the mouse on the R letter (Right) inside the window Surgical Planning Laboratory -70- http://www.slicer.org Brigham and Women’s Hospital Manipulating a Model The View Panel shows the model from the right side of the patient Surgical Planning Laboratory -71- http://www.slicer.org Brigham and Women’s Hospital Manipulating a Model Click on the Spin button Surgical Planning Laboratory -72- http://www.slicer.org Brigham and Women’s Hospital Manipulating a Model The model starts spinning inside the Viewer Panel. Surgical Planning Laboratory -73- http://www.slicer.org Brigham and Women’s Hospital Manipulating a Model Click on the Rock button Surgical Planning Laboratory -74- http://www.slicer.org Brigham and Women’s Hospital Manipulating a Model The model starts rocking inside the Viewer Panel. Surgical Planning Laboratory -75- http://www.slicer.org 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 Laboratory -76- http://www.slicer.org 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 Laboratory -77- http://www.slicer.org 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 Laboratory -78- http://www.slicer.org Brigham and Women’s Hospital Model Opacity 1. Click on Models in the Main Menu 2. Select the Display Tab The properties Panel of the model appears 3. Opacity Set the opacity of the Skin model to 0.5 Surgical Planning Laboratory -79- http://www.slicer.org Brigham and Women’s Hospital Model Opacity Skin model Opacity = 0.5 Surgical Planning Laboratory -80- http://www.slicer.org Brigham and Women’s Hospital Model Visibility Visibility 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 Laboratory -81- http://www.slicer.org Brigham and Women’s Hospital Model Visibility Vessels model Visibility 0ff Surgical Planning Laboratory -82- http://www.slicer.org 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 Laboratory -83- http://www.slicer.org Brigham and Women’s Hospital Viewing 3D Models Show None: the models have disappeared Surgical Planning Laboratory -84- http://www.slicer.org 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 None Surgical Planning Laboratory -85- http://www.slicer.org Brigham and Women’s Hospital 2D Viewer Lb: displays label map Displays results of a segmentation The segmented volume named all disappears from the 2D Viewer. Surgical Planning Laboratory -86- http://www.slicer.org 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. Surgical Planning Laboratory -87- http://www.slicer.org Brigham and Women’s Hospital 2D Viewer Lb: displays label map Displays results of a segmentation The segmented volume named all appears in the 2D Viewer. Surgical Planning Laboratory -88- http://www.slicer.org Brigham and Women’s Hospital 2D Viewer Images in the label map layer appear as outlines around the structures that were segmented. Surgical Planning Laboratory -89- http://www.slicer.org Brigham and Women’s Hospital 2D Viewer Left Click on Fg in the Axial View and select the Volume named all in the Axial, Sagittal and Coronal slices. Surgical Planning Laboratory -90- http://www.slicer.org Brigham and Women’s Hospital Image Fusion •Fade slider: fades between foreground and background. Set the Fade slider to 0.5 Surgical Planning Laboratory -91- http://www.slicer.org Brigham and Women’s Hospital 2D Viewer The volume all is superimposed on the images Surgical Planning Laboratory -92- http://www.slicer.org 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. Select the Models Display tab Surgical Planning Laboratory -93- http://www.slicer.org Brigham and Women’s Hospital Clipping Models 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. Check that the Clipping option is selected. 4. Set the opacity of the Skin model to 1.0. 5. Select the Clip tab of the Models panel. Surgical Planning Laboratory -94- http://www.slicer.org 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 Laboratory -95- http://www.slicer.org Brigham and Women’s Hospital Clipping Models Clipping Model Result Surgical Planning Laboratory -96- http://www.slicer.org 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 Surgical Planning Laboratory -97- http://www.slicer.org Brigham and Women’s Hospital