Difference between revisions of "Projects:RegistrationLibrary:RegLib C41"

From NAMIC Wiki
Jump to: navigation, search
Line 3: Line 3:
 
[[Projects:RegistrationDocumentation:UseCaseInventory|Back to Registration Use-case Inventory]] <br>
 
[[Projects:RegistrationDocumentation:UseCaseInventory|Back to Registration Use-case Inventory]] <br>
  
= <small>v3.6.1</small> [[Image:Slicer3-6Announcement-v1.png‎|150px]]  Slicer Registration Library Case #41: Mouse Brain MRI follow-up=
+
= <small>v3.6.1</small> [[Image:Slicer3-6Announcement-v1.png‎|150px]]  Slicer Registration Library Case #41: Mouse Brain MRI control mice=
 
=== Input ===
 
=== Input ===
 
{| style="color:#bbbbbb; " cellpadding="10" cellspacing="0" border="0"
 
{| style="color:#bbbbbb; " cellpadding="10" cellspacing="0" border="0"
Line 10: Line 10:
 
|[[Image:RegLib_C41_Thumb2.png|150px|lleft|MRI follow-up]]  
 
|[[Image:RegLib_C41_Thumb2.png|150px|lleft|MRI follow-up]]  
 
|-
 
|-
|fixed image 1/target<br>MRI mouse baseline
+
|fixed image 1/target<br>MRI mouse #1
 
|
 
|
|moving image <br>MRI mouse follow-up
+
|moving image <br>MRI mouse #2
 
|}
 
|}
  
 
=== Modules ===
 
