Difference between revisions of "Documentation:Nightly:Registration:RegistrationLibrary:RegLib C21"

From Slicer Wiki
Jump to: navigation, search
Line 3: Line 3:
 
== Input ==
 
== Input ==
 
{| style="color:#bbbbbb; " cellpadding="10" cellspacing="0" border="0"
 
{| style="color:#bbbbbb; " cellpadding="10" cellspacing="0" border="0"
|[[Image:RegLib_C21_Thumb1.png|150px|lleft|this is the fixed MRI reference image.]]  
+
|[[Image:RegLib_C21_Thumb1.png|150px|left|this is the fixed MRI reference image.]]  
|[[Image:RegArrow_Nonrigid.png|100px|lleft]]  
+
|[[Image:RegArrow_NonRigid.png|100px|left]]  
|[[Image:RegLib_C21_Thumb2.png|150px|lleft|this is the moving image, to be aligned with the reference MRI on the left]]
+
|[[Image:RegLib_C21_Thumb2.png|150px|left|this is the moving image, to be aligned with the reference MRI on the left]]
 
|-
 
|-
 
|fixed image/target<br>MRI
 
|fixed image/target<br>MRI

Revision as of 15:31, 19 August 2013

Home < Documentation:Nightly:Registration:RegistrationLibrary:RegLib C21

Back to Registration Library

Slicer Registration Library Case #21: Align knee MRI of two different subjects

Input

this is the fixed MRI reference image.
RegArrow NonRigid.png
this is the moving image, to be aligned with the reference MRI on the left
fixed image/target
MRI
moving image
MRI


Modules used

Download (from NAMIC MIDAS)

Keywords

MRI, knee, inter-subject, nonrigid

Procedure

It is possible to perform all 3 steps of rigid, 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 a rigid registration, then use that to compute an affine registration, and finally use the affine as starting point for a BSpline registration. For the last one we will need to generate a quick mask to prevent aliasing artifacts in the image from influencing the result. The masks are available in the download set.

  1. Compute Rigid Registration: open the General Registration (BRAINS) module
    1. Input Images: Fixed Image Volume: MRI_58
    2. Input Images: Moving Image Volume: MRI_64
    3. Output Settings:
      1. Slicer Linear Transform: (create new transform, rename to: "Xf1_Rigid")
      2. Output Image Volume: none (we need no resampled volume at this stage, only the transform)
    4. Registration Phases: select/check Rigid
    5. Main Parameters:
      1. increase Number Of Samples to 200,000
    6. Leave all other settings at default
    7. click: Apply; runtime < 1 min.
    8. check the result
      1. Place "MRI_58" in the background and "MRI_64" in the foreground
      2. switch to the Data module, locate the "MRI_64" node, and drag it onto the newly created "Xf1_Rigid" node.
      3. fade between background and foreground to judge the alignment.
      4. for better visibility, you can change the colormaps of the two volumes, as used in the examples shown here. Switch to the Volumes module, select "MRI_58" and then select "Green" from the Lookup Table menu. Similarly select "Cyan" for "MRI_64".
  2. Compute Affine Registration: return to the General Registration (BRAINS) module
    1. Input Images: Fixed Image Volume: MRI_58
    2. Input Images: Moving Image Volume: MRI_64
    3. Output Settings:
      1. Slicer Linear Transform: (create new transform, rename to: "Xf2_Affine")
      2. Output Image Volume: none (we need no resampled volume at this stage, only the transform)
    4. Initialization: for the Initialization transform select the "Xf1_Rigid" transform created above.
    5. Initialize Transform Mode: switch to Off
    6. Registration Phases: uncheck Rigid and select Rigid+Scale and Affine only
    7. Main Parameters:
      1. leave Number Of Samples to 200,000
    8. Leave all other settings at default
    9. click: Apply; runtime < 1 min.
    10. check the result
      1. Place "MRI_58" in the background and "MRI_64" in the foreground
      2. switch to the Data module, locate the "MRI_64" node, and drag it onto the newly created "Xf1_Affine" node.
      3. fade between background and foreground to judge the alignment.
      4. for better visibility, you can change the colormaps of the two volumes, as used in the examples shown here. Switch to the Volumes module, select "MRI_58" and then select "Green" from the Lookup Table menu. Similarly select "Cyan" for "MRI_64".
  3. Compute BSpline Registration: return to the General Registration (BRAINS) module
    1. Input Images: Fixed Image Volume: MRI_58
    2. Input Images: Moving Image Volume: MRI_64
    3. Output Settings:
      1. Slicer BSpline Transform: Create and rename new. Rename to "MRI_64_Xf3"
      2. Slicer Linear Transform: set to none
      3. Output Image Volume: Create and rename new. Rename to "MRI_64_Xf3"
    4. Initialization: for the Initialization transform select the "Xf1_Affine" transform created above.
    5. Initialize Transform Mode: switch to Off
    6. Registration Phases: uncheck Rigid+Scale and Affine and select BSpline only
    7. Main Parameters:
      1. increase Number Of Samples to 400,000
      2. set B-Spline Grid Size to 5,5,3
    8. Leave all other settings at default
    9. click: Apply; runtime for this will be more than 1 minute, depending on CPU.
    10. check the result
      1. Place "MRI_58" in the background and "MRI_64_Xf3" in the foreground
  4. Apply and save transforms
    1. To apply the rigid and affine transforms you need not resample the volume. Simply drag the MRI_64 volume into the transform node (Xf1_Rigid or Xf2_Affine), and then right click on the "MRI_64" volume node and from the pop-up menu, select Harden Transform. This will apply the transform without resampling and move it back to the main hierarchy level. Note that now you have a reoriented volume although the name is the same. It is advisable to immediately rename the node to document this fact. Then save it as a new file under a new name.
    2. To apply the nonrigid transform resampling is required. You already have a resampled volume "MRI_64_Xf3" from above. This uses linear interpolation and float as default. You can change these settings under the Advanced Output Settings tab. For this example "short" as Pixel Type and "Windowed Sinc" is recommended. To obtain a new resampled copy without repeating the whole registration step, use the BRAINSResample module

Registration Results

RegLib C21 Unregistered.png before registration (click to enlarge)
RegLib C21 Rigid.png after rigid registration (click to enlarge)
RegLib C21 Affine.png after affine registration (click to enlarge)
RegLib C21 BSpline.png after BSpline registration (click to enlarge)
RegLib C21 registered.gif animated gif showing the progression of all 3 steps(click to enlarge)


Acknowledgments