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

From NAMIC Wiki
Jump to: navigation, search
 
(17 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>
  
= <small>v3.6.1</small> [[Image:Slicer3-6Announcement-v1.png‎|150px]] Slicer Registration Library Case #30: Intra-subject Brain DTI =
+
= <small>updated for '''v4.1'''</small> [[Image:Slicer4_RegLibLogo.png|150px]] <br> Slicer Registration Library Case #30: Intra-subject Brain DTI =
 
=== Input ===
 
=== Input ===
 
{| style="color:#bbbbbb; " cellpadding="10" cellspacing="0" border="0"
 
{| style="color:#bbbbbb; " cellpadding="10" cellspacing="0" border="0"
Line 17: Line 17:
 
|}
 
|}
  
=== Modules ===
+
=== Slicer4 Modules used ===
*'''Slicer 3.6.1 recommended modules:  [http://www.slicer.org/slicerWiki/index.php/Modules:BRAINSFit BrainsFit]'''
+
* [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/DiffusionTensorEstimation Diffusion Tensor Estimation module]
*'''Slicer 3.6.1 recommended modules:  [http://www.slicer.org/slicerWiki/index.php/Modules:SkullStripperModule|Skull Stripping Module]'''
+
* [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/BRAINSFit General Registration (BRAINS) module]
*'''Slicer 3.6.1 recommended modules:  [http://www.slicer.org/slicerWiki/index.php/Modules:N4ITKBiasFieldCorrection-Documentation-3.6|N4 MRI Bias Field Correction]'''
+
* [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/ResampleDTI Resample DTI Volume module]
  
 
===Objective / Background ===
 
===Objective / Background ===
Line 26: Line 26:
  
 
=== Download ===
 
=== Download ===
*DATA
+
*[[Media:RegLib_C30_Data.zip‎|'''Registration Library Case 30 '''<small> (Data & Solution Xforms, incl. DTI,  zip file 111 MB) </small>]]
**[[Media:RegLib_C30_Data.zip‎|'''Registration Library Case 30 (registration set)  '''<small> (Data & Solution Xforms, incl. DTI,  zip file 18 MB) </small>]]
 
**[[Media:RegLib_C30_Data2.zip‎|'''Registration Library Case 30 (DWI+resampled DTI set)  '''<small> (original DWI + resampled DTI only, zip file 53 MB) </small>]]
 
*PRESETS:
 
**[[Media:RegLib_C30_Presets.mrml‎|'''Registration Library Case 30:  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:
 
**[[Media:RegLib_C30_DTI.ppt| Powerpoint Tutorial (.ppt PowerPoint file, 1.5 MB)]]
 
**[[Media:RegLib_C30_DTI.pdf| Powerpoint Tutorial as PDF (PDF file 2.1 MB)]]
 
  
 
=== Keywords ===
 
=== Keywords ===
Line 49: Line 41:
  
 
===Key Strategies===
 
===Key Strategies===
*'''Slicer 3.6.1 recommended modules:  [http://www.slicer.org/slicerWiki/index.php/Modules:BRAINSFit BrainsFit]
+
*the DWI needs to be converted to a DTI and a mask and baseline obtained
*to align the DTI with the T1 we need 2 registration steps: 1.align the T2 with the T1 and 2. align the DTI with the T2. The DTI baseline scan has contrast most similar to the T2 and hence is best registered against the T2. However the structural reference scan with highest resolution and tissue contrast is the T1.
+
*to align the DTI with the T1 we need 2 preprocessing steps: 1. reduce the bias field inhomogeneity in the reference T1 and 2. obtain a skull-stripping / brain mask for the T1
*we therefore use the following approach: 1) we first co-register the T2 with the SPGR T1.  2) we register the DTI baseline to the  registered/resampled T2;  3) resample the DTI volume with the new transform
+
*The DWI is already isotropic and hence no resampling is required before obtaining the DTI
 
*the DTI-T2 registration includes non-rigid deformation to correct for the strong distortions from the EPI acquisition. Because of the nonrigid component a mask of the brain parenchyma helps greatly in obtaining a meaningful transform.  
 
*the DTI-T2 registration includes non-rigid deformation to correct for the strong distortions from the EPI acquisition. Because of the nonrigid component a mask of the brain parenchyma helps greatly in obtaining a meaningful transform.  
*The DTI estimation provides an automated mask for the DTI_baseline scan, but we have no mask for the T2. We can either obtain one through separate segmentation or by sending the DTI_mask through an additional registration step. In this example we show the latter.
+
*The DTI estimation provides an automated mask for the DTI_baseline scan, but we have no mask for the T1. We can either obtain one through separate segmentation or by sending the DTI_mask through an additional registration step. We use the former here.
 
*thus the full pipeline is this:
 
*thus the full pipeline is this:
:#Affine align T2-T1, incl. resampled T2 volume = T2r
+
:#Bias Field Correction of T1 -> T1_bc
:#Affine+BSpline align of DTI_baseline to T2r (unmasked)
+
:#Skull Stripping of T1_bc
:#Resample DTI_mask with above BSpline -> mask for the T2r
+
:#DWI -> DTI estimation (incl. DTI_base and DT_mask output)
:#repeat Affine+BSpline align of DTI_base to T2r, WITH masks
+
:#Affine registration of DTI_baseline to T1_bc, unmasked
 +
:#non-rigid (BSpline) registration of DTI_baseline to T1_bc, masked, using above affine as starting pose
 
:#resample DTI with result Affine+BSpline transform
 
:#resample DTI with result Affine+BSpline transform
  
 
=== Procedures ===
 
=== Procedures ===
*'''Phase I: LOAD DATA'''
+
*'''Phase I: Preprocessing: Build DWI mask + baseline'''
#download example dataset
+
#open the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/DiffusionWeightedMasking ''Modules:Diffusion:DiffusionWeightedImages:DiffusionWeightedVolumeMasking'' ] module
#load into 3DSlicer 3.6.1 (Load Scene)
+
##''Input DWI Volume'': "DWI"
#To convert the DWI into a DTI: use the ''Converters / DICOM to NRRD Converter'' module
+
##''Output Baseline Volume''''Create New Volume'', rename to "DWI_baseline"
*'''Phase II: Register T2 to T1'''
+
##''Output Threshold Mask'': ''Create New Volume'', rename to "DWI_mask"
#open Registration : ''BrainsFit'' module
+
##Leave other settings at default; click ''Apply''
##Registration Phases:  
+
*'''Phase II: Preprocessing: Convert DWI -> DTI'''
##select/check ''Include Rigid registration phase''
+
#open [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/DiffusionTensorEstimation "Diffusion Tensor Estimation" module] (menu: Diffusion:DiffusionWeightedImages: DiffusionTensorEstimation)
##select/check ''Include Affine registration phase''
+
##''Input DWI Volume'': DWI
##select a new transform ''Output Transform''
+
##''Output DTI Volume'': create new, rename to "DTI"
#Registration Parameters: increase ''Number Of Samples'' to 200,000
+
##''Output Baseline Volume'': create new, rename to "DWI_baseline"
#Leave all other settings at default
+
#Click: Apply
#click apply; runtime ca. 1-2 min.
+
*'''Phase II: Bias Correction of T1'''
#Resample T2 into T1 space
+
#The T1 image has strong intensity inhomogeneity from coil sensitivity. We need to correct this first
##Open ''Resample Scalar/Vector/DWI Volume'' module (Filtering menu)
+
##open the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/N4ITKBiasFieldCorrection  Filtering : ''N4ITK MRI Bias Field Correction'' module]
##Input Volume: T2, Reference Volume: T1
+
##''Input Image'': T1
##Output Volume: create new volume, rename to "T2_Xf1"
+
##''Mask Image'': none
##Interpolation Type: select ''ws'' (windowed sinc)
+
##''Output Volume'': create new volume, rename to T1_n4
##Click Apply.
+
##leave rest at defaults
##Upon completion, go to ''Volumes'' module to adjust window & level
+
##Click: Apply
##Active Volume: select T2_Xf1
+
*'''Phase III: Affine pre-registration'''
##Open Display tab and adjust window & level, e.g. 1300/700
+
#open the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/BRAINSFit General Registration (BRAINS) module]
*'''Phase III:REGISTER DTI TO T2_Xf1'''
+
##''Fixed Image Volume'': T1_n4
#open Registration : ''BrainsFit'' module
+
##''Moving Image Volume'': DWI_baseline
##Registration Phases:
 
##set T2_Xf1 as fixed and DTI_baseline as moving image
 
###select/check ''Include Rigid registration phase''
 
###select/check ''Include Affine registration phase''
 
###select/check ''Include BSpline registration phase''
 
###select ''Include Rigid registration phase''
 
###select ''Include Affine registration phase''
 
###select ''Include BSpline registration phase''
 
 
##Output Settings:  
 
##Output Settings:  
###select a new transform "Slicer BSpline Transform", rename to "Xf2_DTI-T1_unmasked"
+
###''Slicer BSpline Transform": none
###select a new volume "Output Image Volume'', rename to "DT_base_Xf2"
+
###''Slicer Linear Transform'': create new transform, rename to "Xf1_DWI-T1_Affine"
##Registration Parameters: increase ''Number Of Samples'' to 200,000
+
###''Output Image Volume'': create new volume, rename to "DWI_baseline_Xf1" (we use this for validation only)
##Registration Parameters: set  ''Number Of Grid Subdivisions'' to 5,5,3
+
##''Registration Phases'': check boxes for ''Rigid'' , ''Rigid+Scale'' and ''Affine''
 +
##''Main Parameters'':
 +
###''Number Of Samples'': 200,000
 +
##''Mask Option'': select ''ROIAUTO'' button
 +
###''(ROIAUTO) Output fixed mask'': create new volume , rename to "T1_mask_ROIauto"
 +
###''(ROIAUTO) Output moving mask'': create new volume, rename to "DWI_mask_ROIauto"
 +
##Leave all other settings at default
 +
##click: Apply; runtime < 1 min (MacPro QuadCore 2.4GHz)
 +
##this should generate a first alignment and also 2 masks. We already have a DWI mask, so we care not  about "DWI_mask_ROIauto", but we will use the T1_mask_ROIauto" output to edit/cleanup and use as mask in the subsequent nonrigid registration
 +
*'''Phase IV: T1 mask'''
 +
#open the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/Editor Editor module]
 +
#select  "T1_mask_ROIauto" as the volume to edit
 +
#select the ''Erosion'' tool and click ''Apply'' until all of the segmented skull areas are removed
 +
#select the ''Brush'' tool and manually fill in missing areas. Note that this need not be extremely accurate along the edges, since it will serve as a registration mask. To skip this step load the "T1_mask_edit.nrrd" file from the downloaded dataset.
 +
*'''Phase V: Nonrigid Registration'''
 +
#open the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/BRAINSFit General Registration (BRAINS) module]
 +
##''Fixed Image Volume'': T1_n4
 +
##''Moving Image Volume'': DWI_baseline
 +
##Output Settings:
 +
###''Slicer BSpline Transform": create new transform, rename to "Xf2_DWI-T1_BSpline"
 +
###''Slicer Linear Transform'': none
 +
###''Output Image Volume'': create new volume,  rename to "DWI_baseline_Xf2"
 +
##''Registration Phases'': check boxes for ''BSpline'' only
 +
##''Main Parameters'':
 +
###''Number Of Samples'': 200,000
 +
###''B-Spline Grid Size'': 5,5,5
 +
##''Mask Option'': select ''ROI'' button
 +
###''ROI Masking input fixed'': select  " "T1_mask_ROIauto" or "T1_mask_edit" edited in phase III above
 +
###''ROI Masking input moving'':  select  "DWI_mask" created in phase I above
 
##Leave all other settings at default
 
##Leave all other settings at default
##click: Apply; runtime < 1 min.
 
*'''Phase IV: Resample DTI_mask'''
 
**we use the above Xform to produce a mask for the T1.
 
#Open ''Resample Scalar/Vector/DWI Volume'' module
 
##Input Volume: DTI_mask; Output volume: create new volume, rename to "DTI_mask_Xf2"
 
##Transform Node:  "Xf2_DTI-T1_unmasked"
 
##select/check:  ''output-to-input''
 
##Interpolation Type: select: '''nn'''
 
 
##click: Apply
 
##click: Apply
*'''Phase V:REGISTER DTI TO T2_Xf1 with masking'''
 
#open Registration : ''BrainsFit'' module
 
##Registration Phases: as before: rigid, affine, BSpline
 
##set T2_Xf1 as fixed and DTI_baseline as moving image
 
##All parameters as in Phase III
 
##Output BSpline Transform: create new , rename to "Xf3_DTI-T1_masked"
 
##Output Volume: create new, rename to "DTI_base_Xf3"
 
##Control of Mask Processing
 
###select/check: ''ROI'' (rightmost box)
 
###Input Fixed Mask: select "DTI_mask_Xf2"
 
###Input Moving Mask: select "DTI_mask"
 
##click: Apply; runtime < 1 min.
 
 
*'''Phase VI: Resample DTI'''
 
*'''Phase VI: Resample DTI'''
#Load the combined transform (''Add Data'')
+
#Open the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/ResampleDTI ''Resample DTI Volume'' module (found under: All Modules)]
#Open the ''Resample DTI Volume'' module (found under: All Modules)
+
##''Input Volume'': DTI
##Input Volume: select DTI
+
##''Output Volume'': select ''New DTI Volume'', rename to ''DTI_Xf2''
##Output Volume: select ''New DTI Volume'', rename to ''DTI_Xf2''
+
##''Reference Volume'': T1
##Reference Volume: select ''T1''
+
##Transform Parameters:  
##Transform Parameters: select transform "Xf2_DTI-T1''
+
###''Transform Node'':  Xf2_DTI-T1
##check box: ''output-to-input''
+
###check box: '''displacement'''
 
##Leave all other settings at defaults
 
##Leave all other settings at defaults
##Click Apply; runtime < 1 min.
+
##Click Apply; runtime 1-2 min.
#Go to the ''Volumes'' module, select the newly produced ''DTI_Xf2'' volume
+
#set ''T1_n4'' as background and new  ''DTI_Xf2'' volume as foreground
#under the ''Display'' tab, select ''Color Orientation'' from the ''Scalar Mode'' menu
+
#Set fade slider to see DTI overlay onto the T1 image. You should see something similar to the animated gif shown in the result section below.
#set ''T1'' as background and new  ''DTI_Xf2'' volume as foreground
 
#Set fade slider to see DTI overlay onto the SPGR image
 
 
 
for more details see the tutorial(s) under Downloads
 
  
 
=== Registration Results===
 
=== Registration Results===
[[Image:RegLib_C29_AGif_full.gif|500px|Registered DTI superimposed on SPGR and T2]] registered (cycles show T1 and T2 and color DTI overlay)<br>
+
[[Image:RegLib_C30_AGif_reg.gif‎ |500px|Registered DTI superimposed on T1]] registered<br>
 
<br>
 
<br>

Latest revision as of 20:54, 8 May 2012

Home < Projects:RegistrationLibrary:RegLib C30

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 #30: Intra-subject Brain DTI

Input

this is the fixed reference image. All images are aligned into this space lleft this is the DTI Baseline scan, to be registered with the T1 this is the DTI tensor image, in the same orientation as the DTI Baseline
fixed image/target
T1
moving image 2a
DTI baseline
moving image 2b
DTI tensor

Slicer4 Modules used

Objective / Background

This is a common case of a DTI exam with no T2 available as structural reference and a T1 that has strong field inhomogeneity. We wish to spatially align the DTI to the anatomical reference scan (T1-SPGR).

Download

Keywords

MRI, brain, head, intra-subject, DTI, T1, non-rigid,

Input Data

  • reference/fixed : T1 , 1x1x1.1 mm voxel size, 256 x 256 x 193
  • moving: DTI baseline: 2.5 x 2.5 x 2.5 mm, 128 x 112 x 44
  • moving DTI tensor: : 2.5 x 2.5 x 2.5 mm, 128 x 112 x 44 x 9 (tensor), original: DWI 256 x 256 x 41 x 36 directions

Registration Challenges

  • The DTI sequence (EPI) has a low resolution, a clipped FOV and distortions we seek to correct via non-rigid alignment
  • the DTI baseline is similar in contrast to a T2, but we have only a T1 as structural reference

Key Strategies

  • the DWI needs to be converted to a DTI and a mask and baseline obtained
  • to align the DTI with the T1 we need 2 preprocessing steps: 1. reduce the bias field inhomogeneity in the reference T1 and 2. obtain a skull-stripping / brain mask for the T1
  • The DWI is already isotropic and hence no resampling is required before obtaining the DTI
  • the DTI-T2 registration includes non-rigid deformation to correct for the strong distortions from the EPI acquisition. Because of the nonrigid component a mask of the brain parenchyma helps greatly in obtaining a meaningful transform.
  • The DTI estimation provides an automated mask for the DTI_baseline scan, but we have no mask for the T1. We can either obtain one through separate segmentation or by sending the DTI_mask through an additional registration step. We use the former here.
  • thus the full pipeline is this:
  1. Bias Field Correction of T1 -> T1_bc
  2. Skull Stripping of T1_bc
  3. DWI -> DTI estimation (incl. DTI_base and DT_mask output)
  4. Affine registration of DTI_baseline to T1_bc, unmasked
  5. non-rigid (BSpline) registration of DTI_baseline to T1_bc, masked, using above affine as starting pose
  6. resample DTI with result Affine+BSpline transform

Procedures

  • Phase I: Preprocessing: Build DWI mask + baseline
  1. open the Modules:Diffusion:DiffusionWeightedImages:DiffusionWeightedVolumeMasking module
    1. Input DWI Volume: "DWI"
    2. Output Baseline Volume: Create New Volume, rename to "DWI_baseline"
    3. Output Threshold Mask: Create New Volume, rename to "DWI_mask"
    4. Leave other settings at default; click Apply
  • Phase II: Preprocessing: Convert DWI -> DTI
  1. open "Diffusion Tensor Estimation" module (menu: Diffusion:DiffusionWeightedImages: DiffusionTensorEstimation)
    1. Input DWI Volume: DWI
    2. Output DTI Volume: create new, rename to "DTI"
    3. Output Baseline Volume: create new, rename to "DWI_baseline"
  2. Click: Apply
  • Phase II: Bias Correction of T1
  1. The T1 image has strong intensity inhomogeneity from coil sensitivity. We need to correct this first
    1. open the Filtering : N4ITK MRI Bias Field Correction module
    2. Input Image: T1
    3. Mask Image: none
    4. Output Volume: create new volume, rename to T1_n4
    5. leave rest at defaults
    6. Click: Apply
  • Phase III: Affine pre-registration
  1. open the General Registration (BRAINS) module
    1. Fixed Image Volume: T1_n4
    2. Moving Image Volume: DWI_baseline
    3. Output Settings:
      1. Slicer BSpline Transform": none
      2. Slicer Linear Transform: create new transform, rename to "Xf1_DWI-T1_Affine"
      3. Output Image Volume: create new volume, rename to "DWI_baseline_Xf1" (we use this for validation only)
    4. Registration Phases: check boxes for Rigid , Rigid+Scale and Affine
    5. Main Parameters:
      1. Number Of Samples: 200,000
    6. Mask Option: select ROIAUTO button
      1. (ROIAUTO) Output fixed mask: create new volume , rename to "T1_mask_ROIauto"
      2. (ROIAUTO) Output moving mask: create new volume, rename to "DWI_mask_ROIauto"
    7. Leave all other settings at default
    8. click: Apply; runtime < 1 min (MacPro QuadCore 2.4GHz)
    9. this should generate a first alignment and also 2 masks. We already have a DWI mask, so we care not about "DWI_mask_ROIauto", but we will use the T1_mask_ROIauto" output to edit/cleanup and use as mask in the subsequent nonrigid registration
  • Phase IV: T1 mask
  1. open the Editor module
  2. select "T1_mask_ROIauto" as the volume to edit
  3. select the Erosion tool and click Apply until all of the segmented skull areas are removed
  4. select the Brush tool and manually fill in missing areas. Note that this need not be extremely accurate along the edges, since it will serve as a registration mask. To skip this step load the "T1_mask_edit.nrrd" file from the downloaded dataset.
  • Phase V: Nonrigid Registration
  1. open the General Registration (BRAINS) module
    1. Fixed Image Volume: T1_n4
    2. Moving Image Volume: DWI_baseline
    3. Output Settings:
      1. Slicer BSpline Transform": create new transform, rename to "Xf2_DWI-T1_BSpline"
      2. Slicer Linear Transform: none
      3. Output Image Volume: create new volume, rename to "DWI_baseline_Xf2"
    4. Registration Phases: check boxes for BSpline only
    5. Main Parameters:
      1. Number Of Samples: 200,000
      2. B-Spline Grid Size: 5,5,5
    6. Mask Option: select ROI button
      1. ROI Masking input fixed: select " "T1_mask_ROIauto" or "T1_mask_edit" edited in phase III above
      2. ROI Masking input moving: select "DWI_mask" created in phase I above
    7. Leave all other settings at default
    8. click: Apply
  • Phase VI: Resample DTI
  1. Open the Resample DTI Volume module (found under: All Modules)
    1. Input Volume: DTI
    2. Output Volume: select New DTI Volume, rename to DTI_Xf2
    3. Reference Volume: T1
    4. Transform Parameters:
      1. Transform Node: Xf2_DTI-T1
      2. check box: displacement
    5. Leave all other settings at defaults
    6. Click Apply; runtime 1-2 min.
  2. set T1_n4 as background and new DTI_Xf2 volume as foreground
  3. Set fade slider to see DTI overlay onto the T1 image. You should see something similar to the animated gif shown in the result section below.

Registration Results

Registered DTI superimposed on T1 registered