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

From NAMIC Wiki
Jump to: navigation, search
 
(20 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 Exampe #27: Diffusion Weighted Image Volume: align with structural reference MRI ==
+
==<small>updated for '''v4.1'''</small> [[Image:Slicer4_RegLibLogo.png|150px]] <br>Slicer Registration Library Exampe #27: Diffusion Weighted Image Volume: align with structural reference MRI ==
  
{| style="color:#bbbbbb; background-color:#333333;" cellpadding="10" cellspacing="0" border="0"
+
=== Input ===
|[[Image:RegLib_C03_Reference_axial.png|150px|lleft|this is the fixed reference image. All images are aligned into this space]]  
+
{| style="color:#bbbbbb; " cellpadding="10" cellspacing="0" border="0"
|[[Image:Arrow_left_gray.jpg|100px|lleft]]  
+
|[[Image:RegLib27_T1c.png|150px|lleft|this is the fixed T2 reference image. All images are aligned into this space]]  
|[[Image:RegLib_C03_Baseline_axial.png|150px|lleft|this is the moving image. The transform is calculated by matching this to the reference image]]
+
|[[Image:RegLib27_FLAIR.png|150px|lleft|this is the fixed T2 reference image. All images are aligned into this space]]  
|[[Image:RegLib_C03_DTIVol_axial.png|150px|lleft|this is a passive image to which the calculated transform is applied. It is a tensor-map (DTI) in the same orientation as the moving baseline image]]
+
|[[Image:RegArrow_NonRigid.png|100px|lleft]]  
|align="left"|LEGEND<br><small><small>
+
|[[Image:RegLib27_DTIbaseline.png|150px|lleft|this is the DTI Baseline scan, to be registered with the T2]]
[[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:RegLib27_DTI.png|150px|lleft|this is the DTI tensor image, in the same orientation as the DTI Baseline]]
[[Image:Button_green_moving.jpg|20px|lleft]]  this indicates the moving image that determines the registration transform.  <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>
 
 
|-
 
|-
|[[Image:Button_red_fixed.jpg|40px|lleft]]  T2
+
|fixed image/target<br>T1
 +
|fixed image/target<br>FLAIR
 
|
 
|
|[[Image:Button_green_moving.jpg|40px|lleft]] DTI Baseline
+
|moving image 2a<br>DTI baseline
|[[Image:Button_blue_tag.jpg|40px|lleft]] DTI volume
+
|moving image 2b<br>DTI tensor
|-
 
|0.45 x 0.45 x 3.9 mm axial <br> 448 x 512 x 30<br>RAS
 
|
 
|1.96 x 1.96 x 3 mm <br> axial<br> 128 x 128 x 40<br>RAS
 
|1.96 x 1.96 x 3 mm <br> axial<br> 128 x 128 x 40<br>RAS
 
 
|}
 
|}
 +
  
 
===Objective / Background ===
 
===Objective / Background ===
Line 33: Line 27:
  
 
===Input Data===
 
===Input Data===
*[[Image:Button_red_fixed_white.jpg|20px]]reference/fixed : FLAIR axial, 0.4mm resolution in plane, 4mm slices
+
*reference/fixed : T1 axial, 0.98 x 0.98 x 1  ,  192 x 256 x 176
*[[Image:Button_green_moving_white.jpg|20px]] moving: Baseline image of acquired DTI volume, corresponds to T2w MRI , 1.96 x 1.96 x 3 mm voxel size, oblique
+
*reference/fixed : FLAIR axial, 0.4mm resolution in plane, 4mm slices,  448 x 512 x 30
*[[Image:Button_blue_tag_white.jpg|20px]] tag: 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: 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: 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
  
=== Registration Results===
+
=== Overall Strategy ===
{| style="color:#bbbbbb; background-color:#333333;" cellpadding="10" cellspacing="0" border="0"
+
:#Register FLAIR to T1 (affine) & resample
|[[Image:RegLib_C03_AffineResult_AnimGif.gif|200px|left|after affine alignment]]
+
:#Resample DWI to isotropic voxel size: use T1 as size reference
|}
+
:#Convert DWI -> DTI, incl. mask & baseline extraction
 +
:#Register DTI_baseline to FLAIR (affine+nonrigid) w/o masking
 +
:#Resample DTI with above transform
  
===Download ===
+
=== Procedures ===
*'''[[Media:RegLib_27_BrainDTI_Datal.zip‎|download dataset (DTI estimate, baseline image FLAIR & T1) <small> (NRRD files, zip file 24 MB) </small>]]'''  
+
*'''Phase I: register FLAIR to T1'''
*Presets
+
#open the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/BRAINSFit General Registration (BRAINS) module]
*Tutorial only
+
##''Fixed Image Volume'': T1
*Complete tutorial package
+
##''Moving Image Volume'': FLAIR
 +
##Output Settings:
 +
###''Slicer BSpline Transform": none
 +
###''Slicer Linear Transform'': create new transform, rename to "Xf1_FLAIR-T1"
 +
###''Output Image Volume'': create new volume,  rename to "FLAIR_Xf1"
 +
##''Regstration Phases'': check boxes for ''Rigid'' and ''Affine''
 +
##''Main Parameters'':
 +
###''Number Of Samples'': 200,000
 +
##Leave all other settings at default
 +
##click: Apply; runtime < 10 sec (MacPro QuadCore 2.4GHz)
 +
*'''Phase II: Resample DWI to isotropic voxel size'''
 +
#go to [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/ResampleScalarVectorDWIVolume ''ResampleScalarVectorDWIVolume'' module] (''All Modules'' menu)
 +
##''Input Volume'': "DWI",
 +
##''Output Volume'': "create new Diffusion Weighted Volume", rename to "DWI_iso"
 +
##''Reference Volume'':  T1
 +
#Click: ''Apply''
 +
#save new DWI_iso to disk
 +
#depending on RAM of your machine, consider deleting the original DWI node
 +
*'''Phase III:  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 IV:  Register DTI (unmasked)'''
 +
#open the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/BRAINSFit General Registration (BRAINS) module]
 +
##''Fixed Image Volume'': FLAIR_Xf1
 +
##''Moving Image Volume'': DWI_iso_baseline
 +
##Output Settings:
 +
###''Slicer BSpline Transform": create new transform, rename to "Xf2_DTI-T1"
 +
###''Slicer Linear Transform'': none
 +
###''Output Image Volume'': create new volume,  rename to DWI_iso_baseline_Xf2
 +
##''Regstration Phases'': check boxes for ''Rigid'',  ''Affine'' and ''BSpline''
 +
##''Main Parameters'':
 +
###''Number Of Samples'': 200,000
 +
###''B-Spline Grid Size'': 5,5,3
 +
##Leave all other settings at default
 +
##click: Apply; runtime <1 min (MacPro QuadCore 2.4GHz)
 +
*'''Phase V: Resample DTI'''
 +
#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'': DTI_iso
 +
##''Output Volume'': create new DTI Volume, rename to ''DTI_iso_Xf2''
 +
##''Reference Volume'': T1
 +
##''Transform Node'': select "Xf2_DTI-T1'' created in phase 4 above
 +
##check box: ''displacement''
 +
#leave all other settings at defaults
 +
#Click Apply; runtime ~ 3 min.
 +
#set T1 or FLAIR as background and the new  ''DTI_Xf2'' volume as foreground
 +
#Move fade slider to see DTI overlay onto the structural image
  
[[Projects:RegistrationDocumentation:ParameterPresetsTutorial|Link to User Guide: How to Load/Save Registration Parameter Presets]]
+
=== Registration Results===
  
 +
[[Image:RegLib_C27_AGif_reg_T1.gif|400px|lleft|DTI resampled to T1]]
 +
[[Image:RegLib_C27_AGif_reg_FLAIR.gif|400px|lleft|DTI resampled to FLAIR]]
  
<!--
+
===Download ===
**[[Media:RegPreset_RegUC-001.txt|download registration parameter presets file  <small> (MRML file, import as scene) </small>]]
+
*Data
**[[Media:RegLib_C01_Data_TumorGrowth.zip|download image dataset only  <small>(NRRD, 10.7 MB, filename: RegLib_C01_Data_TumorGrowth.zip) </small>]]
+
**[[Media:RegLib_C27_Data.zip‎ ‎|'''RegLib_C27_Data''' DWI, DTI, T1, FLAIR, Presets & solution transforms <small> (NRRD files, zip file 145 MB) </small>]]'''
**[[Media:RegLib_Case_01_NRRD_TumorGrowth.zip|download image dataset only <small>(NRRD, 10.7 MB, filename: RegLib_Case_01_NRRD_TumorGrowth.zip) </small> ]]  
+
*Documentation (for Slicer Version 3.6, but procedure is the same)
**[[Media:RegLib_C01_DataNIFTI_TumorGrowth.zip|download image dataset in NIFTI format <small>(NIFTI / nii, 10.7 MB, filename: RegLib_C01_DataNIFTI_TumorGrowth.zip) </small> ]]
+
**[[Media:RegLib_C27_Tutorial.ppt‎|'''RegLib_C27_Tutorial.ppt''' step-by-step tutorial Powerpoint<small> (.ppt file 2.6MB) </small>]]'''
**[[Media:RegXForm_RegUC-001.tfm.txt|result transform file <small>(ITK .tfm file, load into slicer and apply to the target volume)</small>]]
+
**[[Media:RegLib_C27_Tutorial.pdf‎|'''RegLib_C27_Tutorial.pdf''' step-by-step tutorial PDF<small> (.pdf file 3.8MB) </small>]]'''
**Tutorials (step-by -step walk through):
 
***[[Media:RegLib_C01_VideoTutorial_TumorGrowth.mov|download/play video tutorial <small>(quicktime, 15.9 MB, filename: RegLib_C01_VideoTutorial_TumorGrowth.mov) </small>]]
 
***[[Media:RegLib_C01_PPTTutorial_TumorGrowth.ppt.zip‎|download power point tutorial <small>(zip file, 2.8 MB, filename: RegLib_C01_PPTTutorial_TumorGrowth.ppt.zip) </small>]]
 
***[[Media:RegInstr_RegUC-001.txt‎|download step-by step text instructions <small>(rtf text file) </small>]]
 
*'''[[Media:RegLib_C01_TumorGrowth_MultiresSolution_Dec09.zip‎|Multiresolution testresult package  <small> (Data,Xform, Solution, zip file 16.5 MB) </small>]]'''
 
*'''[http://www.insight-journal.org/midas/item/bitstream/2332 Download package from MIDAS server<small> (Data,Xform) </small>]'''
 
 
 
comment
 
-->
 
  
 
=== Discussion: Registration Challenges ===
 
=== Discussion: Registration Challenges ===
 
*The DTI contains acquisition-related distortions (commonly EPI acquisitions) that can make automated registration difficult.
 
*The DTI contains acquisition-related distortions (commonly EPI acquisitions) that can make automated registration difficult.
 
*the two images often have strong differences in  voxel sizes and voxel anisotropy. If the orientation of the highest resolution is not the same in both images, finding a good match can be difficult.
 
*the two images often have strong differences in  voxel sizes and voxel anisotropy. If the orientation of the highest resolution is not the same in both images, finding a good match can be difficult.
*there may be widespread and extensive pathology (e.g stroke, tumor) that might affect the registration if its contrast is different in the baseline and structural reference scan
+
*there is widespread and extensive pathology in the right hemisphere that might affect the registration if contrast is different between the baseline and structural reference scan.
  
 
=== Discussion: Key Strategies ===
 
=== Discussion: Key Strategies ===
*the two images have identical contrast, hence we could consider "sharper" cost functions, such as NormCorr or MeanSqrd. But because of the strong distortions and lower resolution of the moving image, Mutual Information is recommended as the most robust metric.
+
*because the pathology appears similar in the FLAIR as in the DTI baseline, we choose the FLAIR as reference
*often anatomical labels are available from the reference scan. It would be less work to align the anatomical reference with the DTI, since that would circumvent having to resample the complex tensor data into a new orientation. However the strong distortions are better addressed by registering the other direction, i.e. move the DTI into the anatomical reference space.
 
*because we seek to assess/quantify regional size change, we must use a rigid (6DOF) scheme, i.e. we must exclude scaling.
 
 
*masking is likely necessary to obtain good results.  
 
*masking is likely necessary to obtain good results.  
*in this example the initial alignment of the two scans is very poor. The strongly oblique orientation of the DTI makes an initial manual alignment step necessary.
+
*in this example the initial alignment of the two scans is pretty good already. No initial affine alignment is needed.
 
*these two images are not too far apart initially, so we reduce the default of expected translational misalignment
 
*these two images are not too far apart initially, so we reduce the default of expected translational misalignment
 
*because speed is not that critical, we increase the sampling rate from the default 2% to 15%.
 
*because speed is not that critical, we increase the sampling rate from the default 2% to 15%.
*we also expect larger differences in scale & distortion than with regular structural scane: so we significantly  (2x-3x) increase the expected values for scale and skew from the defaults.
 
*a good affine alignment is important before proceeding to non-rigid alignment to further correct for distortions.
 
  
 
=== Acknowledgments ===
 
=== Acknowledgments ===

Latest revision as of 20:06, 4 May 2012

Home < Projects:RegistrationLibrary:RegLib C27

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

Input

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


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

Input Data

  • reference/fixed : T1 axial, 0.98 x 0.98 x 1 , 192 x 256 x 176
  • reference/fixed : FLAIR axial, 0.4mm resolution in plane, 4mm slices, 448 x 512 x 30
  • 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: 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

Overall Strategy

  1. Register FLAIR to T1 (affine) & resample
  2. Resample DWI to isotropic voxel size: use T1 as size reference
  3. Convert DWI -> DTI, incl. mask & baseline extraction
  4. Register DTI_baseline to FLAIR (affine+nonrigid) w/o masking
  5. Resample DTI with above transform

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_FLAIR-T1"
      3. Output Image Volume: create new volume, rename to "FLAIR_Xf1"
    4. Regstration 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 DWI to isotropic voxel size
  1. go to ResampleScalarVectorDWIVolume module (All Modules menu)
    1. Input Volume: "DWI",
    2. Output Volume: "create new Diffusion Weighted Volume", rename to "DWI_iso"
    3. Reference Volume: T1
  2. Click: Apply
  3. save new DWI_iso to disk
  4. depending on RAM of your machine, consider deleting the original DWI node
  • Phase III: 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 IV: Register DTI (unmasked)
  1. open the General Registration (BRAINS) module
    1. Fixed Image Volume: FLAIR_Xf1
    2. Moving Image Volume: DWI_iso_baseline
    3. Output Settings:
      1. Slicer BSpline Transform": create new transform, rename to "Xf2_DTI-T1"
      2. Slicer Linear Transform: none
      3. Output Image Volume: create new volume, rename to DWI_iso_baseline_Xf2
    4. Regstration Phases: check boxes for Rigid, Affine and BSpline
    5. Main Parameters:
      1. Number Of Samples: 200,000
      2. B-Spline Grid Size: 5,5,3
    6. Leave all other settings at default
    7. click: Apply; runtime <1 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_iso
    2. Output Volume: create new DTI Volume, rename to DTI_iso_Xf2
    3. Reference Volume: T1
    4. Transform Node: select "Xf2_DTI-T1 created in phase 4 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 resampled to T1 DTI resampled to FLAIR

Download

Discussion: Registration Challenges

  • The DTI contains acquisition-related distortions (commonly EPI acquisitions) that can make automated registration difficult.
  • the two images often have strong differences in voxel sizes and voxel anisotropy. If the orientation of the highest resolution is not the same in both images, finding a good match can be difficult.
  • there is widespread and extensive pathology in the right hemisphere that might affect the registration if contrast is different between the baseline and structural reference scan.

Discussion: Key Strategies

  • because the pathology appears similar in the FLAIR as in the DTI baseline, we choose the FLAIR as reference
  • masking is likely necessary to obtain good results.
  • in this example the initial alignment of the two scans is pretty good already. No initial affine alignment is needed.
  • these two images are not too far apart initially, so we reduce the default of expected translational misalignment
  • because speed is not that critical, we increase the sampling rate from the default 2% to 15%.

Acknowledgments