Upload
leslie-green
View
222
Download
0
Tags:
Embed Size (px)
Citation preview
Surgical Planning Laboratoryhttp://www.slicer.org-1-
Brigham and Women’s Hospital
Slicer Tutorial 7Saving 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 Image ComputingNIH 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
Material
Questions Answers
Exercises
• Slicer 2.6http://www.na-mic.org/Wiki/index.php/Slicer:Slicer2.6_Getting_Started
• Sample Tutorial Data: tutorial-with-dicom.ziphttp://www.na-mic.org/Wiki/index.php/Slicer:Workshops:User_Training_101
Surgical Planning Laboratoryhttp://www.slicer.org-5-
Brigham and Women’s Hospital
Goal of this tutorial
Guide you step-by-step through the process of saving data within Slicer.
Surgical Planning Laboratoryhttp://www.slicer.org-6-
Brigham and Women’s Hospital
Saving Data
Slicer can save
• Volumes ………………….
Surgical Planning Laboratoryhttp://www.slicer.org-7-
Brigham and Women’s Hospital
Saving Data
Slicer can save
• Volumes ………………….
• Models ………………………………..
Surgical Planning Laboratoryhttp://www.slicer.org-8-
Brigham and Women’s Hospital
Saving Data
Slicer can save
• Volumes ………………….
• Models ………………………………..
• Scenes ………………………………....
Surgical Planning Laboratoryhttp://www.slicer.org-9-
Brigham and Women’s Hospital
Scene
•A Scene in 3DSlicer can be composed of several volumes, fiducials and 3D models.
•It is represented by an .xml file written inMedical Reality Modeling Language (MRML), thatlists the elements of the Scene and their attributes.
•Several views of the same Scene can be saved in 3DSlicer.
Surgical Planning Laboratoryhttp://www.slicer.org-10-
Brigham and Women’s Hospital
Tutorial 7: Overview
• Part 1: Loading a Scene
• Part 2: Saving Volumes
• Part 3: Saving Models
• Part 4: Saving Scenes
• Part 5: Saving Images of a Scene
Surgical Planning Laboratoryhttp://www.slicer.org-11-
Brigham and Women’s Hospital
Loading a Scene
Select FileOpenScene in the Main Menu.
Load the file tutorial.xml in the directory
Tutorial-with-dicom/tutorial
Surgical Planning Laboratoryhttp://www.slicer.org-12-
Brigham and Women’s Hospital
Loading a Scene
Slicer loads the scene tutorial in the Viewer.
Surgical Planning Laboratoryhttp://www.slicer.org-13-
Brigham and Women’s Hospital
Loading a Scene
The Scene tutorial.xml is composed of
-a gray levels volume: SPGR
Surgical Planning Laboratoryhttp://www.slicer.org-14-
Brigham and Women’s Hospital
Loading a Scene
The Scene tutorial.xml is composed of
-a gray levels volume: SPGR
-a segmented volume: all
Surgical Planning Laboratoryhttp://www.slicer.org-15-
Brigham and Women’s Hospital
Loading a Scene
The Scene tutorial.xml is composed of
-a gray levels volume: SPGR
-a segmented volume: all
-three models: Skin, Ventricles, Vessels
Surgical Planning Laboratoryhttp://www.slicer.org-16-
Brigham and Women’s Hospital
Tutorial 7: Overview
• Part 1: Loading a Scene
• Part 2: Saving Volumes
• Part 3: Saving Models
• Part 4: Saving Scenes
• Part 5: Saving Saving Images of a Scene
Surgical Planning Laboratoryhttp://www.slicer.org-17-
Brigham and Women’s Hospital
Saving VolumesSelect the module Editor in the Main Menu
Click on the button Save
Select the Panel Volumes in the Editor Menu
Surgical Planning Laboratoryhttp://www.slicer.org-18-
Brigham and Women’s Hospital
Saving Volumes
Left-click on the Volume to Save button and select the volume all
Click on the button Save
Enter the Filename Prefix SavedLabelmap
Surgical Planning Laboratoryhttp://www.slicer.org-19-
Brigham and Women’s Hospital
Saving Volumes
Select the directory Tutorial_with_dicom/tutorial/labelsto save the existing labelmap with the new name SavedLabelMap.
Click on Save
Surgical Planning Laboratoryhttp://www.slicer.org-20-
Brigham and Women’s Hospital
Saving VolumesA message warns the user that the volume should not be saved, because it has not been changed since the last time it was saved.
Click on Yes to save the volume with the new name
Surgical Planning Laboratoryhttp://www.slicer.org-21-
Brigham and Women’s Hospital
Saving Volumes
Slicer writes the labelmap volume SavedLabelmap on the disk, and generates a MRML file SavedLabelmap.xml.
Surgical Planning Laboratoryhttp://www.slicer.org-22-
Brigham and Women’s Hospital
Tutorial 7: Overview
• Part 1: Loading a Scene
• Part 2: Saving Volumes
• Part 3: Saving Models
• Part 4: Saving Scenes
• Part 5: Saving Images of the Scene
Surgical Planning Laboratoryhttp://www.slicer.org-23-
Brigham and Women’s Hospital
Saving Models
Select the module ModelMaker in the Main Menu
Select the tab Save in the module ModelMaker
Surgical Planning Laboratoryhttp://www.slicer.org-24-
Brigham and Women’s Hospital
Saving Models
Select the model Vessels as the Active Model to be saved
Enter the new name SavedVessels
Click on the button Save
Surgical Planning Laboratoryhttp://www.slicer.org-25-
Brigham and Women’s Hospital
Saving Models
Save the model SavedVessels in the directory Tutorial_with_dicom/tutorial/models
Surgical Planning Laboratoryhttp://www.slicer.org-26-
Brigham and Women’s Hospital
Saving ModelsA message warns the user that the Model has not been changed since the last time it was saved.
Click on OK to save the model with the new name.
Surgical Planning Laboratoryhttp://www.slicer.org-27-
Brigham and Women’s Hospital
Saving Models
Slicer writes the file SavedVessels.vtk in the directory Tutorial_with_dicom/tutorial/models
Surgical Planning Laboratoryhttp://www.slicer.org-28-
Brigham and Women’s Hospital
Tutorial 7: Overview
• Part 1: Loading a Scene
• Part 2: Saving Volumes
• Part 3: Saving Models
• Part 4: Saving Scenes
• Part 5: Saving Images of the Scene
Surgical Planning Laboratoryhttp://www.slicer.org-29-
Brigham and Women’s Hospital
Saving a Scene
•A scene in Slicer can be composed of several volumes and several models.
Surgical Planning Laboratoryhttp://www.slicer.org-30-
Brigham and Women’s Hospital
Saving a Scene
•A scene in Slicer can be composed of several volumes and several models.
•All the volumes and all the models have to be saved separately before saving a Scene.
Surgical Planning Laboratoryhttp://www.slicer.org-31-
Brigham and Women’s Hospital
Saving a Scene
Select Save Scene As
Select the section File in the Main Menu
Surgical Planning Laboratoryhttp://www.slicer.org-32-
Brigham and Women’s Hospital
Saving a Scene
The window Save As File for the scene name appears.Slicer sets the default name for the scene to data.
Surgical Planning Laboratoryhttp://www.slicer.org-33-
Brigham and Women’s Hospital
Saving a Scene
Enter the name SavedScene, select the directory Tutorial_with_dicom/tutorial, and click on Apply.
Surgical Planning Laboratoryhttp://www.slicer.org-34-
Brigham and Women’s Hospital
Saving a Scene
The file SavedScene.xml has been created in the directory Tutorial_with_dicom/tutorial
Surgical Planning Laboratoryhttp://www.slicer.org-35-
Brigham and Women’s Hospital
Saving a Scene
Select Save Scene With Options
The options of the Scene includingthe settings from the modules and the background color set are saved in the file SavedScene.xml.
Surgical Planning Laboratoryhttp://www.slicer.org-36-
Brigham and Women’s Hospital
Tutorial 7: Overview
• Part 1: Loading a Scene
• Part 2: Saving Volumes
• Part 3: Saving Models
• Part 4: Saving Scenes
• Part 5: Saving Images of a Scene
Surgical Planning Laboratoryhttp://www.slicer.org-37-
Brigham and Women’s Hospital
Saving Images of a Scene
Manipulate the models and volumes within the Viewer, and choose a view of the data that you would like to save.
Surgical Planning Laboratoryhttp://www.slicer.org-38-
Brigham and Women’s Hospital
Saving Images of a Scene
Select Set Save 3D View Parameters in File
Surgical Planning Laboratoryhttp://www.slicer.org-39-
Brigham and Women’s Hospital
Saving Images of a Scene
Set the Save Mode to Single view
Select the directory /tutorial to save the view
Enter the File prefix SavedView
Surgical Planning Laboratoryhttp://www.slicer.org-40-
Brigham and Women’s Hospital
Saving Images of a Scene
Set the File Type to PNG
Check the option Include slice windows to save the anatomical views
Click on Save View Now
The Output zoom option provides a higher resolution image.
Surgical Planning Laboratoryhttp://www.slicer.org-41-
Brigham and Women’s Hospital
Saving Images of a Scene
Slicer saves the image of the Viewer as the PNG file SavedView001.PNG
Surgical Planning Laboratoryhttp://www.slicer.org-42-
Brigham and Women’s Hospital
Saving Images of a Scene
The resulting PNG file can be included in an article or a PowerPoint presentation.
Surgical Planning Laboratoryhttp://www.slicer.org-43-
Brigham and Women’s Hospital
Conclusion
• Saving data processed with Slicer
• MRML description of the Scene elements location
• Open-Source environment