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

From NAMIC Wiki
Jump to: navigation, search
 
(39 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
[[Projects:RegistrationDocumentation:UseCaseInventory|Back to Registration Use-case Inventory]] <br>
 
[[Projects:RegistrationDocumentation:UseCaseInventory|Back to Registration Use-case Inventory]] <br>
  
= Slicer Registration Library Case #02: Intra-subject Brain MR FLAIR to MR T1 =
+
= <small>updated for '''v4.1'''</small> [[Image:Slicer4_RegLibLogo.png|150px]] <br>Slicer Registration Library Case #02: Intra-subject Brain MR FLAIR to MR T1 =
 +
=== Input ===
 
{| style="color:#bbbbbb; " cellpadding="10" cellspacing="0" border="0"
 
{| style="color:#bbbbbb; " cellpadding="10" cellspacing="0" border="0"
|[[Image:RLib02_SPGR+ICC.png|150px|lleft|this is a passive image to which the calculated transform is applied. It is a label-map in the same space as the moving FLAIR image]]
 
 
|[[Image:RLib02_SPGR.png|150px|lleft|this is the fixed reference image. All images are aligned into this space]]  
 
|[[Image:RLib02_SPGR.png|150px|lleft|this is the fixed reference image. All images are aligned into this space]]  
 
|[[Image:RegArrow_Affine.png|100px|lleft]]  
 
|[[Image:RegArrow_Affine.png|100px|lleft]]  
 
|[[Image:RLib02_FLAIR_150.png|150px|lleft|this is the moving image. The transform is calculated by matching this to the reference image]]
 
|[[Image:RLib02_FLAIR_150.png|150px|lleft|this is the moving image. The transform is calculated by matching this to the reference image]]
 
|-
 
|-
|mask image
 
 
|fixed image/target
 
|fixed image/target
 
|
 
|
 
|moving image
 
|moving image
 
|-
 
|-
|
+
|resampled labelmap<br>in reference space
|
 
 
|[[Image:ResampleArrow_Affine.png|100px|lleft]]  
 
|[[Image:ResampleArrow_Affine.png|100px|lleft]]  
 
|[[Image:RLib02_FLAIR+LesionSeg_150.png|150px|lleft|this is a passive image to which the calculated transform is applied. It is a label-map in the same space as the moving FLAIR image]]
 
|[[Image:RLib02_FLAIR+LesionSeg_150.png|150px|lleft|this is a passive image to which the calculated transform is applied. It is a label-map in the same space as the moving FLAIR image]]
 
|-
 
|-
|
+
|result
|
 
 
|resample
 
|resample
 
|segmentation labelmap
 
|segmentation labelmap
 
|}
 
|}
  
<!--
+
=== Slicer 4.1 Modules ===
COMMENTED OUT: OLD FORMAT TABLE
+
*[http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/BRAINSFit General Registration (BRAINS)]
{| style="color:#bbbbbb; background-color:#333333;" cellpadding="10" cellspacing="0" border="0"
+
*[http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/BRAINSResample Resample Image (BRAINS)]
|[[Image:RLib02_SPGR.png|150px|lleft|this is the fixed reference image. All images are aligned into this space]]
 
|[[Image:RLib02_SPGR+ICC.png|150px|lleft|this is a passive image to which the calculated transform is applied. It is a label-map in the same space as the moving FLAIR image]]
 
|[[Image:Arrow_left_gray.jpg|100px|lleft]]
 
|[[Image:RLib02_FLAIR_150.png|150px|lleft|this is the moving image. The transform is calculated by matching this to the reference image]]
 
|[[Image:RLib02_FLAIR+LesionSeg_150.png|150px|lleft|this is a passive image to which the calculated transform is applied. It is a label-map in the same space as the moving FLAIR image]]
 
|align="left"|LEGEND<br><small><small>
 
[[Image:Button_red_fixed.jpg|20px|lleft]]  this indicates the reference image that is fixed and does not move. All other images are aligned into this space and resolution<br>
 
[[Image:Button_green_moving.jpg|20px|lleft]]  this indicates the moving image that determines the registration transform.  <br>
 
[[Image:Button_purple_mask.jpg|20px|lleft]] this indicates images that serve as masks, i.e. they focus the active registration onto a specific area.<br>
 
[[Image:Button_blue_tag.jpg|20px|lleft]] this indicates images that passively move into the reference space, i.e. they have the transform applied but do not contribute to the calculation of the transform.
 
</small></small>
 
|-
 
|T1 SPGR
 
|[[Image:Button_purple_mask.jpg|40px|lleft]]  mask
 
|
 
|
 
|[[Image:Button_green_moving.jpg|40px|lleft]] T2 FLAIR
 
|[[Image:Button_blue_tag.jpg|40px|lleft]] segmentation
 
|-
 
|1mm isotropic<br> 256 x 256 x 146<br>RAS
 
|1mm isotropic<br> 256 x 256 x 146<br>RAS
 
|
 
|1.2mm isotropic<br> 256 x 256 x 116<br>RAS
 
|1.2mm isotropic<br> 256 x 256 x 116<br>RAS
 
|}
 
 
 
-->
 
 
 
=== Modules ===
 
*'''Slicer 3.6 recommended modules:  [http://www.slicer.org/slicerWiki/index.php/Modules:BRAINSFit BrainsFit], [http://www.slicer.org/slicerWiki/index.php/Modules:RegisterImagesMultiRes-Documentation-3.6 Robust Multiresolution Affine]'''
 
  
 
===Objective / Background ===
 
===Objective / Background ===
This scenario occurs in many forms whenever we wish to align all the series from a single MRI exam/session into a common space. Alignment is necessary because the subject likely has moved in between series. As additional files we have a mask for the fixed/reference image and a labelmap for the moving image we need to move along .
+
This scenario occurs in many forms whenever we wish to align all the series from a single MRI exam/session into a common space. Alignment is necessary because the subject likely has moved in between series. As additional files we have a labelmap for the moving image we need to move along .
  
 
=== Keywords ===
 
=== Keywords ===
 
MRI, brain, head, intra-subject, FLAIR, T1, defacing, masking, labelmap, segmentation
 
MRI, brain, head, intra-subject, FLAIR, T1, defacing, masking, labelmap, segmentation
 +
 +
=== Download ===
 +
*Data:
 +
**[[Media:RegLib_C02_Data.zip‎|'''Registration Library Case 02: MSBrain intra-subject multi-contrast''' <small> (Data, Presets & Solution Xforms, zip file 19 MB) </small>]]
 +
*ScreenCast Movies:
 +
**[[Media:RegLib_C02_Registration.mov|registration via BRAINS<small> (quicktime movie 12 MB </small>]]
 +
**[[Media:RegLib_C02_Resample.mov|resampling the labelmap with the computed affine transform<small> (quicktime movie 12 MB </small>]]
  
 
===Input Data===
 
===Input Data===
 
*reference/fixed : T1 SPGR , 1x1x1 mm voxel size, 256 x 256 x 146, sagittal,  
 
*reference/fixed : T1 SPGR , 1x1x1 mm voxel size, 256 x 256 x 146, sagittal,  
*mask: skull stripping labelmap obtained from above SPGR
 
 
*moving: T2 FLAIR 1.2x1.2x1.2 mm voxel size, sagittal
 
*moving: T2 FLAIR 1.2x1.2x1.2 mm voxel size, sagittal
 
*tag: segmentation labelmap obtained from above FLAIR, to be resampled with result transform
 
*tag: segmentation labelmap obtained from above FLAIR, to be resampled with result transform
Line 76: Line 49:
 
*we know the underlying structure/anatomy did not change, but the two distinct acquisition types may contain different amounts of distortion
 
*we know the underlying structure/anatomy did not change, but the two distinct acquisition types may contain different amounts of distortion
 
*the T1 high-resolution had a "defacing" applied, i.e. part of the image containing facial features was removed to ensure anonymity. The FLAIR is lower resolution and contrast and did not need this. The sharp edges and missing information in part of the image may cause problems.
 
*the T1 high-resolution had a "defacing" applied, i.e. part of the image containing facial features was removed to ensure anonymity. The FLAIR is lower resolution and contrast and did not need this. The sharp edges and missing information in part of the image may cause problems.
*we have a skull stripping label map of the fixed image (T1) that we can use to mask out the non-brain part of the image and prevent it from actively participating in the registration.
 
 
*we have one or more label-maps attached to the moving image that we also want to align.
 
*we have one or more label-maps attached to the moving image that we also want to align.
 
*the different series have different dimensions, voxel size and field of view. Hence the choice of which image to choose as the reference becomes important. The additional image data present in one image but not the other may distract the algorithm and require masking.
 
*the different series have different dimensions, voxel size and field of view. Hence the choice of which image to choose as the reference becomes important. The additional image data present in one image but not the other may distract the algorithm and require masking.
Line 83: Line 55:
  
 
===Key Strategies===
 
===Key Strategies===
*'''Slicer 3.6 recommended modules:  [http://www.slicer.org/slicerWiki/index.php/Modules:BRAINSFit BrainsFit], [http://www.slicer.org/slicerWiki/index.php/Modules:RegisterImagesMultiRes-Documentation-3.6 Robust Multiresolution Affine]'''
 
 
*we use an affine transform with 12 DOF (rather than a rigid one) to address distortion differences between the two protocols
 
*we use an affine transform with 12 DOF (rather than a rigid one) to address distortion differences between the two protocols
 
*we choose the SPGR as the anatomical reference. Unless there are overriding reasons, always use the highest resolution image as your fixed/reference, to avoid loosing data through the registration.
 
*we choose the SPGR as the anatomical reference. Unless there are overriding reasons, always use the highest resolution image as your fixed/reference, to avoid loosing data through the registration.
*the defacing of the SPGR image introduces sharp edges that can be detrimental. We apply a multiresolution scheme at least. If this fails we mask that area or better still the brain. As a general rulle, if you have the mask available, use it.
+
 
*because of the contrast differences and the defacing we use '''Mutual Information''' as the cost function.
 
*because of the combined effects of rotational misalignment, defacing, pathology and contrast differences, we use a multi-resolution approach (Register Images MultiRes).
 
 
=== Procedures ===
 
=== Procedures ===
'''with  BrainsFit''':
+
*'''Phase I: register FLAIR to T1'''
#download example dataset
+
#open the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/BRAINSFit General Registration (BRAINS) module]
#load into 3DSlicer 3.6
+
##''Fixed Image Volume'': T1
#open Registration : ''BrainsFit'' module
+
##''Moving Image Volume'': FLAIR
#Input Parameters: set SPGR as fixed and FLAIR as moving image
+
##Output Settings:  
#Registration Phases:  
+
###''Slicer BSpline Transform": none
##select ''Initialize with CenterofHeadAlign''
+
###''Slicer Linear Transform'': create new transform, rename to "Xf1_Affine"
##select ''Include Rigid registration phase''
+
###''Output Image Volume'': create new volume,  rename to "FLAIR_Xf1"
##select  "Include Affine registration phase"
+
##''Registration Phases'': check boxes for ''Rigid'' and ''Affine''
#Output Settings: select "New Linear Transform" under ''Output Transform''
+
##''Main Parameters'':
#accept all other defaults & click apply
+
###''Number Of Samples'': 200,000
#program will automatically move FLAIR image  under the result transform; also manually move the labelmap
+
##Leave all other settings at default
#right click on either image and select ''Harden Transform'' to apply & resample
+
##click: Apply; runtime < 10 sec (MacPro QuadCore 2.4GHz)
#save result images/scene
+
*'''Phase II: Resample labelmap'''
<br>
+
#go to [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/BRAINSResample ''Resample Image (BRAINS)'' module] (in the Registration menu)
'''with MultiresolutionAffine''':
+
##''Image To Warp'': LesionSeg
#download example dataset
+
##''Reference Image'': T1
#load into 3DSlicer 3.6
+
##''Output Image'': create new & rename: LesionSeg_Xf1
#open Registration : ''RobustAffineMultiresolution'' module
+
##''Pixel Type'': uchar or binary
#set SPGR as fixed and FLAIR as moving image
+
##''Warp By Transform'':  Xf1_Affine created in Phase I above
#accept all defaults & click apply
+
##''Interpolation Mode'': '''Nearest Neighbor'''
#go to ''Data'' module and move FLAIR and labelmap under the result transform
+
##''Apply''
#right click on either image and select ''Harden Transform'' to apply & resample
+
#go to [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/Volumes ''Volumes''] module
#save result images/scene
+
##''Active Volume'': LesionSeg_Xf1
 
+
##click/open the ''Volume Information'' tab
for more details see the tutorial under Downloads
+
##check the ''LabelMap'' checkbox.
 +
*more details in the ScreenCast movies in the download section above.
  
 
=== Registration Results===
 
=== Registration Results===
 
[[Image:RegLib_C02_Unreg_AnimGif.gif|500px|Unregistered Data + segmentation labelmap]] unregistered <br>
 
[[Image:RegLib_C02_Unreg_AnimGif.gif|500px|Unregistered Data + segmentation labelmap]] unregistered <br>
[[Image:RegLib_C02_Result_AnimGif.gif|500px|Robust Multiresolution Registration Result: FLAIR + segmentation aligned with SPGR]] : registered w. Multiresolution affine <br>
+
[[Image:RegLib_C02_registered.gif|500px|Robust Multiresolution Registration Result: FLAIR + segmentation aligned with SPGR]] : registered w. Multiresolution affine <br>
[[Image:RegLib_C02_AGif_BrainsFit.gif‎|500px|BrainsFit Result: FLAIR aligned with SPGR]]: registered w. BrainsFit <br>
+
<br>
 
 
=== Download ===
 
[[Image:under-construction_icon.jpg|right|100px|this case is still under active development. Comments and priority requests welcome to the slicer-users mailing list]]
 
*[[Media:RegLib_C02_DATA.zip‎|'''Registration Library Case 02: MSBrain intra-subject multi-contrast: FLAIR+lesion segmentation to SPGR + mask''' <small> (Data,Presets, Solution, zip file 27 MB) </small>]]
 
*download/view guided video tutorial
 
*download power point tutorial
 
*[[Media:RegInstr_RegUC-001.txt‎|download step-by step text instructions (text only)]]
 
 
 
 
 
[[Projects:RegistrationDocumentation:ParameterPresetsTutorial|Link to User Guide: How to Load/Save Registration Parameter Presets]]
 

Latest revision as of 13:36, 11 June 2012

Home < Projects:RegistrationLibrary:RegLib C02

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

updated for v4.1 Slicer4 RegLibLogo.png
Slicer Registration Library Case #02: Intra-subject Brain MR FLAIR to MR T1

Input

this is the fixed reference image. All images are aligned into this space lleft this is the moving image. The transform is calculated by matching this to the reference image
fixed image/target moving image
resampled labelmap
in reference space
lleft this is a passive image to which the calculated transform is applied. It is a label-map in the same space as the moving FLAIR image
result resample segmentation labelmap

Slicer 4.1 Modules

Objective / Background

This scenario occurs in many forms whenever we wish to align all the series from a single MRI exam/session into a common space. Alignment is necessary because the subject likely has moved in between series. As additional files we have a labelmap for the moving image we need to move along .

Keywords

MRI, brain, head, intra-subject, FLAIR, T1, defacing, masking, labelmap, segmentation

Download

Input Data

  • reference/fixed : T1 SPGR , 1x1x1 mm voxel size, 256 x 256 x 146, sagittal,
  • moving: T2 FLAIR 1.2x1.2x1.2 mm voxel size, sagittal
  • tag: segmentation labelmap obtained from above FLAIR, to be resampled with result transform

Registration Challenges

  • the amount of misalignment is small. Subject did not leave the scanner in between the two acquisitions, but we have some head movement.
  • we know the underlying structure/anatomy did not change, but the two distinct acquisition types may contain different amounts of distortion
  • the T1 high-resolution had a "defacing" applied, i.e. part of the image containing facial features was removed to ensure anonymity. The FLAIR is lower resolution and contrast and did not need this. The sharp edges and missing information in part of the image may cause problems.
  • we have one or more label-maps attached to the moving image that we also want to align.
  • the different series have different dimensions, voxel size and field of view. Hence the choice of which image to choose as the reference becomes important. The additional image data present in one image but not the other may distract the algorithm and require masking.
  • hi-resolution datasets may have defacing applied to one or both sets, and the defacing-masks may not be available
  • the different series have different contrast. The T1 contains good contrast between white (WM) and gray matter (GM) , and pathology appears as hypointense. The FLAIR on the other hand shows barely any WM/GM contrast and the pathology appears very dominantly as hyperintense.

Key Strategies

  • we use an affine transform with 12 DOF (rather than a rigid one) to address distortion differences between the two protocols
  • we choose the SPGR as the anatomical reference. Unless there are overriding reasons, always use the highest resolution image as your fixed/reference, to avoid loosing data through the registration.

Procedures

  • Phase I: register FLAIR to T1
  1. open the General Registration (BRAINS) module
    1. Fixed Image Volume: T1
    2. Moving Image Volume: FLAIR
    3. Output Settings:
      1. Slicer BSpline Transform": none
      2. Slicer Linear Transform: create new transform, rename to "Xf1_Affine"
      3. Output Image Volume: create new volume, rename to "FLAIR_Xf1"
    4. Registration Phases: check boxes for Rigid and Affine
    5. Main Parameters:
      1. Number Of Samples: 200,000
    6. Leave all other settings at default
    7. click: Apply; runtime < 10 sec (MacPro QuadCore 2.4GHz)
  • Phase II: Resample labelmap
  1. go to Resample Image (BRAINS) module (in the Registration menu)
    1. Image To Warp: LesionSeg
    2. Reference Image: T1
    3. Output Image: create new & rename: LesionSeg_Xf1
    4. Pixel Type: uchar or binary
    5. Warp By Transform: Xf1_Affine created in Phase I above
    6. Interpolation Mode: Nearest Neighbor
    7. Apply
  2. go to Volumes module
    1. Active Volume: LesionSeg_Xf1
    2. click/open the Volume Information tab
    3. check the LabelMap checkbox.
  • more details in the ScreenCast movies in the download section above.

Registration Results

Unregistered Data + segmentation labelmap unregistered
Robust Multiresolution Registration Result: FLAIR + segmentation aligned with SPGR : registered w. Multiresolution affine