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

From NAMIC Wiki
Jump to: navigation, search
 
(5 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://www.slicer.org/slicerWiki/index.php/Modules:SkullStripperModule '''Skull Stripping Module'''][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/DiffusionTensorEstimation Diffusion Tensor Estimation module]
 +
* [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/BRAINSFit General Registration (BRAINS) module]
 +
* [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/ResampleDTI Resample DTI Volume module]
  
 
===Objective / Background ===
 
===Objective / Background ===
Line 24: 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:
 
**See detailed pipeline with parameter settings below
 
  
 
=== Keywords ===
 
=== Keywords ===
Line 46: 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 preprocessing steps: 1. reduce the bias field inhomogeneity in the reference T1 and 2. obtain a skull-stripping / brain mask for 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
 
*The DWI is already isotropic and hence no resampling is required before obtaining the DTI
 
*The DWI is already isotropic and hence no resampling is required before obtaining the DTI
Line 60: Line 55:
  
 
=== Procedures ===
 
=== Procedures ===
*note: for guidance on obtaining the DTI estimate from the DWI see [http://www.slicer.org/slicerWiki/index.php/Modules:DiffusionTensorEstimation-Documentation-3.6 here] or the tutorials for [[Projects:RegistrationLibrary:RegLib_C27| Library case #27]]
+
*'''Phase I: Preprocessing: Build DWI mask + baseline'''
*'''Phase I: LOAD DATA'''
+
#open the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/DiffusionWeightedMasking ''Modules:Diffusion:DiffusionWeightedImages:DiffusionWeightedVolumeMasking'' ] module
#download example dataset
+
##''Input DWI Volume'': "DWI"
#load into 3DSlicer 3.6.1 (Load Scene)
+
##''Output Baseline Volume'': ''Create New Volume'', rename to "DWI_baseline"
:Note that the main data package does not contain the DWI. Please load separately from the second Data download package.
+
##''Output Threshold Mask'': ''Create New Volume'', rename to "DWI_mask"
 +
##Leave other settings at default; click ''Apply''
 +
*'''Phase II: Preprocessing: Convert DWI -> DTI'''
 +
#open [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/DiffusionTensorEstimation "Diffusion Tensor Estimation" module] (menu: Diffusion:DiffusionWeightedImages: DiffusionTensorEstimation)
 +
##''Input DWI Volume'': DWI  
 +
##''Output DTI Volume'': create new, rename to "DTI"
 +
##''Output Baseline Volume'': create new, rename to "DWI_baseline"
 +
#Click: Apply
 
*'''Phase II: Bias Correction of T1'''
 
*'''Phase II: Bias Correction of T1'''
#open Filtering : ''N4ITK MRI Bias Field Correction'' module
+
#The T1 image has strong intensity inhomogeneity from coil sensitivity. We need to correct this first
##Input: T1
+
##open the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/N4ITKBiasFieldCorrection  Filtering : ''N4ITK MRI Bias Field Correction'' module]
##Output: create new volume, rename to T1_bc
+
##''Input Image'': T1
##Use presets or set parameters: ''BSpline grid'': 2,2,2 ; ''Shrink Factor'': 4
+
##''Mask Image'': none
 +
##''Output Volume'': create new volume, rename to T1_n4
 +
##leave rest at defaults
 
##Click: Apply
 
##Click: Apply
##the bias-corrected image will be of type 'float'; to save memory convert to 'uint':
+
*'''Phase III: Affine pre-registration'''
#Open ''Cast Image'' module
+
#open the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/BRAINSFit General Registration (BRAINS) module]
##Input: T1_bc, Output: T1_bc
+
##''Fixed Image Volume'': T1_n4
##Output Type: unsigned short
+
##''Moving Image Volume'': DWI_baseline
*'''Phase III: Skull Stripping'''
+
##Output Settings:  
#Open "Skull Skull Stripper for Structural MR'': This is an extension module. If you have never used it before you need to load it first via the extension manager
+
###''Slicer BSpline Transform": none
##Click on the gear wheel icon to the right of the ''Modules'' menu. Select the ''Skull Stripper'' module and click download and install. Save prelim. work and then restart Slicer to load
+
###''Slicer Linear Transform'': create new transform, rename to "Xf1_DWI-T1_Affine"
##use presets or choose the following settings: Input Volume: T1_bc ; Brain Mask: create new, rename to "T1_mask"; Subdivisions: 20, Dilation Radius: 1
+
###''Output Image Volume'': create new volume,  rename to "DWI_baseline_Xf1" (we use this for validation only)
*'''Phase IV: Affine Registration'''
+
##''Registration Phases'': check boxes for ''Rigid'' , ''Rigid+Scale'' and ''Affine''
#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
+
##''Main Parameters'':
#Go to the ''BRAINSFit'' module
+
###''Number Of Samples'': 200,000
##use presets ''Xf1_DTI-T1_masked_Aff1'' or enter the following settings:
+
##''Mask Option'': select ''ROIAUTO'' button
##Fixed Image: T1_bc, Moving Image: DTI_base
+
###''(ROIAUTO) Output fixed mask'': create new volume , rename to "T1_mask_ROIauto"
##Registration phases: check boxes for ''Include Rigid registration phase'', ''Include Scale Versor3D registration phase'' ''Include Affine registration phase''
+
###''(ROIAUTO) Output moving mask'': create new volume, rename to "DWI_mask_ROIauto"
##Output: Slicer Linear transform: create new, rename to "Xf1_DTI-T1_masked"
 
##Registration Parameters: increase ''Number Of Samples'' to 200,000
 
##Control Of Mask Processing Tab: check ''ROI'' box, ''Input Fixed Mask'' : T1_mask; ''Input Moving Mask'': DTI_mask
 
 
##Leave all other settings at default
 
##Leave all other settings at default
##click apply; runtime ca. 1-2 min.
+
##click: Apply; runtime < 1 min (MacPro QuadCore 2.4GHz)
#go to ''Data'' module. You will see the "DTI_base" volume moved inside the "Xf1.." transform node
+
##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
#select T1_bc as background and DTI_base as foreground and check the alignment via the toggle switch
+
*'''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'''
 
*'''Phase V: Nonrigid Registration'''
#Go to the ''BRAINSFit'' module
+
#open the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/BRAINSFit General Registration (BRAINS) module]
##use presets ''Xf2_DTI-T1_BSpl'' or enter the following settings:
+
##''Fixed Image Volume'': T1_n4
##Fixed Image: T1_bc, Moving Image: DTI_base
+
##''Moving Image Volume'': DWI_baseline
##Registration phases: check boxes for  ''Include BSpline registration phase''
+
##Output Settings:  
##Output: Slicer BSpline transform: create new, rename to "Xf2_DTI-T1_BSpl"
+
###''Slicer BSpline Transform": create new transform, rename to "Xf2_DWI-T1_BSpline"
##Output Image Volume: create new, rename to "DTI_base_Xf2"; ''Pixel Type'': "short"
+
###''Slicer Linear Transform'': none
##Registration Parameters: increase ''Number Of Samples'' to 200,000; ''Number of Grid Subdivisions'': 3,3,3
+
###''Output Image Volume'': create new volume, rename to "DWI_baseline_Xf2"  
##Control Of Mask Processing Tab: check ''ROI'' box, ''Input Fixed Mask'' : T1_mask; ''Input Moving Mask'': DTI_mask
+
##''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 ca. 1-2 min.
+
##click: Apply
 
*'''Phase VI: Resample DTI'''
 
*'''Phase VI: Resample DTI'''
#Open the ''Resample DTI Volume'' module (found under: All Modules)
+
#Open the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/ResampleDTI ''Resample DTI Volume'' module (found under: All Modules)]
##Input Volume: select DTI
+
##''Input Volume'': DTI
##Output Volume: select ''New DTI Volume'', rename to ''DTI_Xf2''
+
##''Output Volume'': select ''New DTI Volume'', rename to ''DTI_Xf2''
##Reference Volume: select ''T1''
+
##''Reference Volume'': T1
##Transform Parameters: select transform "Xf2_DTI-T1''
+
##Transform Parameters:  
##check box: ''output-to-input''
+
###''Transform Node'':  Xf2_DTI-T1
 +
###check box: '''displacement'''
 
##Leave all other settings at defaults
 
##Leave all other settings at defaults
##Click Apply; runtime 3-4 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_C30_AGif_reg.gif‎ |500px|Registered DTI superimposed on T1]] registered<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