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

From NAMIC Wiki
Jump to: navigation, search
Line 50: Line 50:
  
 
=== Procedures ===
 
=== Procedures ===
*'''Phase I: Load & Convert DICOM'''
+
=== Procedures ===
#run Dicom2NRRD converter for the DWI Dicom set. Output file: DWI.nrrd
+
*'''Phase I: Preprocessing: Build DWI mask + baseline'''
#load DWI.nrrd
+
#open the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/DiffusionWeightedMasking ''Modules:Diffusion:DiffusionWeightedImages:DiffusionWeightedVolumeMasking'' ] module
#load T1, FLAIR and T1Gd images via AddVolume...
+
##''Input DWI Volume'': "DWI"
#Subsample T1: The T1 is 512 x 512 x 176 (0.5 x 0.5 x 1) resolution, which is too large as a reference to sample the DTI into. So we generate a smaller, isotropic 1x1x1 version of the T1 that can serve as reference:
+
##''Output Baseline Volume'': ''Create New Volume'', rename to "DWI_baseline"
##Open ''Filtering/Resample Scalar Volume'' module
+
##''Output Threshold Mask'': ''Create New Volume'', rename to "DWI_mask"
##Input: T1, Output: new volume, rename to T1_sub
+
##Leave other settings at default; click ''Apply''
##interpolation: ''Hamming''
+
*'''Phase II: Preprocessing: Convert DWI -> DTI'''
##Spacing: 1,1,1
+
#open [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/DiffusionTensorEstimation "Diffusion Tensor Estimation" module] (menu: Diffusion:DiffusionWeightedImages: DiffusionTensorEstimation)
*'''Phase II: Check initial Alignment and anisotropy'''
+
##''Input DWI Volume'': DWI_iso,  
#large initial misalignment and high voxel anisotropy can cause problems when registering and resampling the DTI. In such cases it is advisable to resample the DWI first into a more isotropic space and, if necessary, initially realign to a similar orientation as the T1 reference, '''before'' converting to DTI. In this example DWI is sufficiently aligned and has voxel dimensions of 1 x 1 x 2.6, which is borderline. Anisotropy ratios greater than 1:3 tend to benefit from initial resampling. In this case we proceed without.
+
##''Output DTI Volume'': create new, rename to "DTI_iso"
*'''Phase III: convert DWI -> DTI''
+
##''Output Baseline Volume'': create new, rename to "DWI_iso_baseline"
#go to module: Diffusion / Utilities / Diffusion Tensor Estimation  
+
#Click: Apply
#input: DWI, output : DTI, DTI_base and DTI_mask
+
*'''Phase III: register FLAIR to T1Gd'''
#Input DWI Volume: DWI, Output DTI Volume: create new, rename to "DTI"
+
#open the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/BRAINSFit General Registration (BRAINS) module]
#Output Baseline: create new, rename to "DTI_base"
+
##''Fixed Image Volume'': FLAIR
#Otsu Threshold Mask: create new, rename to "DTI_iso_mask"
+
##''Moving Image Volume'': T1
#check boxes for ''Remove Islands'' and ''Apply Mask''
 
##leave defaults
 
*'''Phase IVa: Register DTI-T1 (unmasked)'''
 
#open Registration : ''BrainsFit'' module (presets: Xf1_DTI-T1_unmasked
 
##Registration Phases:
 
##set T1_sub as fixed and DTI_base as moving image
 
###select/check ''Include Affine registration phase''
 
###select/check ''Include BSpline registration phase''
 
 
##Output Settings:  
 
##Output Settings:  
###select a new transform "Slicer BSpline Transform", rename to "Xf1_DTI-T1_unmasked"
+
###''Slicer BSpline Transform": none
###select a new volume "Output Image Volume'', rename to "DTI_base_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 Parameters: set  ''Number Of Grid Subdivisions'' to 5,5,3
+
##''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 10 sec. on MacPro Quad Core 2.4Ghz)
+
##click: Apply
##result: the absence of the skull in the DTI causes significant and incorrect stretch of image in the I-S direction.
+
*'''Phase IV: register T1 to T1Gd'''
##we repeat with mask, using the above estimate to produce a mask for the T1
+
#open the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/BRAINSFit General Registration (BRAINS) module]
*'''Phase IVb: Build mask for T1: resample DTI_mask'''
+
##''Fixed Image Volume'': T1Gd
#go to Filtering/Resample Scalar Vector DWI Volume
+
##''Moving Image Volume'': T1
##Use provided presets or set the following:
+
##Output Settings:  
##input: DTI_mask
+
###''Slicer BSpline Transform": none
##reference: T1_sub
+
###''Slicer Linear Transform'': create new transform, rename to "Xf2_T1-T1Gd_Affine"
##output: create new, rename to T1_sub_mask
+
###''Output Image Volume'': create new volume,  rename to "T1_Xf2"
##Transform node: Xf1_DTI-T1_unmasked
+
##''Registration Phases'': check boxes for  ''Affine'' only
##Transforms order: check ''output-to-input''
+
##''Main Parameters'':
##interpolation type: check "nn"
+
###''Number Of Samples'': 200,000
##click: ''Apply''
+
##''Mask Option'': select ''ROIAUTO'' button
#Go to ''Volumes'' module
+
###''(ROIAUTO) Output fixed mask'': create new volume
#select new "T1_sub_mask: volume, go to ''Info'' tab
+
###''(ROIAUTO) Output moving mask'': create new volume
#check the ''labelmap'' checkbox
+
##Leave all other settings at default
*'''Phase IVc:  Register DTI-T1 (masked)'''
+
##click: Apply
#open Registration : ''BrainsFit'' module (presets: Xf1_DTI-T1_masked)
+
*'''Phase V:  Register DTI (masked)'''
##settings as in Phase IVa above, except:  
+
#open the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/BRAINSFit General Registration (BRAINS) module]
###select a new transform "Slicer BSpline Transform", rename to "Xf2_DTI-T1_masked"
+
##''Fixed Image Volume'': FLAIR_Xf1
###select a new volume "Output Image Volume'', rename to "DTI_base_Xf2"
+
##''Moving Image Volume'': DWI_baseline
##Mask Processing Mode: check "ROI"
+
##Output Settings:  
##Input Fixed Mask: T1_mask
+
###''Slicer BSpline Transform": create new transform, rename to "Xf3_DTI-FLAIR"
##Input Moving Mask: DTI_mask
+
###''Slicer Linear Transform'': none
##Apply. Runtime 45 sec.
+
###''Output Image Volume'': create new volume, rename to DWI_baseline_Xf2
##go to ''Volumes'' module to adjust window&level for new result "DTI_base_Xf2"
+
##''Regstration Phases'': check boxes for ''Rigid'',  ''Affine'' and ''BSpline''
##alignment is now much improved
+
##''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
 +
##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
+
##''Input Volume'': DTI
##Output Volume: select ''New DTI Volume'', rename to ''DTI_Xf2''
+
##''Output Volume'': create new DTI Volume, rename to ''DTI_Xf3''
##Reference Volume: select ''T1_sub''
+
##''Reference Volume'': T1Gd
##Transform Parameters: select transform "Xf2_DTI-T1_masked''
+
##''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.
*'''Phase VIa: Register FLAIR & T1 Gd: obtain masks'''
+
#set T1 or FLAIR as background and the new ''DTI_Xf2'' volume as foreground
#we seek affine alignment only for FLAIR and T1Gd. As above, better results are achieved when masking non-brain parenchyma. To obtain masks for the FLAIR and T1Gd we proceed as above by resampling the DT_mask with the '''Xf2_DTI-T1''' transform and the respective image as reference.
+
#Move fade slider to see DTI overlay onto the structural image
#go to Filtering/Resample Scalar Vector DWI Volume
 
##input: DTI_mask
 
##reference: FLAIR
 
##output: create new, rename to FLAIR_mask
 
##Transform node: Xf2_DTI-T1_masked
 
##Transforms order: check ''output-to-input''
 
##interpolation type: check "nn"
 
##click: ''Apply''
 
#Go to ''Volumes'' module
 
#select new "FLAIR_mask: volume, go to ''Info'' tab
 
#check the ''labelmap'' checkbox
 
*'''Phase VIb: Mask for T1Gd'''
 
#ditto: we seek affine alignment only for T1Gd. Identical procedure as for FLAIR above:
 
#go to Filtering/Resample Scalar Vector DWI Volume
 
##input: DTI_mask
 
##reference: T1Gd
 
##output: create new, rename to T1Gd_mask
 
##Transform node: Xf2_DTI-T1_masked
 
##Transforms order: check ''output-to-input''
 
##interpolation type: check "nn"
 
##click: ''Apply''
 
#Go to ''Volumes'' module
 
#select new "T1Gd_mask: volume, go to ''Info'' tab
 
#check the ''labelmap'' checkbox
 
*'''Phase VIc: Register FLAIR & T1Gd'''
 
#open Registration : ''BrainsFit'' module (presets: Xf4_... and Xf5_...)
 
##Registration Phase: check box for "Affine" only
 
###select a new linear transform "Slicer Linear Transform", rename to "Xf4_FLAIR-T1_masked"
 
##Mask Processing Mode: check "ROI"
 
##Input Fixed Mask: T1_mask
 
##Input Moving Mask: FLAIR_mask
 
##Apply. Runtime ~45 sec.
 
#ditto for T1Gd
 
  
 
=== Registration Results===
 
=== Registration Results===

Revision as of 19:42, 16 May 2012

Home < Projects:RegistrationLibrary:RegLib C33

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

v3.6.1 Slicer3-6Announcement-v1.png Slicer Registration Library Exampe #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 lleft this is the FLAIR scan, to be registered with the T1 this is the T1Gd image, to be registered with the T1 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

Modules

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.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 DTI (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_DTI-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

Download

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