Surgical Planning Laboratory -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia...

43
Surgical Planning Laboratory http://www.slicer.org -1- Brigham and Women’s Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D., Ph.D.

Transcript of Surgical Planning Laboratory -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia...

Page 1: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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.

Page 2: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.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

Page 3: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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.

Page 4: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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

Page 5: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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.

Page 6: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

Surgical Planning Laboratoryhttp://www.slicer.org-6-

Brigham and Women’s Hospital

Saving Data

Slicer can save

• Volumes ………………….

Page 7: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

Surgical Planning Laboratoryhttp://www.slicer.org-7-

Brigham and Women’s Hospital

Saving Data

Slicer can save

• Volumes ………………….

• Models ………………………………..

Page 8: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

Surgical Planning Laboratoryhttp://www.slicer.org-8-

Brigham and Women’s Hospital

Saving Data

Slicer can save

• Volumes ………………….

• Models ………………………………..

• Scenes ………………………………....

Page 9: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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.

Page 10: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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

Page 11: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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

Page 12: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

Surgical Planning Laboratoryhttp://www.slicer.org-12-

Brigham and Women’s Hospital

Loading a Scene

Slicer loads the scene tutorial in the Viewer.

Page 13: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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

Page 14: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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

Page 15: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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

Page 16: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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

Page 17: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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

Page 18: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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

Page 19: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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

Page 20: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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

Page 21: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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.

Page 22: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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

Page 23: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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

Page 24: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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

Page 25: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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

Page 26: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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.

Page 27: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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

Page 28: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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

Page 29: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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.

Page 30: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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.

Page 31: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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

Page 32: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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.

Page 33: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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.

Page 34: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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

Page 35: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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.

Page 36: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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

Page 37: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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.

Page 38: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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

Page 39: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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

Page 40: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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.

Page 41: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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

Page 42: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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.

Page 43: Surgical Planning Laboratory  -1- Brigham and Womens Hospital Slicer Tutorial 7 Saving Data Sonia Pujol, Ph.D. Randy Gollub, M.D.,

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