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

From NAMIC Wiki
Jump to: navigation, search
(Created page with 'Back to ARRA main page <br> Back to Registration main page <br> [[Projects:RegistrationDocumentation:UseCaseInv…')
 
 
(27 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 Exampe #33: Diffusion Weighted Image Volume: align with structural reference MRI ==
+
==<small>updated for '''v4.1'''</small> [[Image:Slicer4_RegLibLogo.png|150px]] <br> Slicer Registration Library Case #33: Diffusion Weighted Image Volume: align with structural reference MRI ==
  
 
=== Input ===
 
=== Input ===
 
{| style="color:#bbbbbb; " cellpadding="10" cellspacing="0" border="0"
 
{| style="color:#bbbbbb; " cellpadding="10" cellspacing="0" border="0"
|[[Image:RegLib27_T1c.png|150px|lleft|this is the fixed T1 reference image. All images are aligned into this space]]  
+
|[[Image:RegLib_C33_Thumb1.png|150px|lleft|this is the fixed T1 reference image. All images are aligned into this space]]  
|[[Image:RegLib27_FLAIR.png|150px|lleft|this is the fixed T2 reference image. All images are aligned into this space]]  
+
|[[Image:RegLib_C33_Thumb2.png|150px|lleft|this is the FLAIR scan, to be registered with the T1]]
 +
|[[Image:RegArrow_Affine_Right.png|100px|lleft]]
 +
|[[Image:RegLib_C33_Thumb3.png|150px|lleft|this is the T1Gd image, serves as reference to which all others are aligned]]
 
|[[Image:RegArrow_NonRigid.png|100px|lleft]]  
 
|[[Image:RegArrow_NonRigid.png|100px|lleft]]  
|[[Image:RegLib27_DTIbaseline.png|150px|lleft|this is the DTI Baseline scan, to be registered with the T1]]
+
|[[Image:RegLib_C33_Thumb4.png|150px|lleft|this is the DTI tensor image, to be registered with the T1]]
|[[Image:RegLib27_DTI.png|150px|lleft|this is the DTI tensor image, in the same orientation as the DTI Baseline]]
 
 
|-
 
|-
 
|fixed image/target<br>T1
 
|fixed image/target<br>T1
|fixed image/target<br>FLAIR
+
|moving image<br>FLAIR
 +
|
 +
|moving image 2a<br>T1Gd
 
|
 
|
|moving image 2a<br>DTI baseline
 
 
|moving image 2b<br>DTI tensor
 
|moving image 2b<br>DTI tensor
 
|}
 
|}
  
=== 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/DiffusionWeightedMasking DiffusionWeightedVolumeMasking module]
 +
