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

From NAMIC Wiki
Jump to: navigation, search
m (Text replacement - "http://www.slicer.org/slicerWiki/index.php/" to "https://www.slicer.org/wiki/")
 
(5 intermediate revisions by one other user not shown)
Line 18: Line 18:
  
 
=== Modules ===
 
=== Modules ===
*'''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''']
+
*'''Slicer 3.6.1 recommended modules:'''  [https://www.slicer.org/wiki/Modules:BRAINSFit '''BrainsFit'''],  [https://www.slicer.org/wiki/Modules:SkullStripperModule '''Skull Stripping Module'''],  [https://www.slicer.org/wiki/Modules:N4ITKBiasFieldCorrection-Documentation-3.6 '''N4 MRI Bias Field Correction''']
  
 
===Objective / Background ===
 
===Objective / Background ===
Line 25: Line 25:
 
=== Download ===
 
=== Download ===
 
*DATA
 
*DATA
**[[Media:RegLib_C32_Data.zip‎|'''Registration Library Case 32 (registration set)  '''<small> (Data & Solution Xforms, incl. DTI,  zip file 18 MB) </small>]]
+
**[[Media:RegLib_C32_Data.zip‎|'''Registration Library Case 32 (registration set)  '''<small> (Data & Solution Xforms, incl. DWI and DTI,  zip file 35 MB) </small>]]
**[[Media:RegLib_C32_Data2.zip‎|'''Registration Library Case 32 (DWI+resampled DTI set)  '''<small> (original DWI + resampled DTI only, zip file 53 MB) </small>]]
 
 
*PRESETS:  
 
*PRESETS:  
 
**[[Media:RegLib_C32_Presets.mrml‎|'''Registration Library Case 32:  Parameter Presets''' <small> (presets for bias correction, mask generation,  registration & resampling) 12kB, load via ''ImportScene..'') </small>]]
 
**[[Media:RegLib_C32_Presets.mrml‎|'''Registration Library Case 32:  Parameter Presets''' <small> (presets for bias correction, mask generation,  registration & resampling) 12kB, load via ''ImportScene..'') </small>]]
Line 46: Line 45:
  
 
===Key Strategies===
 
