Documentation:Nightly:Registration:RegistrationLibrary:RegLib C08

From Slicer Wiki
Jump to: navigation, search
Home < Documentation:Nightly:Registration:RegistrationLibrary:RegLib C08

Back to Registration Library

Slicer Registration Library Case #8: Align PET/CT pair follow-up to baseline

Input

RegArrow NonRigid.png
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.

Screencasts / Video

  1. Loading volumes, setting colormaps, centering volumes
  2. perform affine and BSpline registration of the CT volumes
  3. apply the BSpline transform to the PET
  4. optional: install TransformVisualizer extension module
  5. 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.

  1. Load & Center Volumes: (screencast for this step)
    1. 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.
    2. open to the Volumes module
      1. Active Volume: CT_1
      2. scroll down and click on the Center Volume button.
      3. repeat for "CT_2", "PET_1" and "PET_2" volumes
  2. Set the display properties:
    1. the CT and PET have very distinct colormaps. Slicer provides presets for both types
    2. open to the Volumes module
      1. Active Volume: CT_1
      2. Window/Level editor presets: click on the "CT-abdomen" button (3rd from the right).
      3. repeat for volume "CT_2"
      4. for "PET_1" and "PET_2" select the "PET" preset (3rd from the left)
      5. 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.
  3. Register: Compute Affine Registration: (screencast for this step)
    1. open to the General Registration (BRAINS) module
    2. Input Images: Fixed Image Volume: CT_1
    3. Input Images: Moving Image Volume: CT_2
    4. Output Settings:
      1. Slicer Linear Transform: (create new transform, rename to: "Xf1_Affine")
      2. Output Image Volume: none (we need no resampled volume at this stage, only the transform)
    5. Initialization: none
    6. Initialize Transform Mode: switch to Off (there is sufficient overlap)
    7. Registration Phases: 'check Rigid, Rigid+Scale and Affine only
    8. Main Parameters:
      1. increase Number Of Samples to at least 200,000
    9. Leave all other settings at default
    10. click: Apply; runtime < 2 min.
    11. check the result
      1. Place "CT_1" in the background and "CT_2" in the foreground
      2. 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.
      3. fade between background and foreground to judge the alignment.
  4. Compute BSpline Registration: (screencast for this step)
    1. return to the General Registration (BRAINS) module
    2. Input Images: Fixed Image Volume: CT_1
    3. Input Images: Moving Image Volume: CT_2
    4. Output Settings:
      1. Slicer BSpline Transform: Create and rename new. Rename to "Xf2_BSpline"
      2. Slicer Linear Transform: set to none
      3. 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)
    5. Initialization: for the Initialization transform select the "Xf1_Affine" transform created above.
    6. Initialize Transform Mode: switch to Off
    7. Registration Phases: uncheck Rigid+Scale and Affine and select BSpline only
    8. Main Parameters:
      1. increase Number Of Samples to 300,000
      2. set B-Spline Grid Size to 11,11,7
    9. Leave all other settings at default
    10. click: Apply; runtime for this will be more than 1 minute, depending on CPU.
    11. check the result
      1. Place "CT_1" in the background and "CT_2_Xf2" in the foreground
      2. fade between background and foreground to judge the alignment.
  5. Apply transform to PET: (screencast for this step)
    1. open the Registration / Resample Volume (BRAINS) module
    2. Image To Warp: PET_2
    3. Reference Image: PET_1
    4. Pixel Type: short
    5. Warping Parameters / Transform file: "Xf2_BSpline"
    6. Output Image: create and rename new: "PET_2_Xf2"
    7. Leave all other settings at default
    8. click: Apply
    9. Go to the Volumes module and set the PET colormap and threshold for the new volume:
      1. Active Volume: PET_2_Xf2
      2. Window/Level editor presets: click on the "PET" preset (3rd button from the left)
      3. 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.
  6. optional: Visualize Deformation: install the TransformVisualizer: (screencast for this step)
    1. open the ExtensionsManager ExtensionManagerIcon.png
    2. locate the Transform Visualizer" extension. Click on the "Install" button
    3. you will need to restart Slicer to complete the installation. Make sure to save all your work before restarting.

(screencast for this step)

  1. optional: Visualize Deformation: use the TransformVisualizer: (screencast for this step)
    1. upon restart, reload "CT1" and "Xf2_BSpline"
    2. to allow fast interactive use we need to subsample the large CT volumes:
    3. Go to the Registration / Resize Image (BRAINS) module
      1. Image To Warp: CT_1
      2. 'Output Image: create & rename new: CT_1s
      3. Pixel Type: short
      4. Scale Factor: 3
      5. Click Apply. This will create a subsampled version of CT_1 that we can use as reference for the Transform Visualizer.
    4. under All Modules select the TransformVisualizer
      1. Input/Deformation: select "Xf2_BSpline"
      2. "Reference Image: select the "CT_1s" we created above
      3. Output Model: create & rename new Model. e.g. rename to "Xf2_DeformationModel
      4. Visualization Mode: e.g. select "Block"
      5. click Apply. You will see a model of the deformation field in the 3D view.
      6. Go to the Models module
      7. select the new model and reduce the opacity for better visibility.
      8. experiment with other view types, esp. GridSlice , Glyph, Contour.

Registration Results

RegLib C20 unregistered.gif before registration (click to enlarge)
RegLib C20 registered.gif after affine+nonrigid registration (click to enlarge)
RegLib C20 registered2.gif after affine+nonrigid registration (click to enlarge)
RegLib C20 DeformationGrid.png BSpline deformation grid (click to enlarge)


Acknowledgments