Difference between revisions of "Documentation:Nightly:Registration:RegistrationLibrary:RegLib C20"
(3 intermediate revisions by the same user not shown) | |||
Line 11: | Line 11: | ||
|moving image<br>follow-up PET/CT | |moving image<br>follow-up PET/CT | ||
|} | |} | ||
+ | |||
+ | == Description == | ||
+ | We have two sets of PET/CT scans we wish to align. Each exam has PET and CT already aligned to eachother by acquisition. <br> | ||
+ | '''Approach''': we calculate a transform to align the follow-up CT to the baseline and then apply this transform to the follow-up PET. We proceed in two steps of first affine and then BSpline registration. We also show the use of a new extension module to visualize deformation fields. | ||
== Modules used == | == Modules used == | ||
Line 18: | Line 22: | ||
== Download (from NAMIC MIDAS) == | == Download (from NAMIC MIDAS) == | ||
− | *[http://slicer.kitware.com/midas3/download/?items= | + | <small>''Why 2 sets of files? The "input data" mrb includes only the unregistered data to try the method yourself from start to finish. The full dataset includes intermediate files and results (transforms, resampled images etc.). If you use the full dataset we recommend to choose different names for the images/results you create yourself to distinguish the old data from the new one you generated yourself. ''</small> |
+ | *[http://slicer.kitware.com/midas3/download/?items=116262 '''RegLib_C20.mrb''': input data only, use this to run the tutorial from the start <small>(Slicer mrb file. 76 MB). </small>] | ||
+ | *[http://slicer.kitware.com/midas3/download/?items=116261 '''RegLib_C20_full.mrb''': includes raw data + all solutions and intermediate files, use to browse/verify <small>(Slicer mrb file. 171 MB). </small>] | ||
== Screencasts / Video == | == Screencasts / Video == | ||
Line 32: | Line 38: | ||
== Procedure == | == Procedure == | ||
It is possible to perform both steps of affine and BSpline registration in a single pass within the [[Documentation/Nightly/Modules/BRAINSFit|''General Registration (BRAINS)'' module]], but to better show/judge progress we perform each separately and feed the results of one the the next step. Hence we first run an affine registration, then use that as starting point for a BSpline registration. | It is possible to perform both steps of affine and BSpline registration in a single pass within the [[Documentation/Nightly/Modules/BRAINSFit|''General Registration (BRAINS)'' module]], but to better show/judge progress we perform each separately and feed the results of one the the next step. Hence we first run an affine registration, then use that as starting point for a BSpline registration. | ||
− | #'''Load & Center Volumes''': | + | #'''Load & Center Volumes''': [[Media:RegLib_C20_1_DisplayAndCenter.mov|(screencast for this step)]] |
##the original unregistered PET/CT pair have very different image origins. When loaded into Slicer there is very little overlap between the two sets. We first re-center all the volumes to correct for this. Alternatively you can select the "Center Volume" option in the File dialog when loading the images. | ##the original unregistered PET/CT pair have very different image origins. When loaded into Slicer there is very little overlap between the two sets. We first re-center all the volumes to correct for this. Alternatively you can select the "Center Volume" option in the File dialog when loading the images. | ||
##open to the [[Documentation/Nightly/Modules/Volumes|''Volumes'' module]] | ##open to the [[Documentation/Nightly/Modules/Volumes|''Volumes'' module]] | ||
Line 46: | Line 52: | ||
###for "PET_1" and "PET_2" select the "PET" preset (3rd from the left) | ###for "PET_1" and "PET_2" select the "PET" preset (3rd from the left) | ||
###since zero in the PET colormap is red, we set a threshold to suppress this: from ''Threshold'' menu, select "Manual" and set the left/lower threshold to ~ 600. You can also drag the pop-up slider until most of the red background turns to black. | ###since zero in the PET colormap is red, we set a threshold to suppress this: from ''Threshold'' menu, select "Manual" and set the left/lower threshold to ~ 600. You can also drag the pop-up slider until most of the red background turns to black. | ||
− | #'''Compute Affine Registration''': open to the [[Documentation/Nightly/Modules/BRAINSFit|''General Registration (BRAINS)'' module]] | + | #'''Register: Compute Affine Registration''': [[Media:RegLib_C20_2_RegisterCT.mov|(screencast for this step)]] |
+ | ##open to the [[Documentation/Nightly/Modules/BRAINSFit|''General Registration (BRAINS)'' module]] | ||
##''Input Images: Fixed Image Volume'': CT_1 | ##''Input Images: Fixed Image Volume'': CT_1 | ||
##''Input Images: Moving Image Volume'': CT_2 | ##''Input Images: Moving Image Volume'': CT_2 | ||
Line 63: | Line 70: | ||
###switch to the [[Documentation/Nightly/Modules/Data|''Data'' module]], verify that the "CT_2" node is inside the newly created "Xf1_Affine" node. The registration module should do that automatically for you. You may see a small "+" next to the "Xf1_Affine" node, click on it to reveal the contents. | ###switch to the [[Documentation/Nightly/Modules/Data|''Data'' module]], verify that the "CT_2" node is inside the newly created "Xf1_Affine" node. The registration module should do that automatically for you. You may see a small "+" next to the "Xf1_Affine" node, click on it to reveal the contents. | ||
###fade between background and foreground to judge the alignment. | ###fade between background and foreground to judge the alignment. | ||
− | #'''Compute BSpline Registration''': return to the [[Documentation/Nightly/Modules/BRAINSFit|''General Registration (BRAINS)'' module]] | + | #'''Compute BSpline Registration''': [[Media:RegLib_C20_2_RegisterCT.mov|(screencast for this step)]] |
+ | ##return to the [[Documentation/Nightly/Modules/BRAINSFit|''General Registration (BRAINS)'' module]] | ||
##''Input Images: Fixed Image Volume'': CT_1 | ##''Input Images: Fixed Image Volume'': CT_1 | ||
##''Input Images: Moving Image Volume'': CT_2 | ##''Input Images: Moving Image Volume'': CT_2 | ||
Line 81: | Line 89: | ||
###Place "CT_1" in the background and "CT_2_Xf2" in the foreground | ###Place "CT_1" in the background and "CT_2_Xf2" in the foreground | ||
###fade between background and foreground to judge the alignment. | ###fade between background and foreground to judge the alignment. | ||
− | #'''Apply transform to PET''': | + | #'''Apply transform to PET''': [[Media:RegLib_C20_3_ApplyTransformToPET.mov|(screencast for this step)]] |
##open the [[Documentation/Nightly/Modules/BRAINSResample|''Registration / Resample Volume (BRAINS)'' module]] | ##open the [[Documentation/Nightly/Modules/BRAINSResample|''Registration / Resample Volume (BRAINS)'' module]] | ||
##''Image To Warp: PET_2 | ##''Image To Warp: PET_2 | ||
Line 94: | Line 102: | ||
###''Window/Level editor presets'': click on the "PET" preset (3rd button from the left) | ###''Window/Level editor presets'': click on the "PET" preset (3rd button from the left) | ||
###from ''Threshold'' menu, select "Manual" and set the left/lower threshold to ~ 600. You can also drag the pop-up slider until most of the red background turns to black. | ###from ''Threshold'' menu, select "Manual" and set the left/lower threshold to ~ 600. You can also drag the pop-up slider until most of the red background turns to black. | ||
− | #'''optional: Visualize Deformation''': install | + | #'''optional: Visualize Deformation''': install the '' [[Documentation/Nightly/Extensions/TransformVisualizer| ''TransformVisualizer'']]: [[Media:RegLib_C20_4_InstallTransformVisualizer.mov|(screencast for this step)]] |
##open the [[Documentation/Nightly/SlicerApplication/ExtensionsManager| ''ExtensionsManager'']] [[Image:ExtensionManagerIcon.png|50px]] | ##open the [[Documentation/Nightly/SlicerApplication/ExtensionsManager| ''ExtensionsManager'']] [[Image:ExtensionManagerIcon.png|50px]] | ||
##locate the ''Transform Visualizer" extension. Click on the "Install" button | ##locate the ''Transform Visualizer" extension. Click on the "Install" button | ||
##you will need to restart Slicer to complete the installation. '''Make sure to save all your work before restarting.''' | ##you will need to restart Slicer to complete the installation. '''Make sure to save all your work before restarting.''' | ||
+ | [[Media:RegLib_C20_4_InstallTransformVisualizer.mov|(screencast for this step)]] | ||
+ | #'''optional: Visualize Deformation''': use the '' [[Documentation/Nightly/Extensions/TransformVisualizer| ''TransformVisualizer'']]: [[Media:RegLib_C20_5_UseTransformVisualizer.mov|(screencast for this step)]] | ||
##upon restart, reload "CT1" and "Xf2_BSpline" | ##upon restart, reload "CT1" and "Xf2_BSpline" | ||
##to allow fast interactive use we need to subsample the large CT volumes: | ##to allow fast interactive use we need to subsample the large CT volumes: |
Latest revision as of 21:35, 28 August 2013
Home < Documentation:Nightly:Registration:RegistrationLibrary:RegLib C20Contents
Slicer Registration Library Case #20: Align PET/CT pair follow-up to baseline
Input
fixed image/target baseline PET/CT |
moving image follow-up PET/CT |
Description
We have two sets of PET/CT scans we wish to align. Each exam has PET and CT already aligned to eachother by acquisition.
Approach: we calculate a transform to align the follow-up CT to the baseline and then apply this transform to the follow-up PET. We proceed in two steps of first affine and then BSpline registration. We also show the use of a new extension module to visualize deformation fields.
Modules used
Download (from NAMIC MIDAS)
Why 2 sets of files? The "input data" mrb includes only the unregistered data to try the method yourself from start to finish. The full dataset includes intermediate files and results (transforms, resampled images etc.). If you use the full dataset we recommend to choose different names for the images/results you create yourself to distinguish the old data from the new one you generated yourself.
- RegLib_C20.mrb: input data only, use this to run the tutorial from the start (Slicer mrb file. 76 MB).
- RegLib_C20_full.mrb: includes raw data + all solutions and intermediate files, use to browse/verify (Slicer mrb file. 171 MB).
Screencasts / Video
- Loading volumes, setting colormaps, centering volumes
- perform affine and BSpline registration of the CT volumes
- apply the BSpline transform to the PET
- optional: install TransformVisualizer extension module
- optional: use TransformVisualizer extension module] to visualize the registration deformation field
Keywords
PET/CT, full-body, intra-subject, nonrigid
Procedure
It is possible to perform both steps of affine and BSpline registration in a single pass within the General Registration (BRAINS) module, but to better show/judge progress we perform each separately and feed the results of one the the next step. Hence we first run an affine registration, then use that as starting point for a BSpline registration.
- Load & Center Volumes: (screencast for this step)
- the original unregistered PET/CT pair have very different image origins. When loaded into Slicer there is very little overlap between the two sets. We first re-center all the volumes to correct for this. Alternatively you can select the "Center Volume" option in the File dialog when loading the images.
- open to the Volumes module
- Active Volume: CT_1
- scroll down and click on the Center Volume button.
- repeat for "CT_2", "PET_1" and "PET_2" volumes
- Set the display properties:
- the CT and PET have very distinct colormaps. Slicer provides presets for both types
- open to the Volumes module
- Active Volume: CT_1
- Window/Level editor presets: click on the "CT-abdomen" button (3rd from the right).
- repeat for volume "CT_2"
- for "PET_1" and "PET_2" select the "PET" preset (3rd from the left)
- since zero in the PET colormap is red, we set a threshold to suppress this: from Threshold menu, select "Manual" and set the left/lower threshold to ~ 600. You can also drag the pop-up slider until most of the red background turns to black.
- Register: Compute Affine Registration: (screencast for this step)
- open to the General Registration (BRAINS) module
- Input Images: Fixed Image Volume: CT_1
- Input Images: Moving Image Volume: CT_2
- Output Settings:
- Slicer Linear Transform: (create new transform, rename to: "Xf1_Affine")
- Output Image Volume: none (we need no resampled volume at this stage, only the transform)
- Initialization: none
- Initialize Transform Mode: switch to Off (there is sufficient overlap)
- Registration Phases: 'check Rigid, Rigid+Scale and Affine only
- Main Parameters:
- increase Number Of Samples to at least 200,000
- Leave all other settings at default
- click: Apply; runtime < 2 min.
- check the result
- Place "CT_1" in the background and "CT_2" in the foreground
- switch to the Data module, verify that the "CT_2" node is inside the newly created "Xf1_Affine" node. The registration module should do that automatically for you. You may see a small "+" next to the "Xf1_Affine" node, click on it to reveal the contents.
- fade between background and foreground to judge the alignment.
- Compute BSpline Registration: (screencast for this step)
- return to the General Registration (BRAINS) module
- Input Images: Fixed Image Volume: CT_1
- Input Images: Moving Image Volume: CT_2
- Output Settings:
- Slicer BSpline Transform: Create and rename new. Rename to "Xf2_BSpline"
- Slicer Linear Transform: set to none
- Output Image Volume: Create and rename new. Rename to "CT_2_Xf2" (we need a resampled volume to visualize the result. Nonrigid transforms cannot be visualized on the fly)
- Initialization: for the Initialization transform select the "Xf1_Affine" transform created above.
- Initialize Transform Mode: switch to Off
- Registration Phases: uncheck Rigid+Scale and Affine and select BSpline only
- Main Parameters:
- increase Number Of Samples to 300,000
- set B-Spline Grid Size to 11,11,7
- Leave all other settings at default
- click: Apply; runtime for this will be more than 1 minute, depending on CPU.
- check the result
- Place "CT_1" in the background and "CT_2_Xf2" in the foreground
- fade between background and foreground to judge the alignment.
- Apply transform to PET: (screencast for this step)
- open the Registration / Resample Volume (BRAINS) module
- Image To Warp: PET_2
- Reference Image: PET_1
- Pixel Type: short
- Warping Parameters / Transform file: "Xf2_BSpline"
- Output Image: create and rename new: "PET_2_Xf2"
- Leave all other settings at default
- click: Apply
- Go to the Volumes module and set the PET colormap and threshold for the new volume:
- Active Volume: PET_2_Xf2
- Window/Level editor presets: click on the "PET" preset (3rd button from the left)
- from Threshold menu, select "Manual" and set the left/lower threshold to ~ 600. You can also drag the pop-up slider until most of the red background turns to black.
- optional: Visualize Deformation: install the TransformVisualizer: (screencast for this step)
- open the ExtensionsManager
- locate the Transform Visualizer" extension. Click on the "Install" button
- you will need to restart Slicer to complete the installation. Make sure to save all your work before restarting.
- open the ExtensionsManager
- optional: Visualize Deformation: use the TransformVisualizer: (screencast for this step)
- upon restart, reload "CT1" and "Xf2_BSpline"
- to allow fast interactive use we need to subsample the large CT volumes:
- Go to the Registration / Resize Image (BRAINS) module
- Image To Warp: CT_1
- 'Output Image: create & rename new: CT_1s
- Pixel Type: short
- Scale Factor: 3
- Click Apply. This will create a subsampled version of CT_1 that we can use as reference for the Transform Visualizer.
- under All Modules select the TransformVisualizer
- Input/Deformation: select "Xf2_BSpline"
- "Reference Image: select the "CT_1s" we created above
- Output Model: create & rename new Model. e.g. rename to "Xf2_DeformationModel
- Visualization Mode: e.g. select "Block"
- click Apply. You will see a model of the deformation field in the 3D view.
- Go to the Models module
- select the new model and reduce the opacity for better visibility.
- experiment with other view types, esp. GridSlice , Glyph, Contour.
Registration Results
![]() |
![]() |
![]() |
![]() |