===Key Strategies===
*'''Slicer 3.6.1 recommended modules:  [http://www.slicer.org/slicerWiki/index.php/Modules:BRAINSFit BrainsFit]
+
*'''Slicer 3.6.1 recommended modules:  [https://www.slicer.org/wiki/Modules:BRAINSFit BrainsFit]
 
*to align the DTI and 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 and 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 59: Line 58:
  
 
=== 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]]
+
*note: for guidance on obtaining the DTI estimate from the DWI see [https://www.slicer.org/wiki/Modules:DiffusionTensorEstimation-Documentation-3.6 here] or the tutorials for [[Projects:RegistrationLibrary:RegLib_C27| Library case #27]]
 
*'''Phase I: LOAD DATA'''
 
*'''Phase I: LOAD DATA'''
 
#download example dataset
 
#download example dataset
Line 78: Line 77:
 
##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
 
##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
 
##use presets or choose the following settings: Input Volume: T1_bc ; Brain Mask: create new, rename to "T1_mask"; Subdivisions: 20, Dilation Radius: 1
 
##use presets or choose the following settings: Input Volume: T1_bc ; Brain Mask: create new, rename to "T1_mask"; Subdivisions: 20, Dilation Radius: 1
 +
*'''Phase IVa: Manual Initial Alignment'''
 +
#the two datasets in this case have very large initial misalignment and also a clipped FOV, which makes it difficult for an automated initializer to find the proper position. This increases the likelihood for the automated registration to go awry. To avoid this we adjust the main (translational) misalignment manually. You may skip this step if your data has closer initial alignment
 +
#Go to the ''Data'' module, right-click on the "Scene" node and select "Insert Transform Node"
 +
#select the new transform node and then rename it to "Xf0_ManualInit_T1-DTI", in the ''MRML Node Inspector" (press return after typing)
 +
#place the DTI_base image in the background and the T1_bc image in the foreground
 +
#move the fade slider halfway to the middle so that you can see both volumes
 +
#go to the ''Transforms'' module, move the translation sliders to move the T1 image on top of the DTI, or enter -20 for both LR and IS translation
 +
#in the BRAINSfit module below, select this initialization as starting transform.
 
*'''Phase IV: Affine Registration'''
 
*'''Phase IV: Affine Registration'''
 
#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
 
#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
 
#Go to the ''BRAINSFit'' module
 
#Go to the ''BRAINSFit'' module
##use presets ''Xf1_DTI-T1_masked_Aff1'' or enter the following settings:
+
## enter the following settings:
##Fixed Image: T1_bc, Moving Image: DTI_base
+
##Fixed Image: DTI_base, Moving Image: T1_bc
##Registration phases: check boxes for  ''Include Rigid registration phase'', ''Include Scale Versor3D registration phase''  ''Include Affine registration phase''
+
##Registration phases: from ''Initialize with previously generated transform', select "Xf0_ManualInit" node created before.
##Output: Slicer Linear transform: create new, rename to "Xf1_DTI-T1_masked"
+
##Registration phases: check boxes for  ''Include Rigid registration phase'', ''Include Scale Versor3D registration phase''  ''Include Affine registration phase''. To combine with Phase V below also check the ''Include BSpline phase'' box.
 +
##Output: Slicer Linear transform: create new, rename to "Xf1_T1-DTI_masked"
 
##Registration Parameters: increase ''Number Of Samples'' to 200,000
 
##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
+
##Control Of Mask Processing Tab: check ''ROI'' box, ''Input Fixed Mask'' : DTI_mask; ''Input Moving Mask'': T1_mask
 
##Leave all other settings at default
 
##Leave all other settings at default
 
##click apply; runtime ca. 1-2 min.
 
##click apply; runtime ca. 1-2 min.
#go to ''Data'' module. You will see the "DTI_base" volume moved inside the "Xf1.." transform node
+
#go to ''Data'' module. You should see the "T1_bc " volume moved inside the "Xf1.." transform node
 
#select T1_bc as background and DTI_base as foreground and check the alignment via the toggle switch
 
#select T1_bc as background and DTI_base as foreground and check the alignment via the toggle switch
 
*'''Phase V: Nonrigid Registration'''
 
*'''Phase V: Nonrigid Registration'''
 
#Go to the ''BRAINSFit'' module
 
#Go to the ''BRAINSFit'' module
##use presets ''Xf2_DTI-T1_BSpl'' or enter the following settings:
+
##enter the following settings:
##Fixed Image: T1_bc, Moving Image: DTI_base
+
##Fixed Image: DTI_base, Moving Image: T1_bc
 +
##Registration phases: from ''Initialize with previously generated transform', select "Xf1_..." node created before.
 
##Registration phases: check boxes for  ''Include BSpline registration phase''
 
##Registration phases: check boxes for  ''Include BSpline registration phase''
##Output: Slicer BSpline transform: create new, rename to "Xf2_DTI-T1_BSpl"
+
##Output: Slicer BSpline transform: create new, rename to "Xf2_T1-DTI_BSpl"
##Output Image Volume:  create new, rename to "DTI_base_Xf2"; ''Pixel Type'': "short"
+
##Output Image Volume:  create new, rename to "T1_bc_Xf2"; ''Pixel Type'': "short"
 
##Registration Parameters: increase ''Number Of Samples'' to 200,000; ''Number of Grid Subdivisions'': 3,3,3
 
##Registration Parameters: increase ''Number Of Samples'' to 200,000; ''Number of Grid Subdivisions'': 3,3,3
##Control Of Mask Processing Tab: check ''ROI'' box, ''Input Fixed Mask'' : T1_mask; ''Input Moving Mask'': DTI_mask
+
##Control Of Mask Processing Tab: check ''ROI'' box, ''Input Fixed Mask'' : DTI_mask; ''Input Moving Mask'': T1_mask
 
##Leave all other settings at default
 
##Leave all other settings at default
 
##click apply; runtime ca. 1-2 min.
 
##click apply; runtime ca. 1-2 min.
*'''Phase VI: Resample DTI'''
+
*The result volume "T1_bc_Xf2" is the one we want, since the DTI remains stationary, there is no additional resampling required. Note that the final transform "Xf2_T1-DTI_BSpl" contains both the affine and nonrigid BSpline portions.
#Open the ''Resample DTI Volume'' module (found under: All Modules)
+
#To check alignment, go to the ''Volumes'' module, select the newly produced ''DTI'' volume
##Input Volume: select DTI
 
##Output Volume: select ''New DTI Volume'', rename to ''DTI_Xf2''
 
##Reference Volume: select ''T1''
 
##Transform Parameters: select transform "Xf2_DTI-T1''
 
##check box: ''output-to-input''
 
##Leave all other settings at defaults
 
##Click Apply; runtime 3-4 min.
 
#Go to the ''Volumes'' module, select the newly produced ''DTI_Xf2'' volume
 
 
#under the ''Display'' tab, select ''Color Orientation'' from the ''Scalar Mode'' menu
 
#under the ''Display'' tab, select ''Color Orientation'' from the ''Scalar Mode'' menu
#set ''T1'' as background and new  ''DTI_Xf2'' volume as foreground
+
#set ''DTI'' as background and the new  "T1_bc_Xf2" volume as foreground
#Set fade slider to see DTI overlay onto the SPGR image
+
#Set fade slider to see DTI overlay onto the SPGR image, you should see alignment similar to the result shown below.
 
 
for more details see the tutorial(s) under Downloads
 
  
 
=== Registration Results===
 
=== Registration Results===
[[Image:RegLib_C32_AGif_reg.gif‎ |500px|Registered T1 superimposed on DTI]] registered<br>
+
[[Image:RgLib_C32_AGif_reg.gif‎ |500px|Registered T1 superimposed on DTI]] registered<br>
 
<br>
 
<br>

Latest revision as of 17:45, 10 July 2017

Home < Projects:RegistrationLibrary:RegLib C32

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

Input

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 lleft this is the fixed reference image. All images are aligned into this space
fixed image 1/target
DTI baseline
fixed image 1/target
DTI tensor
moving image
T1

Modules

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. In this particular case we seek the inverse alignment of the T1 with the DTI.

Download

Keywords

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

Input Data

  • reference/fixed: DTI baseline: 2.5 x 2.5 x 2.5 mm, 128 x 112 x 44
  • reference/fixed: 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
  • moving : T1 , 1x1x1.1 mm voxel size, 256 x 256 x 193

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

  • Slicer 3.6.1 recommended modules: BrainsFit
  • to align the DTI and 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 T1-DTI 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 T1_bc to DTI_baseline , unmasked
  5. non-rigid (BSpline) registration of T1_bc to DTI_baseline, masked, using above affine as starting pose

Procedures

  • note: for guidance on obtaining the DTI estimate from the DWI see here or the tutorials for Library case #27
  • Phase I: LOAD DATA
  1. download example dataset
  2. load into 3DSlicer 3.6.1 (Load Scene)
Note that the main data package does not contain the DWI. Please load separately from the second Data download package.
  • Phase II: Bias Correction of T1
  1. open Filtering : N4ITK MRI Bias Field Correction module
    1. Input: T1
    2. Output: create new volume, rename to T1_bc
    3. Use presets or set parameters: BSpline grid: 2,2,2 ; Shrink Factor: 4
    4. Click: Apply
    5. the bias-corrected image will be of type 'float'; to save memory convert to 'uint':
  2. Open Cast Image module
    1. Input: T1_bc, Output: T1_bc
    2. Output Type: unsigned short
  • Phase III: Skull Stripping
  1. 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
    1. 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
    2. use presets or choose the following settings: Input Volume: T1_bc ; Brain Mask: create new, rename to "T1_mask"; Subdivisions: 20, Dilation Radius: 1
  • Phase IVa: Manual Initial Alignment
  1. the two datasets in this case have very large initial misalignment and also a clipped FOV, which makes it difficult for an automated initializer to find the proper position. This increases the likelihood for the automated registration to go awry. To avoid this we adjust the main (translational) misalignment manually. You may skip this step if your data has closer initial alignment
  2. Go to the Data module, right-click on the "Scene" node and select "Insert Transform Node"
  3. select the new transform node and then rename it to "Xf0_ManualInit_T1-DTI", in the MRML Node Inspector" (press return after typing)
  4. place the DTI_base image in the background and the T1_bc image in the foreground
  5. move the fade slider halfway to the middle so that you can see both volumes
  6. go to the Transforms module, move the translation sliders to move the T1 image on top of the DTI, or enter -20 for both LR and IS translation
  7. in the BRAINSfit module below, select this initialization as starting transform.
  • Phase IV: Affine Registration
  1. 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
  2. Go to the BRAINSFit module
    1. enter the following settings:
    2. Fixed Image: DTI_base, Moving Image: T1_bc
    3. Registration phases: from Initialize with previously generated transform', select "Xf0_ManualInit" node created before.
    4. Registration phases: check boxes for Include Rigid registration phase, Include Scale Versor3D registration phase Include Affine registration phase. To combine with Phase V below also check the Include BSpline phase box.
    5. Output: Slicer Linear transform: create new, rename to "Xf1_T1-DTI_masked"
    6. Registration Parameters: increase Number Of Samples to 200,000
    7. Control Of Mask Processing Tab: check ROI box, Input Fixed Mask : DTI_mask; Input Moving Mask: T1_mask
    8. Leave all other settings at default
    9. click apply; runtime ca. 1-2 min.
  3. go to Data module. You should see the "T1_bc " volume moved inside the "Xf1.." transform node
  4. select T1_bc as background and DTI_base as foreground and check the alignment via the toggle switch
  • Phase V: Nonrigid Registration
  1. Go to the BRAINSFit module
    1. enter the following settings:
    2. Fixed Image: DTI_base, Moving Image: T1_bc
    3. Registration phases: from Initialize with previously generated transform', select "Xf1_..." node created before.
    4. Registration phases: check boxes for Include BSpline registration phase
    5. Output: Slicer BSpline transform: create new, rename to "Xf2_T1-DTI_BSpl"
    6. Output Image Volume: create new, rename to "T1_bc_Xf2"; Pixel Type: "short"
    7. Registration Parameters: increase Number Of Samples to 200,000; Number of Grid Subdivisions: 3,3,3
    8. Control Of Mask Processing Tab: check ROI box, Input Fixed Mask : DTI_mask; Input Moving Mask: T1_mask
    9. Leave all other settings at default
    10. click apply; runtime ca. 1-2 min.
  • The result volume "T1_bc_Xf2" is the one we want, since the DTI remains stationary, there is no additional resampling required. Note that the final transform "Xf2_T1-DTI_BSpl" contains both the affine and nonrigid BSpline portions.
  1. To check alignment, go to the Volumes module, select the newly produced DTI volume
  2. under the Display tab, select Color Orientation from the Scalar Mode menu
  3. set DTI as background and the new "T1_bc_Xf2" volume as foreground
  4. Set fade slider to see DTI overlay onto the SPGR image, you should see alignment similar to the result shown below.

Registration Results

Registered T1 superimposed on DTI registered