Transcript Template

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
Massachusetts General Hospital
National Alliance for Medical Image Computing
-1-
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
Massachusetts General Hospital
National Alliance for Medical Image Computing
-2-
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
Massachusetts General Hospital
National Alliance for Medical Image Computing
-3-
Part 1: Downloading the Plastimatch Extension
Massachusetts General Hospital
National Alliance for Medical Image Computing
-4-
(This part of the tutorial might not work
correctly, pending the Slicer 3.6 release)
Massachusetts General Hospital
National Alliance for Medical Image Computing
-5-
Start up 3D Slicer
Choose “Extension Manager”
from the “View” menu
Massachusetts General Hospital
National Alliance for Medical Image Computing
-6-
Click “Next”
Massachusetts General Hospital
National Alliance for Medical Image Computing
-7-
Find the plastimatch plugin,
and click “Select”
Then, click “Download and Install”
Massachusetts General Hospital
National Alliance for Medical Image Computing
-8-
The “Status” should become green
Click “Next”
Massachusetts General Hospital
National Alliance for Medical Image Computing
-9-
Restart 3D Slicer
Massachusetts General Hospital
National Alliance for Medical Image Computing
-10-
Part 2: Loading the example data
Massachusetts General Hospital
National Alliance for Medical Image Computing
-11-
Start up 3D Slicer
Massachusetts General Hospital
National Alliance for Medical Image Computing
-12-
Choose “Add data” from the menu
Massachusetts General Hospital
National Alliance for Medical Image Computing
-13-
Choose “Add files” in dialog box
Massachusetts General Hospital
National Alliance for Medical Image Computing
-14-
Select (highlight) both example files:
fix.nrrd and mov.nrrd
Then click “Open”
Massachusetts General Hospital
National Alliance for Medical Image Computing
-15-
Click “Apply”
Massachusetts General Hospital
National Alliance for Medical Image Computing
-16-
The images are now loaded
Massachusetts General Hospital
National Alliance for Medical Image Computing
-17-
Part 3: Visualizing the example data
Massachusetts General Hospital
National Alliance for Medical Image Computing
-18-
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.
Massachusetts General Hospital
National Alliance for Medical Image Computing
-19-
Click, and select “fix”
as the foreground image.
Repeat for all three views.
Massachusetts General Hospital
National Alliance for Medical Image Computing
-20-
Use the “Manipulate Slice Views”
slider to blend between foreground
and background
Massachusetts General Hospital
National Alliance for Medical Image Computing
-21-
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
Massachusetts General Hospital
National Alliance for Medical Image Computing
-22-
Choose “Red slice only”
Massachusetts General Hospital
National Alliance for Medical Image Computing
-23-
Much better! Next we're going
to try color blending. Choose the
“Volumes module.
Massachusetts General Hospital
National Alliance for Medical Image Computing
-24-
We're going to modify the color of
the moving volume. Choose “mov”
as the active volume.
Massachusetts General Hospital
National Alliance for Medical Image Computing
-25-
Set it to “Warm Tint 1”
Massachusetts General Hospital
National Alliance for Medical Image Computing
-26-
Massachusetts General Hospital
National Alliance for Medical Image Computing
-27-
Part 4: Running Plastimatch
Massachusetts General Hospital
National Alliance for Medical Image Computing
-28-
Go back to the module selector
Massachusetts General Hospital
National Alliance for Medical Image Computing
-29-
Choose “B-spline deformable
registration” from the
“Plastimatch” section
Massachusetts General Hospital
National Alliance for Medical Image Computing
-30-
Set “Fixed Volume” to “fix”
Set “Moving Volume” to “mov”
Set “Output Volume” to
“Create New Volume”
Massachusetts General Hospital
National Alliance for Medical Image Computing
-31-
Click “Apply”
(You might need to scroll down)
Massachusetts General Hospital
National Alliance for Medical Image Computing
-32-
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
Massachusetts General Hospital
National Alliance for Medical Image Computing
-33-
When the registration is complete, the
warped image is automatically displayed
Massachusetts General Hospital
National Alliance for Medical Image Computing
-34-
You have to set the foreground view
again to see the registration quality
Massachusetts General Hospital
National Alliance for Medical Image Computing
-35-
Your results
should look
like this.
Massachusetts General Hospital
National Alliance for Medical Image Computing
-36-
Part 5: Optimizing Your Registration
Massachusetts General Hospital
National Alliance for Medical Image Computing
-37-
We're going to try
to improve the
registration result.
Massachusetts General Hospital
National Alliance for Medical Image Computing
-38-
Click on “Enable Stage 2”
Then click “Apply”
This takes 12 seconds on
the Tesla C1060. Might be
3-4 minutes on a laptop.
Massachusetts General Hospital
National Alliance for Medical Image Computing
-39-
Like before, the
output is automatically
loaded.
Massachusetts General Hospital
National Alliance for Medical Image Computing
-40-
Your results should
look like this.
Note improvement
in the alignment of
the mediastinum
Massachusetts General Hospital
National Alliance for Medical Image Computing
-41-
Part 6: Advanced Plastimatch Options
Massachusetts General Hospital
National Alliance for Medical Image Computing
-42-
By default, plastimatch optimizes
Mean-squared error (MSE).
But you can choose Mutual
Information (MI) instead
Massachusetts General Hospital
National Alliance for Medical Image Computing
-43-
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.
Massachusetts General Hospital
National Alliance for Medical Image Computing
-44-
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.
Massachusetts General Hospital
National Alliance for Medical Image Computing
-45-
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
Massachusetts General Hospital
National Alliance for Medical Image Computing
-46-
Decreasing max iterations
improves registration speed
Increasing max iterations
improves registration accuracy
Massachusetts General Hospital
National Alliance for Medical Image Computing
-47-
Decreasing the grid spacing
improves accuracy
Increasing the grid spacing
improves reliability
Massachusetts General Hospital
National Alliance for Medical Image Computing
-48-
Conclusion
Congratulations! You have completed the tutorial.
Please send corrections or suggestions to:
Greg Sharp
[email protected]
Or visit the web page at:
http://plastimatch.org
Massachusetts General Hospital
National Alliance for Medical Image Computing
-49-
Acknowledgements
National Alliance for Medical Image Computing
NIH U54EB005149
National Institutes of Health
NIH / NCI 6-PO1 CA 21239
Federal share of program income earned by MGH on C06CA059267
Progetto Rocca Foundation
A collaboration between MIT and Politecnico di Milano
Massachusetts General Hospital
National Alliance for Medical Image Computing
-50-