using plastimatch for deformable registration
DESCRIPTION
3D Slicer Training Compendium. Using Plastimatch for Deformable Registration. Tutorial Version 1.0, Apr 26, 2010. Gregory C. Sharp Department of Radiation Oncology Massachusetts General Hospital. Learning Objective. This tutorial is a step-by-step guide, and includes: - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/1.jpg)
-1-Massachusetts General Hospital National Alliance for Medical Image Computing
Using Plastimatch forDeformable Registration
Gregory C. Sharp
Department of Radiation Oncology
Massachusetts General Hospital
3D Slicer Training Compendium
Tutorial Version 1.0, Apr 26, 2010
![Page 2: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/2.jpg)
-2-Massachusetts General Hospital National Alliance for Medical Image Computing
Learning Objective
This tutorial is a step-by-step guide, and includes:
1) Downloading the Plastimatch extension to 3D Slicer
2) Loading the sample images
3) Running deformable registration on the CPU
4) Running deformable registration on the GPU
5) Inspecting registration quality in 3D Slicer
The plastimatch web site is: http://plastimatch.org
![Page 3: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/3.jpg)
-3-Massachusetts General Hospital National Alliance for Medical Image Computing
Prerequisites
This tutorial assumes that you have already downloaded the sample data. You can get the data from here:
http://forge.abcd.harvard.edu/gf/download/frsrelease/85/1004/rider-lung-images.tar.gz
![Page 4: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/4.jpg)
-4-Massachusetts General Hospital National Alliance for Medical Image Computing
Part 1: Downloading the Plastimatch Extension
![Page 5: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/5.jpg)
-5-Massachusetts General Hospital National Alliance for Medical Image Computing
(This part of the tutorial might not workcorrectly, pending the Slicer 3.6 release)
![Page 6: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/6.jpg)
-6-Massachusetts General Hospital National Alliance for Medical Image Computing
Start up 3D Slicer
Choose “Extension Manager”from the “View” menu
![Page 7: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/7.jpg)
-7-Massachusetts General Hospital National Alliance for Medical Image Computing
Click “Next”
![Page 8: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/8.jpg)
-8-Massachusetts General Hospital National Alliance for Medical Image Computing
Find the plastimatch plugin,and click “Select”Then, click “Download and Install”
![Page 9: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/9.jpg)
-9-Massachusetts General Hospital National Alliance for Medical Image Computing
The “Status” should become green
Click “Next”
![Page 10: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/10.jpg)
-10-Massachusetts General Hospital National Alliance for Medical Image Computing
Restart 3D Slicer
![Page 11: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/11.jpg)
-11-Massachusetts General Hospital National Alliance for Medical Image Computing
Part 2: Loading the example data
![Page 12: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/12.jpg)
-12-Massachusetts General Hospital National Alliance for Medical Image Computing
Start up 3D Slicer
![Page 13: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/13.jpg)
-13-Massachusetts General Hospital National Alliance for Medical Image Computing
Choose “Add data” from the menu
![Page 14: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/14.jpg)
-14-Massachusetts General Hospital National Alliance for Medical Image Computing
Choose “Add files” in dialog box
![Page 15: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/15.jpg)
-15-Massachusetts General Hospital National Alliance for Medical Image Computing
Select (highlight) both example files:fix.nrrd and mov.nrrd
Then click “Open”
![Page 16: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/16.jpg)
-16-Massachusetts General Hospital National Alliance for Medical Image Computing
Click “Apply”
![Page 17: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/17.jpg)
-17-Massachusetts General Hospital National Alliance for Medical Image Computing
The images are now loaded
![Page 18: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/18.jpg)
-18-Massachusetts General Hospital National Alliance for Medical Image Computing
Part 3: Visualizing the example data
![Page 19: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/19.jpg)
-19-Massachusetts General Hospital National Alliance for Medical Image Computing
We want to look at how well the images are aligned before we start
3D Slicer can view a “foreground” (F) and “background” (B) image at the same time. After loading, (F) is set to “None” in all views.
![Page 20: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/20.jpg)
-20-Massachusetts General Hospital National Alliance for Medical Image Computing
Click, and select “fix” as the foreground image.Repeat for all three views.
![Page 21: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/21.jpg)
-21-Massachusetts General Hospital National Alliance for Medical Image Computing
Use the “Manipulate Slice Views” slider to blend between foreground and background
![Page 22: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/22.jpg)
-22-Massachusetts General Hospital National Alliance for Medical Image Computing
We can now see the alignment of the images. To see it better, we need to increase the viewport size.
Click on the layout chooser button
![Page 23: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/23.jpg)
-23-Massachusetts General Hospital National Alliance for Medical Image Computing
Choose “Red slice only”
![Page 24: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/24.jpg)
-24-Massachusetts General Hospital National Alliance for Medical Image Computing
Much better! Next we're going to try color blending. Choose the “Volumes module.
![Page 25: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/25.jpg)
-25-Massachusetts General Hospital National Alliance for Medical Image Computing
We're going to modify the color of the moving volume. Choose “mov”as the active volume.
![Page 26: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/26.jpg)
-26-Massachusetts General Hospital National Alliance for Medical Image Computing
Set it to “Warm Tint 1”
![Page 27: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/27.jpg)
-27-Massachusetts General Hospital National Alliance for Medical Image Computing
![Page 28: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/28.jpg)
-28-Massachusetts General Hospital National Alliance for Medical Image Computing
Part 4: Running Plastimatch
![Page 29: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/29.jpg)
-29-Massachusetts General Hospital National Alliance for Medical Image Computing
Go back to the module selector
![Page 30: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/30.jpg)
-30-Massachusetts General Hospital National Alliance for Medical Image Computing
Choose “B-spline deformableregistration” from the “Plastimatch” section
![Page 31: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/31.jpg)
-31-Massachusetts General Hospital National Alliance for Medical Image Computing
Set “Fixed Volume” to “fix”Set “Moving Volume” to “mov”
Set “Output Volume” to “Create New Volume”
![Page 32: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/32.jpg)
-32-Massachusetts General Hospital National Alliance for Medical Image Computing
Click “Apply”
(You might need to scroll down)
![Page 33: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/33.jpg)
-33-Massachusetts General Hospital National Alliance for Medical Image Computing
Check the status in the status bar
With a Tesla C1060 GPU, the registration takes 6 seconds
A laptop might take 1 or 2 minutes
![Page 34: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/34.jpg)
-34-Massachusetts General Hospital National Alliance for Medical Image Computing
When the registration is complete, the warped image is automatically displayed
![Page 35: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/35.jpg)
-35-Massachusetts General Hospital National Alliance for Medical Image Computing
You have to set the foreground view again to see the registration quality
![Page 36: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/36.jpg)
-36-Massachusetts General Hospital National Alliance for Medical Image Computing
Your results should look like this.
![Page 37: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/37.jpg)
-37-Massachusetts General Hospital National Alliance for Medical Image Computing
Part 5: Optimizing Your Registration
![Page 38: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/38.jpg)
-38-Massachusetts General Hospital National Alliance for Medical Image Computing
We're going to try to improve the registration result.
![Page 39: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/39.jpg)
-39-Massachusetts General Hospital National Alliance for Medical Image Computing
Click on “Enable Stage 2”Then click “Apply”
This takes 12 seconds on the Tesla C1060. Might be 3-4 minutes on a laptop.
![Page 40: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/40.jpg)
-40-Massachusetts General Hospital National Alliance for Medical Image Computing
Like before, the output is automatically loaded.
![Page 41: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/41.jpg)
-41-Massachusetts General Hospital National Alliance for Medical Image Computing
Your results should look like this.
Note improvement in the alignment of the mediastinum
![Page 42: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/42.jpg)
-42-Massachusetts General Hospital National Alliance for Medical Image Computing
Part 6: Advanced Plastimatch Options
![Page 43: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/43.jpg)
-43-Massachusetts General Hospital National Alliance for Medical Image Computing
By default, plastimatch optimizes Mean-squared error (MSE).
But you can choose Mutual Information (MI) instead
![Page 44: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/44.jpg)
-44-Massachusetts General Hospital National Alliance for Medical Image Computing
By default, plastimatch uses the GPU. But you can choose to use the CPU instead.
Plastimatch CPU uses OpenMP to take advantage of modern multi-core systems
However, in Plastimatch 1.4, mutual information does not take advantage of the GPU, nor is it multi-threaded.
![Page 45: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/45.jpg)
-45-Massachusetts General Hospital National Alliance for Medical Image Computing
In our tutorial, the images were sufficiently well aligned that we could use B-spline registration.
But if they are not well aligned, you can do a “rough alignment” using translation, rigid, or affine registration.
Click “Enable Stage 0” to enable the rough alignment.
![Page 46: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/46.jpg)
-46-Massachusetts General Hospital National Alliance for Medical Image Computing
For each stage, you can modify the subsampling rate, grid size, and maximum iterations
Decreasing the subsampling rate improves accuracy
Increasing the subsampling rate improves reliability
![Page 47: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/47.jpg)
-47-Massachusetts General Hospital National Alliance for Medical Image Computing
Decreasing max iterations improves registration speed
Increasing max iterations improves registration accuracy
![Page 48: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/48.jpg)
-48-Massachusetts General Hospital National Alliance for Medical Image Computing
Decreasing the grid spacing improves accuracy
Increasing the grid spacing improves reliability
![Page 49: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/49.jpg)
-49-Massachusetts General Hospital National Alliance for Medical Image Computing
Conclusion
Congratulations! You have completed the tutorial.
Please send corrections or suggestions to:
Greg [email protected]
Or visit the web page at:
http://plastimatch.org
![Page 50: Using Plastimatch for Deformable Registration](https://reader033.vdocuments.site/reader033/viewer/2022061605/568148a8550346895db5baed/html5/thumbnails/50.jpg)
-50-Massachusetts General Hospital National Alliance for Medical Image Computing
National Alliance for Medical Image ComputingNIH U54EB005149
Acknowledgements
National Institutes of HealthNIH / NCI 6-PO1 CA 21239Federal share of program income earned by MGH on C06CA059267
Progetto Rocca FoundationA collaboration between MIT and Politecnico di Milano