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

From Slicer Wiki
Jump to: navigation, search
 
(6 intermediate revisions by the same user not shown)
Line 13: Line 13:
  
 
==Description ==
 
==Description ==
This shows registration of an fMRI baseline scan to a structural reference T1. The fMRI suffers from low SNR and bad distortions we seek to correct.
+
This is an example of inter-subject registration; we seek to align a group atlas image with a structural reference T1.  
'''Approach''': we first compute a rigid alignment of the fMRI to the T1. We then expand this to a nonrigid transform, which we constrain either by explicit limits on the absolute deformation amount or via a mask. Constraints are necessary because the skull present in the T1 would otherwise negatively affect the registration result.
+
'''Approach''': we first compute an affine alignment of the atlas to the T1. We then proceed to nonrigid registrations of higher and higher DOF, stopping at the DOF where deformations become unreasonable. We can constrain the deformation by either explicit limits on the absolute deformation amount or via a mask. Constraints become increasingly critical as DOF increases.
  
 
== Modules used ==
 
== Modules used ==
 
*[[Documentation/Nightly/Modules/BRAINSFit| ''General Registration (BRAINS)'']]
 
*[[Documentation/Nightly/Modules/BRAINSFit| ''General Registration (BRAINS)'']]
*[[Documentation/Nightly/Modules/Editor| ''Editor'']]
 
*[[Documentation/Nightly/Modules/SwissSkullStripper| ''SwissSkullStripper'']]
 
  
 
== Download (from NAMIC MIDAS) ==
 
== Download (from NAMIC MIDAS) ==
 
<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>
 