=== Modules ===
*'''Slicer 3.6.1 recommended modules:'''  [http://www.slicer.org/slicerWiki/index.php/Modules:BRAINSFit '''BrainsFit'''],   [http://www.slicer.org/slicerWiki/index.php/Modules:FastMarchingSegmentation-Documentation-3.6 '''Fast Marching Segmentation'''],  [http://www.slicer.org/slicerWiki/index.php/Modules:HistogramMatching-Documentation-3.6 '''Histogram Matching'''], [http://www.slicer.org/slicerWiki/index.php/Modules:ModelMaker-Documentation-3.6 '''Model Maker'''],
+
*'''Slicer 3.6.1 recommended modules:'''  [http://www.slicer.org/slicerWiki/index.php/Modules:BRAINSFit '''BrainsFit'''], [http://www.slicer.org/slicerWiki/index.php/Modules:Editor-Documentation-3.6 Editor], [http://www.slicer.org/slicerWiki/index.php/Modules:N4ITKBiasFieldCorrection-Documentation-3.6 N4 Bias Correction]
 
 
 
===Objective / Background ===
 
===Objective / Background ===
Aim is to register the brain of a 5 days old mouse (Post Natal Day 5, PND5) with an atlas.
+
Aim is to register the two brains of control mice to eachother.
 
=== Download ===
 
=== Download ===
 
*DATA
 
*DATA
**[[Media:RegLib_C41_Data.zip‎|'''Registration Library Case 41 '''<small> (Data & Solution Xforms,  zip file 90 MB) </small>]]
+
**[[Media:RegLib_C41_DATA.zip‎|'''Registration Library Case 41 '''<small> (Data & Solution Xforms,  zip file 81 MB) </small>]]
*PRESETS:
 
**[[Media:RegLib_C41_Presets.mrml‎|'''Registration Library Case 41:  Parameter Presets''' <small> (presets for bias correction, mask generation,  registration & resampling) 12kB, load via ''ImportScene..'') </small>]]
 
**<small>[[Projects:RegistrationDocumentation:ParameterPresetsTutorial|Link to User Guide: How to Load/Save Registration Parameter Presets]]</small>
 
 
*Documentation:
 
*Documentation:
 
**See detailed pipeline with parameter settings below
 
**See detailed pipeline with parameter settings below
Line 33: Line 29:
  
 
===Input Data===
 
===Input Data===
*reference/fixed MRI: 0.08 x 0.08 x 0.09 mm, 256 x 340 x 128
+
*reference/fixed MRI: 0.1 x 0.1 x 0.1 mm, 192 x 256 x 192
*moving MRI: 0.08 x 0.08 x 0.09 mm, 256 x 340 x 128
+
*moving MRI: 0.1 x 0.1 x 0.1 mm, 192 x 256 x 192
  
 
===Registration Challenges===
 
===Registration Challenges===
*The original images have very unusual dynamic range which can cause problems with modules that expect a minimal dynamic range in absolute terms
+
*The original images are not in standard RAS space, the orientation has axial and sagittal planes flipped
*target image content is of lower intensity than the surrounding tissue, making masking essential
+
*target image content is of low intensity and small compared to the surrounding tissue, making masking essential
  
 
===Key Strategies===
 
===Key Strategies===
Line 53: Line 49:
 
#when finished the 3 views should show, axial, sagittal and coronal views respectively (see result images).  
 
#when finished the 3 views should show, axial, sagittal and coronal views respectively (see result images).  
 
#save
 
#save
*'''Phase II: Brain Segmentation'''
+
*'''Phase II: Bias Field correction''
 +
#go to the  [http://www.slicer.org/slicerWiki/index.php/Modules:N4ITKBiasFieldCorrection-Documentation-3.6 N4 Bias Correction] module
 +
#select 11_5202 as input and create a new volume as output, renamed to 11_5202_b
 +
#increase iteration parameters to 50,40,40
 +
#click Apply
 +
#repeat for second image 11_5221
 +
#save
 +
*'''Phase III - Part 1: Brain Segmentation'''
 
#to obtain a usable mask for both images we first need to segment the two brains. You can use the mask for the first to speed up the second.
 
#to obtain a usable mask for both images we first need to segment the two brains. You can use the mask for the first to speed up the second.
 
#go to the ''Editor'' module and select the "Draw" tool
 
#go to the ''Editor'' module and select the "Draw" tool
Line 59: Line 62:
 
#save when finished
 
#save when finished
 
#repeat for the second brain. You can save time by duplicating the first mask and then manually align it to roughly match the second. Then resample.
 
#repeat for the second brain. You can save time by duplicating the first mask and then manually align it to roughly match the second. Then resample.
*'''Phase III: Affine Initial Alignment'''
+
*'''Phase III - Part 2: Brain mask for registration'''
#Go to the ''Data'' module, right-click on the "Scene" node and select "Insert Transform Node"
+
#It is useful for the registration mask to include the outer edges of the brain. Hence we enlarge the mask slightly to extend past this boundary
#select the new transform node and then rename it to "Xf1_ManualInit", in the ''MRML Node Inspector" (press return after typing)
+
#Go to the ''Editor'' module, select the "Master" and "Label" volume as for above
#in the ''Data'' module, move the MD2 volume (and model) inside the new transform node
+
#Click on the "Dilation" icon
#place the MD1 in the background and the MD2 image in the foreground
+
#check the "8-neighbor" box
#move the fade slider halfway to the middle so that you can see both volumes
+
#click apply 2-3 times, wait each time for the process to finish and verify that the labelmap mask does indeed grow.
#go to the ''Transforms'' module, move the translation & rotation sliders to get the two images/modules into approximate alignment. Since this serves as initialization only, alignment need not be perfect.
+
#repeat for the other volume
 +
#save under new name "_mask_dilated.nrrd" etc.
 
*'''Phase IV: Affine Registration'''
 
*'''Phase IV: Affine Registration'''
 
#you may be able to skip this step and perform affine + nonrigid registration in one step, however the stepwise approach gives you more insight and control
 
#you may be able to skip this step and perform affine + nonrigid registration in one step, however the stepwise approach gives you more insight and control
 
#Go to the ''BRAINSFit'' module
 
#Go to the ''BRAINSFit'' module
 
## enter the following settings:
 
## enter the following settings:
##Fixed Image: MD1, Moving Image: MD2
+
##Fixed Image: 11_5202, Moving Image: 11_5221
##Registration phases: from ''Initialize with previously generated transform', select "Xf1_ManualInit" node created before.
+
##Registration phases: check boxes for  ''Include Rigid registration phase'', ''Include Scale Versor3D registration phase''  ''Include Affine registration phase''.  
##Registration phases: check boxes for  ''Include Rigid registration phase'', ''Include Scale Versor3D registration phase''  ''Include Affine registration phase''. To combine with Phase V below also check the ''Include BSpline phase'' box.
+
##Output: Slicer Linear transform: create new, rename to "Xf1_Affine"
##Output: Slicer Linear transform: create new, rename to "Xf2_Affine_masked"
 
 
##Registration Parameters: increase ''Number Of Samples'' to 200,000
 
##Registration Parameters: increase ''Number Of Samples'' to 200,000
##Control Of Mask Processing Tab: check ''ROI'' box, ''Input Fixed Mask'' : MD1_fmseg; ''Input Moving Mask'': MD2_fmseg
+
##Registration Parameters: reduce "Transform Scale" to 400
 +
##Control Of Mask Processing Tab: check ''ROI'' box, for ''Input Fixed Mask'' and ''Input Moving Mask'' select the two dilated labelmaps from above
 
##Leave all other settings at default
 
##Leave all other settings at default
 
##click apply
 
##click apply
#go to ''Data'' module. You should see the "MD2" volume moved inside the "Xf2.." transform node
+
#go to ''Data'' module. You should see the "11_5221" volume moved inside the "Xf1.." transform node
 
*'''Phase V: Nonrigid Registration'''
 
*'''Phase V: Nonrigid Registration'''
 
#Go to the ''BRAINSFit'' module
 
#Go to the ''BRAINSFit'' module
 
##enter the following settings:
 
##enter the following settings:
##Fixed Image: MD1, Moving Image: MD2
+
##Fixed Image: 11_5202, Moving Image: 11_5221
 
##Registration phases: from ''Initialize with previously generated transform', select "Xf2_..." node created before.
 
##Registration phases: from ''Initialize with previously generated transform', select "Xf2_..." node created before.
 
##Registration phases: check boxes for  ''Include BSpline registration phase''
 
##Registration phases: check boxes for  ''Include BSpline registration phase''
##Output: Slicer BSpline transform: create new, rename to "Xf3_BSpline_masked"
+
##Output: Slicer BSpline transform: create new, rename to "Xf2_BSpline5"
##Output Image Volume:  create new, rename to "MD2_Xf3"; ''Pixel Type'': "short"
+
##Output Image Volume:  create new, rename to "11_5221_Xf2"; ''Pixel Type'': "short"
 
##Registration Parameters: increase ''Number Of Samples'' to 200,000; ''Number of Grid Subdivisions'': 5,5,5
 
##Registration Parameters: increase ''Number Of Samples'' to 200,000; ''Number of Grid Subdivisions'': 5,5,5
##Control Of Mask Processing Tab: check ''ROI'' box, ''Input Fixed Mask'' : MD1_fmseg; ''Input Moving Mask'': MD2_fmseg
+
##Control Of Mask Processing Tab: check ''ROI'' box, for ''Input Fixed Mask'' and ''Input Moving Mask'' select the two dilated labelmaps from above
 
##Leave all other settings at default
 
##Leave all other settings at default
 
##click apply
 
##click apply
#Extend of nonrigid alignment will depend on the application. For better match the gridsize can be increased to 9x9x9 and higher, along with the number of sample points. Because larger grid sizes bear the risk of unstable and unfeasible deformations, an iterative approach with increasing DOF is recommended. Since the current version (3.6.1) of Slicer does not yet support concatenation of nonrigid transforms, such a stepwise approach implies multiple resampling of the moving volume and associated interpolation blurring.
+
#Extend of nonrigid alignment will depend on the application. For better match the gridsize can be increased to 7x7x7 and higher, along with the number of sample points. Because larger grid sizes bear the risk of unstable and unfeasible deformations, an iterative approach with increasing DOF is recommended. Since the current version (3.6.1) of Slicer does not yet support concatenation of nonrigid transforms, such a stepwise approach implies multiple resampling of the moving volume and associated interpolation blurring.
 
=== Registration Results===
 
=== Registration Results===
 
[[Image:RegLib_C41_unreg.gif‎ |500px|original unregistered brains]] original, not registered<br>
 
[[Image:RegLib_C41_unreg.gif‎ |500px|original unregistered brains]] original, not registered<br>

Revision as of 18:55, 22 June 2011

Home < Projects:RegistrationLibrary:RegLib C41

Back to ARRA main page
Back to Registration main page
Back to Registration Use-case Inventory

v3.6.1 Slicer3-6Announcement-v1.png Slicer Registration Library Case #41: Mouse Brain MRI control mice

Input

MRI baseline lleft MRI follow-up
fixed image 1/target
MRI mouse #1
moving image
MRI mouse #2

Modules

Objective / Background

Aim is to register the two brains of control mice to eachother.

Download

Keywords

MRI, brain, mouse, masking, non-human, non-rigid,

Input Data

  • reference/fixed MRI: 0.1 x 0.1 x 0.1 mm, 192 x 256 x 192
  • moving MRI: 0.1 x 0.1 x 0.1 mm, 192 x 256 x 192

Registration Challenges

  • The original images are not in standard RAS space, the orientation has axial and sagittal planes flipped
  • target image content is of low intensity and small compared to the surrounding tissue, making masking essential

Key Strategies

Procedures

  • Phase I: Reorient to RAS space
  1. The original images have their header orientation info in a nonstandard form. As a consequence the image loads with sagittal and axial views switched. To fix we create a reorientation transform
  2. in the Data module, right click on the "Scene" node and select "Insert Transform" from the pulldown menu
  3. In the the MRML Node Inspector" below, rename the new transform to "Xf0_reorient" or similar.
  4. place/drag the image inside the transform node.
  5. go to the Transforms module & select "Xf0_reorient" from the menu
  6. change the identity matrix as shown in the image on the right. To modify an entry, select it via mouseclick, then hit ENTER.
  7. when finished the 3 views should show, axial, sagittal and coronal views respectively (see result images).
  8. save
  • 'Phase II: Bias Field correction
  1. go to the N4 Bias Correction module
  2. select 11_5202 as input and create a new volume as output, renamed to 11_5202_b
  3. increase iteration parameters to 50,40,40
  4. click Apply
  5. repeat for second image 11_5221
  6. save
  • Phase III - Part 1: Brain Segmentation
  1. to obtain a usable mask for both images we first need to segment the two brains. You can use the mask for the first to speed up the second.
  2. go to the Editor module and select the "Draw" tool
  3. in each slice, trace the brain contours and close with the ENTER key
  4. save when finished
  5. repeat for the second brain. You can save time by duplicating the first mask and then manually align it to roughly match the second. Then resample.
  • Phase III - Part 2: Brain mask for registration
  1. It is useful for the registration mask to include the outer edges of the brain. Hence we enlarge the mask slightly to extend past this boundary
  2. Go to the Editor module, select the "Master" and "Label" volume as for above
  3. Click on the "Dilation" icon
  4. check the "8-neighbor" box
  5. click apply 2-3 times, wait each time for the process to finish and verify that the labelmap mask does indeed grow.
  6. repeat for the other volume
  7. save under new name "_mask_dilated.nrrd" etc.
  • Phase IV: Affine Registration
  1. you may be able to skip this step and perform affine + nonrigid registration in one step, however the stepwise approach gives you more insight and control
  2. Go to the BRAINSFit module
    1. enter the following settings:
    2. Fixed Image: 11_5202, Moving Image: 11_5221
    3. Registration phases: check boxes for Include Rigid registration phase, Include Scale Versor3D registration phase Include Affine registration phase.
    4. Output: Slicer Linear transform: create new, rename to "Xf1_Affine"
    5. Registration Parameters: increase Number Of Samples to 200,000
    6. Registration Parameters: reduce "Transform Scale" to 400
    7. Control Of Mask Processing Tab: check ROI box, for Input Fixed Mask and Input Moving Mask select the two dilated labelmaps from above
    8. Leave all other settings at default
    9. click apply
  3. go to Data module. You should see the "11_5221" volume moved inside the "Xf1.." transform node
  • Phase V: Nonrigid Registration
  1. Go to the BRAINSFit module
    1. enter the following settings:
    2. Fixed Image: 11_5202, Moving Image: 11_5221
    3. Registration phases: from Initialize with previously generated transform', select "Xf2_..." node created before.
    4. Registration phases: check boxes for Include BSpline registration phase
    5. Output: Slicer BSpline transform: create new, rename to "Xf2_BSpline5"
    6. Output Image Volume: create new, rename to "11_5221_Xf2"; Pixel Type: "short"
    7. Registration Parameters: increase Number Of Samples to 200,000; Number of Grid Subdivisions: 5,5,5
    8. Control Of Mask Processing Tab: check ROI box, for Input Fixed Mask and Input Moving Mask select the two dilated labelmaps from above
    9. Leave all other settings at default
    10. click apply
  2. Extend of nonrigid alignment will depend on the application. For better match the gridsize can be increased to 7x7x7 and higher, along with the number of sample points. Because larger grid sizes bear the risk of unstable and unfeasible deformations, an iterative approach with increasing DOF is recommended. Since the current version (3.6.1) of Slicer does not yet support concatenation of nonrigid transforms, such a stepwise approach implies multiple resampling of the moving volume and associated interpolation blurring.

Registration Results

original unregistered brains original, not registered
affine registered brains affine registered
registered brains after 5x5x5 nonrigid BSpline alignment registered brains after 5x5x5 nonrigid BSpline alignment]
deformation visualized by grid overlay deformation visualized by grid overlay]