Documentation:Nightly:Registration:RegistrationLibrary:RegLib C17

From SlicerWiki
Jump to: navigation, search
Home < Documentation:Nightly:Registration:RegistrationLibrary:RegLib C17

Back to Registration Library

Slicer Registration Library Case #17: Abdominal MR/CT

Input

this is the fixed CT reference image. All images are aligned into this space
RegArrow Affine.png
this is the moving MR image, to be aligned with the reference on the left
fixed image/target
intra-op CT
moving image
pre-op MRI

Description

Goal is to align the pre-op MRI to the intra-op interventional CT. The MR contains detail about location and extent of the pathology not apparent on the CT. Hence we register the MR to the CT to help guide the intervention.
Approach: because the field of view and orientation of the two images is so different, we must tackle the registration in several steps: we first generate a rough manual alignment that corrects for the strong rotation and translation between the two images. We then build a set of masks that limit the registration to content that has reliable contrast in both images. Using those masks we finally compute an automated registration and then apply it to the target volume without resampling.

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.

Keywords

MRI, CT, abdominal, image-guided surgery, interventional radiology, intra-subject

Video Screencasts

Below 3 movies/screencasts showing workflow for Case #17, in three parts:

  1. manual initial alignment
  2. generating masks defining the region of interest
  3. automated registration

Procedure

  1. Compute Initial Registration: see also movie above (1.manual initial alignment)
    1. Open the Data module
    2. right-click on the "Scene" node, select "Insert Transform" from the pulldown menu. This creates an "empty" transform we will use for the manual initial alignment. Rename it to "Xf1_Manual" or similar.
    3. left-click on the "MRI" node and drag it onto the new transform node "Xf1_Manual". This places the MRI volume under the transform.
    4. go to the Transforms module
    5. Under Active Transform, select the "Xf1_Manual" we just created
    6. Place the "MR" in the background and the "CT" in the foreground and set the fade slider about halfway, so that you can see both images superimposed.
    7. Use the "Rotation-IS" slider to rotate the MR volume around the z-axis by about 120 degrees.
    8. Use the "Translation-LR" slider to shift the MR volume left by about 112mm. As you do this you should see the two volumes get into better correspondence.
    9. continue adjusting the sliders until you have a good alignment for the kidney. This need not be perfect because we only use it as a starting point for the automated registration.
  2. Build Registration Masks: see also movie above (2.generating masks defining the region of interest). You can also use the provided masks as part of the full dataset. Note these masks need not be precise segmentations but merely a rough definition of the region we want the automated registration to use. Since we have very limited FOV in the CT, there are not many structures common to both images, mainly the kidney, vertebrae, vena cava and some surrounding structures. Hence we limit our mask to that region.
    1. Open the Editor module
    2. Select "MRI" as the Master volume, accept the suggested colormap in the dialog.
    3. Select the Brush tool and increase the radius to about 50mm.
    4. Switch the view to "Red Slice Only". Locate the kidney and vertebra on the axial slice and draw the brush over that region to select. Repeat for all slices showing the kidney and 1-2 slices beyond.
    5. repeat the same for the CT.
  3. Test/Pilot Registration: see also movie above (3.automated registration). This pilot test is intended to see if the automated registration will converge to a stable result with the input we have at this point. We have an initial alignment and 2 masks. If this is insufficient as a starting point, the rigid registration will stray from the manual alignment we gave. If it does converge we can continue to higher DOF. If you're confident/adventurous you may skip this step and continue straight to the affine portion.
    1. open the General Registration (BRAINS) module
    2. Input Images: Fixed Image Volume: CT
    3. Input Images: Moving Image Volume: MRI
    4. Output Settings:
      1. Slicer Linear Transform (create new transform, rename to: "Xf2_Rigid")
      2. Output Image Volume none. No resampling required for linear transforms
    5. Initialization transform: select the "Xf1_Manual" transform we created above.
    6. Initialization Transform Mode: Off
    7. Registration Phases: select/check Rigid
    8. Main Parameters:
      1. increase Number Of Samples to 300,000 (because we expect to loose points by having a small mask, we choose a higher number here)
    9. Mask Option: ROI
      1. Masking input fixed: CT-label (mask generated above)
      2. Masking input fixed: MRI-label (mask generated above)
    10. Leave all other settings at default
    11. click: Apply; runtime < 1 min.
  4. Test: upon completion the MR volume should be placed within the new transform "Xf2_Rigid". Verify that 1) the new position is different from the one of the manual transform (you may also compare the transforms directly); and 2) the new position is a better or comparable position than before. If that is the case we can proceed to higher DOF.
  5. Affine Registration: see also movie above (3.automated registration).
    1. open the General Registration (BRAINS) module
    2. Input Images: Fixed Image Volume: CT
    3. Input Images: Moving Image Volume: MRI
    4. Output Settings:
      1. Slicer Linear Transform (create new transform, rename to: "Xf3_Affine")
      2. Output Image Volume none. No resampling required for linear transforms
    5. Initialization transform: select the "Xf2_Rigid" transform we created above.
    6. Initialization Transform Mode: Off
    7. Registration Phases: select/check Rigid
    8. Main Parameters:
      1. increase Number Of Samples increase to 400,000 (because we expect to loose points by having a small mask, we choose a higher number here)
    9. Mask Option: ROI
      1. Masking input fixed: CT-label (mask generated above)
      2. Masking input fixed: MRI-label (mask generated above)
    10. Leave all other settings at default
    11. click: Apply
  6. Apply Transform without resampling:
    1. Go to the Data module
    2. left click on the moving image node and drag it into/onto the transform node. You should see a "+" sign appear next to the transform node indicating the volume is now placed under that transform. If the image is in either foreground or background and visible in the slice views or 3D view, you will see the image update to its new position immediately.
    3. right click on the image node and from the pop-up menu, select Harden Transform. This will apply the transform and move the image node back outside onto the main level.
    4. double click on the image node and rename it to document that this is no longer the original image but the reoriented one. Note that the image in its original position is replaced in memory and no longer accessible. There is no "undo" for this step, so if you wish to return to the original image, you must reload it from the original file. Be careful not to accidentally overwrite the original image file with the resampled one. Use a new filename when saving the image.
  7. Alternative: Apply Transform with resampling:
    1. Go to the BRAINSResample module
      1. Image To Warp: select MRI
      2. Reference Image: select CT
      3. Outputs:OutputImage: create & rename new, rename to "MRI_Xf2"
      4. Pixel Type: select short , or match the datatype of the original image.
      5. Transform File: select "Xf2_Affine"
      6. Interpolation Mode: select "WindowedSinc" (recommended for 3D MRI). For labelmaps select Nearest Neighbor
      7. Click Apply. This will generate a new volume with the same resolution as the reference image.

Registration Results

RegLib C17 unregistered.gif MR/CT before registration (click to enlarge)
RegLib C17 registered.gif MR/CT after affine alignment (click to enlarge)

Acknowledgments