<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=116858 '''RegLib_C09.mrb''': input data only, use this to run the tutorial from the start <small>(Slicer mrb file. 40 MB). </small>]
+
*[http://slicer.kitware.com/midas3/download/?items=116868 '''RegLib_C10.mrb''': input data only, use this to run the tutorial from the start <small>(Slicer mrb file. 12 MB). </small>]
*[http://slicer.kitware.com/midas3/download/?items=116857 '''RegLib_C09_full.mrb''': includes raw data + all solutions and intermediate files, use to browse/verify <small>(Slicer mrb file. 182 MB). </small>]
+
*[http://slicer.kitware.com/midas3/download/?items=116867 '''RegLib_C10_full.mrb''': includes raw data + all solutions and intermediate files, use to browse/verify <small>(Slicer mrb file. 50 MB). </small>]
  
 
== Keywords ==
 
== Keywords ==
MRI, fMRI, brain, head, intra-subject
+
MRI, atlas, brain, head, inter-subject
  
 
== Video Screencasts ==
 
== Video Screencasts ==
#[[Media:RegLib_C09_1_Rigid+BSpline.mov|Movie/screencast showing rigid + BSpline registration]]
+
#[[Media:RegLib_C10_Affine+BSpline.mov|Movie/screencast showing rigid + BSpline registration]]
#[[Media:RegLib_C09_2_SwissSkullStripper.mov|Movie/screencast showing installation and use of the "SwissSkullStripper" for generating a T1 mask]]
 
#[[Media:RegLib_C09_3_BSpline_masked.mov|Movie/screencast showing an alternative BSpline registration using masks instead of an explicit deformation limit]]
 
  
 
== Procedure ==
 
== Procedure ==
#'''Rigid Registration''': register fMRI to T1 [[Media:RegLib_C09_1_Rigid+BSpline.mov|(screencast for this step)]]
+
#'''Affine Registration''': register atlas to T1  
 
##open the [[Documentation/Nightly/Modules/BRAINSFit|''General Registration (BRAINS)'' module]]
 
##open the [[Documentation/Nightly/Modules/BRAINSFit|''General Registration (BRAINS)'' module]]
##''Fixed Image Volume'': T1 (SPGR)
+
##''Fixed Image Volume'': T1ref
##''Moving Image Volume'': fMRI
+
##''Moving Image Volume'': Atlas
 
##Output Settings:  
 
##Output Settings:  
 
###''Slicer BSpline Transform": none
 
###''Slicer BSpline Transform": none
###''Slicer Linear Transform'': create & rename new transform: Xf1_Rigid.tfm
+
###''Slicer Linear Transform'': create & rename new transform: Xf1_Affine.tfm
 
###''Output Image Volume'': none
 
###''Output Image Volume'': none
##''Registration Phases'': check box for ''Rigid''
+
##''Registration Phases'': check box for "Rigid"', "Rigid+Scale" and "Affine"
 
##''Main Parameters''
 
##''Main Parameters''
 
###'''Number of Samples''': 200,000
 
###'''Number of Samples''': 200,000
 
##click: Apply; runtime < 10 sec (MacPro QuadCore 2.4GHz)
 
##click: Apply; runtime < 10 sec (MacPro QuadCore 2.4GHz)
 
#'''Nonrigid BSpline Registration'''
 
#'''Nonrigid BSpline Registration'''
##''Fixed Image Volume'': T1 SPGR
+
##open the [[Documentation/Nightly/Modules/BRAINSFit|''General Registration (BRAINS)'' module]]
##''Moving Image Volume'': fMRI
+
##''Fixed Image Volume'': T1ref
 +
##''Moving Image Volume'': Atlas
 
###''Slicer BSpline Transform": create & rename new transform: Xf2_BSpline.tfm
 
###''Slicer BSpline Transform": create & rename new transform: Xf2_BSpline.tfm
 
##''Slicer Linear Transform'': none
 
##''Slicer Linear Transform'': none
###''Output Image Volume'': create & rename new: fMRI_Xf2
+
###''Output Image Volume'': create & rename new: Atlas_Xf2
##''Initialization Transform'':select "Xf1_Rigid" created above
+
##''Initialization Transform'':select "Xf1_Affine" created above
 
##''Initialization Transform Mode'': off
 
##''Initialization Transform Mode'': off
 
##''Registration Phases'': uncheck boxe for ''Rigid''  and instead check ''BSpline''
 
##''Registration Phases'': uncheck boxe for ''Rigid''  and instead check ''BSpline''
##''Main Parameters'': '''Number of Samples''': 200,000
+
##''Main Parameters'': '''Number of Samples''': 300,000
##''Advanced Output Settings'': '''Maximum B-Spline Displacement''': 3
+
##''BSpline Grid Size'':5,5,3
 
##click: Apply
 
##click: Apply
 
+
#'''Increasing DOF'''
'''Alternate Option: Masking'''
+
##repeat the above with a larger BSpline grid:
#if not yet present, install the [[Documentation/Nightly/Modules/SwissSkullStripper| ''SwissSkullStripper'']] module: [[Media:RegLib_C09_2_SwissSkullStripper.mov|(screencast for this step)]]
+
###''Slicer BSpline Transform": create & rename new transform: Xf3_BSpline2.tfm
##open the [[Documentation/Nightly/SlicerApplication/ExtensionsManager| ''ExtensionsManager'']] [[Image:ExtensionManagerIcon.png|50px]]
+
###''Output Image Volume'': create & rename new: Atlas_Xf3
##locate the ''SwissSkullStripper" extension (under segmentation). Click on the "Install" button
+
##''Initialization Transform'':select "Xf1_Affine" created above
##you will need to restart Slicer to complete the installation. '''Make sure to save all your work before restarting.'''
+
##''Initialization Transform Mode'': off
##upon restart, reload the data and open the [[Documentation/Nightly/Modules/SwissSkullStripper| ''SwissSkullStripper'']] module (under Segmentation)
+
##''Main Parameters'': '''Number of Samples''': 400,000
##You will need to download an atlas image and its mask. Link is here: [[Documentation/Nightly/Modules/SwissSkullStripper| ''SwissSkullStripper'']]
+
##''BSpline Grid Size'':7,7,5
##''Atlas Volume'': select the atlas image you downloaded.
+
##click: Apply
##''Atlas Mask Volume'': select the atlas mask image you downloaded.
+
#''further increase DOF'': you can continue exploring how far the direct approach (from Affine direct to high DOF BSpline) remains stable, by increasing the BSpline grid size until results become too distorted. Alternatively you can use the lower DOF result (e.g. Atlas_Xf2) as input to the next higher DOF transform. This enables a stable progression to higher DOF, but it also includes multiple resampling and accompanied data loss from interpolation blurring.
##''Patient Volume'': select the T1 SPGR
 
##''Patient Output Volume'': create and rename new: "T1_stripped" or similar
 
##''Patient Mask Label'': : create and rename new: "T1_mask"
 
##''Apply''
 
##go to the [[Documentation/Nightly/Modules/Editor| ''Editor'']]
 
##''Merge Volume'': "T1_mask"
 
##select the "Dilation" tool. Click "Apply" 2-3 times to extend the mask beyond the brain surface
 
#'''Build Mask for fMRI''': [[Media:RegLib_C09_3_BSpline_masked.mov|(screencast for this step)]]
 
##open the [[Documentation/Nightly/Modules/Editor| ''Editor'']]
 
##''Master Volume'': fMRI
 
##''Merge Volume'': create new: fMRI_label
 
##select the ''Threshold tool'', reduce threshold until entire brain is selected.
 
##click "Apply"
 
##select the "Dilation" tool. Click "Apply" 2-3 times to extend the mask beyond the brain surface
 
#'''Masked BSpline Registration''': [[Media:RegLib_C09_3_BSpline_masked.mov|(screencast for this step)]] 
 
##repeat the BSpline registration above, with the following changes:
 
##Turn off the deformation Limit: ''Advanced Output Settings'': '''Maximum B-Spline Displacement''': '''0'''
 
##''Mask Option'': select ''ROI'' button
 
###''ROI Masking input fixed'': select  "T1_mask" generated above
 
###''ROI Masking input moving'':  select  "fMRI_mask" generated above
 
##Apply
 
  
 
==Registration Results==
 
==Registration Results==
  
 
{|cellpadding="10" cellspacing="0" border="0"
 
{|cellpadding="10" cellspacing="0" border="0"
|[[Image:RegLib_C09_unregistered.png|300px]]  unregistered (click to enlarge)
+
|[[Image:RegLib_C10_unregistered.png|300px]]  unregistered (click to enlarge)
 +
|-
 +
|[[Image:RegLib_C10_registered1_Affine.png|300px]] after affine registration (click to enlarge)<br>
 +
|[[Image:RegLib_C10_registered2_Affine.gif|300px]] after affine registration (click to enlarge)
 
|-
 
|-
|[[Image:RegLib_C09_registered1_rigid.gif|300px]] after rigid registration (click to enlarge)
+
|[[Image:RegLib_C10_registered3_BSpline.gif|300px]] after nonrigid BSpline (5x5x3)  registration (click to enlarge)
 
|-
 
|-
|[[Image:RegLib_C09_registered2_BSpline.gif|300px]] after nonrigid BSpline registration (click to enlarge)
+
|[[Image:RegLib_C10_registered4_BSpline2.gif|300px]] after nonrigid BSpline (7x7x5)  registration (click to enlarge)
 
|}
 
|}
  
 
=== Acknowledgments ===
 
=== Acknowledgments ===

Latest revision as of 18:51, 4 September 2013

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

Back to Registration Library

Slicer Registration Library Case #10: group atlas to structural MRI

Input

this is the fixed reference image. All images are aligned into this space
RegArrow NonRigid.png
this is the moving target image, to be aligned with the reference image on the left
fixed image/target
T1
moving image
group atlas

Description

This is an example of inter-subject registration; we seek to align a group atlas image with a structural reference T1. Approach: we first compute an affine alignment of the atlas to the T1. We then proceed to nonrigid registrations of higher and higher DOF, stopping at the DOF where deformations become unreasonable. We can constrain the deformation by either explicit limits on the absolute deformation amount or via a mask. Constraints become increasingly critical as DOF increases.

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, atlas, brain, head, inter-subject

Video Screencasts

  1. Movie/screencast showing rigid + BSpline registration

Procedure

  1. Affine Registration: register atlas to T1
    1. open the General Registration (BRAINS) module
    2. Fixed Image Volume: T1ref
    3. Moving Image Volume: Atlas
    4. Output Settings:
      1. Slicer BSpline Transform": none
      2. Slicer Linear Transform: create & rename new transform: Xf1_Affine.tfm
      3. Output Image Volume: none
    5. Registration Phases: check box for "Rigid"', "Rigid+Scale" and "Affine"
    6. Main Parameters
      1. Number of Samples: 200,000
    7. click: Apply; runtime < 10 sec (MacPro QuadCore 2.4GHz)
  2. Nonrigid BSpline Registration
    1. open the General Registration (BRAINS) module
    2. Fixed Image Volume: T1ref
    3. Moving Image Volume: Atlas
      1. Slicer BSpline Transform": create & rename new transform: Xf2_BSpline.tfm
    4. Slicer Linear Transform: none
      1. Output Image Volume: create & rename new: Atlas_Xf2
    5. Initialization Transform:select "Xf1_Affine" created above
    6. Initialization Transform Mode: off
    7. Registration Phases: uncheck boxe for Rigid and instead check BSpline
    8. Main Parameters: Number of Samples: 300,000
    9. BSpline Grid Size:5,5,3
    10. click: Apply
  3. Increasing DOF
    1. repeat the above with a larger BSpline grid:
      1. Slicer BSpline Transform": create & rename new transform: Xf3_BSpline2.tfm
      2. Output Image Volume: create & rename new: Atlas_Xf3
    2. Initialization Transform:select "Xf1_Affine" created above
    3. Initialization Transform Mode: off
    4. Main Parameters: Number of Samples: 400,000
    5. BSpline Grid Size:7,7,5
    6. click: Apply
  4. further increase DOF: you can continue exploring how far the direct approach (from Affine direct to high DOF BSpline) remains stable, by increasing the BSpline grid size until results become too distorted. Alternatively you can use the lower DOF result (e.g. Atlas_Xf2) as input to the next higher DOF transform. This enables a stable progression to higher DOF, but it also includes multiple resampling and accompanied data loss from interpolation blurring.

Registration Results

RegLib C10 unregistered.png unregistered (click to enlarge)
RegLib C10 registered1 Affine.png after affine registration (click to enlarge)
RegLib C10 registered2 Affine.gif after affine registration (click to enlarge)
RegLib C10 registered3 BSpline.gif after nonrigid BSpline (5x5x3) registration (click to enlarge)
RegLib C10 registered4 BSpline2.gif after nonrigid BSpline (7x7x5) registration (click to enlarge)

Acknowledgments