* [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 27: Line 32:
 
=== Keywords ===
 
=== Keywords ===
 
MRI, brain, head, intra-subject, DTI, DWI
 
MRI, brain, head, intra-subject, DTI, DWI
 +
 +
===Download ===
 +
*[[Media:RegLib_C33_Data.zip‎ ‎|'''RegLib_C33_Data''':  Raw starting set: DWI, T1, T1Gd, FLAIR <small> (NRRD files, zip file 137 MB) </small>]]'''
 +
*[[Media:RegLib_C33_DataSuppl.zip‎ ‎|'''RegLib_C33_DataSuppl''':  all processed results & solution transforms  <small> (NRRD files, zip file 141 MB) </small>]]'''
  
 
===Input Data===
 
===Input Data===
*reference/fixed : T1 axial, 0.98 x 0.98 x 1  ,  192 x 256 x 176  
+
*reference/fixed : T1 axial, 0.5 x 0.5 x 1  ,  512 x 512 x 176  
*reference/fixed : FLAIR axial, 0.4mm resolution in plane, 4mm slices,  448 x 512 x 30
+
*moving : FLAIR axial
*moving: Baseline image of acquired DTI volume, corresponds to T2w MRI , 1.96 x 1.96 x 3 mm voxel size, oblique,  128 x 128 x 40
+
*moving : T1Gd axial
*moving: Tensor data of DTI volume, oblique, same orientation as Baseline image. The result Xform will be applied to this volume. The original DWI has 64 directions, the extracted DTI volume has 9 scalars, i.e. 128 x 128 x 40 x 9
+
*moving: Tensor data of DWI volume, 32 directions, 2.6 mm slice thickness
  
 
=== Overall Strategy ===
 
=== Overall Strategy ===
:#Register FLAIR to T1 (affine) & resample
+
*The best target for registering the DWI in terms of contrast is the FLAIR
:#Resample DWI to isotropic voxel size: use T1 as size reference
+
*however the FLAIR is low resolution. The T1 is very high in-plane resolution, which causes memory issues when trying to resample the DTI to that resolution. So we choose the T1Gd as the reference space and resolution (1x1x1 mm).
:#Convert DWI -> DTI, incl. mask & baseline extraction
+
*Thus the main strategy is:
:#Register DTI_baseline to FLAIR (affine+nonrigid) w/o masking
+
:#Obtain mask and baseline from DWI  
:#Resample DTI with above transform
+
:#Compute DTI from DWI
 +
:#Register FLAIR and T1 to T1Gd (affine only) '''with''' masking (Affine)
 +
:#Register DWI_baseline to the resampled FLAIR (affine+nonrigid) (masking)
 +
:#Resample the DTI with above transform and the T1Gd as reference
 +
 
 +
----
 +
 
 +
[[Projects:RegistrationLibrary:RegLib_C33_v36|For an alternative approach using '''Slicer 3.6''' see here]]
  
 
=== Procedures ===
 
=== Procedures ===
*'''Phase I: register FLAIR to T1'''
+
=== Procedures ===
#open Registration : ''BrainsFit'' module (presets: Xf1_FLAIR-T2)
+
*'''Phase I: Preprocessing: Build DWI mask + baseline'''
##Registration Phases:  
+
#open the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/DiffusionWeightedMasking ''Modules:Diffusion:DiffusionWeightedImages:DiffusionWeightedVolumeMasking'' ] module  
##set T1 as fixed and FLAIR as moving image
+
##''Input DWI Volume'': "DWI"
###select/check ''Include Rigid registration phase''
+
##''Output Baseline Volume'':  ''Create New Volume'', rename to "DWI_baseline"
###select/check ''Include Affine registration phase''
+
##''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_iso,
 +
##''Output DTI Volume'': create new, rename to "DTI_iso"
 +
##''Output Baseline Volume'': create new, rename to "DWI_iso_baseline"
 +
#Click: Apply
 +
*'''Phase III: register FLAIR to T1Gd'''
 +
#open the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/BRAINSFit General Registration (BRAINS) module]
 +
##''Fixed Image Volume'': FLAIR
 +
##''Moving Image Volume'': T1
 
##Output Settings:  
 
##Output Settings:  
###select a new transform "Output Transform", rename to "Xf1_FLAIR-T1"
+
###''Slicer BSpline Transform'': none
###select a new volume "Output Image Volume'', rename to "FLAIR_Xf1"
+
###''Slicer Linear Transform'': create new transform, rename to "Xf1_FLAIR-T1Gd_Affine"
##Registration Parameters: increase ''Number Of Samples'' to 200,000
+
###''Output Image Volume'': create new volume, rename to "FLAIR_Xf1"
 +
##''Registration Phases'': check boxes for  ''Affine'' only
 +
##''Main Parameters'':
 +
###''Number Of Samples'': 200,000
 +
##''Mask Option'': select ''ROIAUTO'' button
 +
###''(ROIAUTO) Output fixed mask'': create new volume
 +
###''(ROIAUTO) Output moving mask'': create new volume
 
##Leave all other settings at default
 
##Leave all other settings at default
##click: Apply; runtime < 1 min.
 
 
##click: Apply
 
##click: Apply
*'''Phase II: Resample DWI to isotropic voxel size'''
+
*'''Phase IV: register T1 to T1Gd'''
#go to ''Filtering / Resample Scalar/Vector/DWI'' module
+
#open the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/BRAINSFit General Registration (BRAINS) module]
#Input Volume: "DWI", Reference Volume: "T1", Output Volume: "create new Diffusion Weighted Volume", rename to "DWI_iso"
+
##''Fixed Image Volume'': T1Gd
#Click: Apply
+
##''Moving Image Volume'': T1
#save new DWI_iso to disk
+
##Output Settings:  
#depending on RAM of your machine, consider deleting the original DWI node
+
###''Slicer BSpline Transform'': none
*'''Phase III: DWI -> DTI'''
+
###''Slicer Linear Transform'': create new transform, rename to "Xf2_T1-T1Gd_Affine"
#open "Diffusion Tensor Estimation" module
+
###''Output Image Volume'': create new volume, rename to "T1_Xf2"
#Input DWI Volume: DWI_iso, Output DTI Volume: create new, rename to "DTI_iso"
+
##''Registration Phases'': check boxes for ''Affine'' only
#Output Baseline: create new, rename to "DTI_iso_base"
+
##''Main Parameters'':
#Otsu Threshold Mask: create new, rename to "DTI_iso_mask"
+
###''Number Of Samples'': 200,000
#check box: "Estimation Parameters": "WLS"
+
##''Mask Option'': select ''ROIAUTO'' button
#check boxes for ''Remove Islands'' and ''Apply Mask''
+
###''(ROIAUTO) Output fixed mask'': create new volume
#Click: Apply
+
###''(ROIAUTO) Output moving mask'': create new volume
*'''Phase IV: Register DTI (unmasked)'''
+
##Leave all other settings at default
#open Registration : ''BrainsFit'' module (presets: Xf2_DTI-FLAIR_unmasked)
+
##click: Apply
##Registration Phases:  
+
*'''Phase V:  Register DWI (masked)'''
##set FLAIR as fixed and DTI_iso_base as moving image
+
#open the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/BRAINSFit General Registration (BRAINS) module]
###select/check ''Include Rigid registration phase''
+
##''Fixed Image Volume'': FLAIR_Xf1
###select/check ''Include Affine registration phase''
+
##''Moving Image Volume'': DWI_baseline
###select/check ''Include BSpline registration phase''
 
 
##Output Settings:  
 
##Output Settings:  
###select a new transform "Slicer BSpline Transform", rename to "Xf1_DTI-FLAIR_unmasked"
+
###''Slicer BSpline Transform": create new transform, rename to "Xf3_DWI-FLAIR"
###select a new volume "Output Image Volume'', rename to "DT_iso_base_Xf1"
+
###''Slicer Linear Transform'': none
##Registration Parameters: increase ''Number Of Samples'' to 200,000
+
###''Output Image Volume'': create new volume, rename to DWI_baseline_Xf2
##Registration Parameters: set  ''Number Of Grid Subdivisions'' to 5,5,3
+
##''Regstration Phases'': check boxes for ''Rigid'',  ''Affine'' and ''BSpline''
 +
##''Main Parameters'':
 +
###''Number Of Samples'': 300,000
 +
###''B-Spline Grid Size'': 7,7,5
 +
##''Mask Option'': select ''ROI'' button
 +
###''ROI Masking input fixed'': select  " "FLAIR_mask_ROIauto" created 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.
+
##click: Apply; runtime 1-2 min (MacPro QuadCore 2.4GHz)
 
*'''Phase V: Resample DTI'''
 
*'''Phase V: 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(under ''All Modules'' menu; note this is distinct from the ResampleScalarVectorDWIVolume used above)
##Input Volume: select DTI_iso
+
##''Input Volume'': DTI
##Output Volume: select ''New DTI Volume'', rename to ''DTI_iso_Xf2''
+
##''Output Volume'': create new DTI Volume, rename to ''DTI_Xf3''
##Reference Volume: select ''T1''
+
##''Reference Volume'': T1Gd
##Transform Parameters: select transform "Xf2_DTI-FLAIR_unmasked''
+
##''Transform Node'': select "Xf3_DTI-FLAIR" created above
##check box: ''output-to-input''
+
##check box: ''displacement''
##Leave all other settings at defaults
+
#leave all other settings at defaults
##Click Apply; runtime ~ 3 min.
+
#Click Apply; runtime ~ 3 min.
#Go to the ''Volumes'' module, select the newly produced ''DTI_Xf2'' volume
+
#set T1 or FLAIR as background and the new  ''DTI_Xf2'' volume as foreground
#under the ''Display'' tab, select ''Color Orientation'' from the ''Scalar Mode'' menu
+
#Move fade slider to see DTI overlay onto the structural image
#set ''T1'' as background and new  ''DTI_Xf2'' volume as foreground
 
#Set fade slider to see DTI overlay onto the T2 image
 
  
for more details see the tutorial(s) under Downloads above
+
=== Registration Results===
  
=== Registration Results===
+
[[Image:RegLib_C33_registeredDTI.gif|400px|lleft|DTI aligned with T1Gd]] DTI aligned with T1Gd
  
[[Image:RegLib_C33_AGif.gif|400px|lleft|DTI aligned with T1]]
+
[[Image:RegLib_C33_DTIdeform.gif|400px|lleft|DTI deformation applied (before/after registration]] DTI deformation applied (before/after registration
  
===Download ===
 
*Data
 
**[[Media:RegLib_C33_Data.zip‎ ‎|'''RegLib_C33_Data''' DWI, DTI, T1, FLAIR, Presets & solution transforms  <small> (NRRD files, zip file 145 MB) </small>]]'''
 
*Presets
 
**[[Media:RegLib_C33_Preproc_Presets.mrml‎|'''RegLib_C33_Preproc_Presets''' Presets for DWI resampling & DTI estimation <small> (.mrml file 8 kB) </small>]]'''
 
**[[Media:RegLib_C33_Presets.mrml‎|'''RegLib_C33_Presets''' Presets for FLAIR and DTI registration & DTI resampling <small> (.mrml file 12 kB) </small>]]'''
 
**[[Projects:RegistrationDocumentation:ParameterPresetsTutorial|Link to User Guide: How to Load/Save Registration Parameter Presets]]
 
*Documentation
 
**[[Media:RegLib_C33_Tutorial.ppt‎|'''RegLib_C33_Tutorial.ppt''' step-by-step tutorial Powerpoint<small> (.ppt file 2.6MB) </small>]]'''
 
**[[Media:RegLib_C33_Tutorial.pdf‎|'''RegLib_C33_Tutorial.pdf''' step-by-step tutorial PDF<small> (.pdf file 3.8MB) </small>]]'''
 
  
 
=== Discussion: Registration Challenges ===
 
=== Discussion: Registration Challenges ===
Line 120: Line 145:
  
 
=== Acknowledgments ===
 
=== Acknowledgments ===
 +
This case is the same data as [http://central.xnat.org/app/action/DisplayItemAction/search_element/xnat%3AmrSessionData/search_field/xnat%3AmrSessionData.ID/search_value/CENTRAL_E00893/popup/false/project/IGT_FMRI_NEURO '''case 40''' ] from the fMRI neurosurgery data set on central.xnat.org

Latest revision as of 20:16, 16 May 2012

Home < Projects:RegistrationLibrary:RegLib C33

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 #33: Diffusion Weighted Image Volume: align with structural reference MRI

Input

this is the fixed T1 reference image. All images are aligned into this space this is the FLAIR scan, to be registered with the T1 lleft this is the T1Gd image, serves as reference to which all others are aligned lleft this is the DTI tensor image, to be registered with the T1
fixed image/target
T1
moving image
FLAIR
moving image 2a
T1Gd
moving image 2b
DTI tensor

Slicer4 Modules used

Objective / Background

This is a typical example of DTI processing. Goal is to align the DTI image with a structural scan that provides accuracte anatomical reference. The DTI contains acquisition-related distortion and insufficient contrast to discern anatomical detail. For treatment planning and evaluation, location of functionally critical fiber tracts relative to the pathology is sought.

Keywords

MRI, brain, head, intra-subject, DTI, DWI

Download

Input Data

  • reference/fixed : T1 axial, 0.5 x 0.5 x 1 , 512 x 512 x 176
  • moving : FLAIR axial
  • moving : T1Gd axial
  • moving: Tensor data of DWI volume, 32 directions, 2.6 mm slice thickness

Overall Strategy

  • The best target for registering the DWI in terms of contrast is the FLAIR
  • however the FLAIR is low resolution. The T1 is very high in-plane resolution, which causes memory issues when trying to resample the DTI to that resolution. So we choose the T1Gd as the reference space and resolution (1x1x1 mm).
  • Thus the main strategy is:
  1. Obtain mask and baseline from DWI
  2. Compute DTI from DWI
  3. Register FLAIR and T1 to T1Gd (affine only) with masking (Affine)
  4. Register DWI_baseline to the resampled FLAIR (affine+nonrigid) (masking)
  5. Resample the DTI with above transform and the T1Gd as reference

For an alternative approach using Slicer 3.6 see here

Procedures

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_iso,
    2. Output DTI Volume: create new, rename to "DTI_iso"
    3. Output Baseline Volume: create new, rename to "DWI_iso_baseline"
  2. Click: Apply
  • Phase III: register FLAIR to T1Gd
  1. open the General Registration (BRAINS) module
    1. Fixed Image Volume: FLAIR
    2. Moving Image Volume: T1
    3. Output Settings:
      1. Slicer BSpline Transform: none
      2. Slicer Linear Transform: create new transform, rename to "Xf1_FLAIR-T1Gd_Affine"
      3. Output Image Volume: create new volume, rename to "FLAIR_Xf1"
    4. Registration Phases: check boxes for Affine only
    5. Main Parameters:
      1. Number Of Samples: 200,000
    6. Mask Option: select ROIAUTO button
      1. (ROIAUTO) Output fixed mask: create new volume
      2. (ROIAUTO) Output moving mask: create new volume
    7. Leave all other settings at default
    8. click: Apply
  • Phase IV: register T1 to T1Gd
  1. open the General Registration (BRAINS) module
    1. Fixed Image Volume: T1Gd
    2. Moving Image Volume: T1
    3. Output Settings:
      1. Slicer BSpline Transform: none
      2. Slicer Linear Transform: create new transform, rename to "Xf2_T1-T1Gd_Affine"
      3. Output Image Volume: create new volume, rename to "T1_Xf2"
    4. Registration Phases: check boxes for Affine only
    5. Main Parameters:
      1. Number Of Samples: 200,000
    6. Mask Option: select ROIAUTO button
      1. (ROIAUTO) Output fixed mask: create new volume
      2. (ROIAUTO) Output moving mask: create new volume
    7. Leave all other settings at default
    8. click: Apply
  • Phase V: Register DWI (masked)
  1. open the General Registration (BRAINS) module
    1. Fixed Image Volume: FLAIR_Xf1
    2. Moving Image Volume: DWI_baseline
    3. Output Settings:
      1. Slicer BSpline Transform": create new transform, rename to "Xf3_DWI-FLAIR"
      2. Slicer Linear Transform: none
      3. Output Image Volume: create new volume, rename to DWI_baseline_Xf2
    4. Regstration Phases: check boxes for Rigid, Affine and BSpline
    5. Main Parameters:
      1. Number Of Samples: 300,000
      2. B-Spline Grid Size: 7,7,5
    6. Mask Option: select ROI button
      1. ROI Masking input fixed: select " "FLAIR_mask_ROIauto" created 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; runtime 1-2 min (MacPro QuadCore 2.4GHz)
  • Phase V: Resample DTI
  1. Open the Resample DTI Volume module (under All Modules menu; note this is distinct from the ResampleScalarVectorDWIVolume used above)
    1. Input Volume: DTI
    2. Output Volume: create new DTI Volume, rename to DTI_Xf3
    3. Reference Volume: T1Gd
    4. Transform Node: select "Xf3_DTI-FLAIR" created above
    5. check box: displacement
  2. leave all other settings at defaults
  3. Click Apply; runtime ~ 3 min.
  4. set T1 or FLAIR as background and the new DTI_Xf2 volume as foreground
  5. Move fade slider to see DTI overlay onto the structural image

Registration Results

DTI aligned with T1Gd DTI aligned with T1Gd

DTI deformation applied (before/after registration DTI deformation applied (before/after registration


Discussion: Registration Challenges

  • The DTI contains acquisition-related distortions (commonly EPI acquisitions) that can make automated registration difficult.

Discussion: Key Strategies

Acknowledgments

This case is the same data as case 40 from the fMRI neurosurgery data set on central.xnat.org