Difference between revisions of "Documentation/Nightly/Registration/RegistrationLibrary/RegLib C29"

From Slicer Wiki
Jump to: navigation, search
 
(52 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Documentation:Nightly:Registration:RegistrationLibrary|Back to Registration Library]] <br>
+
<noinclude>{{documentation/versioncheck}}</noinclude>
[[Image:SRegLib_Logo2.png|100px|left]]  
+
[[Documentation/Nightly/Registration/RegistrationLibrary|Back to Registration Library]] <br>
 +
<!-- [[Image:SRegLib_Logo2.png|100px|left]] -->
 
=  Slicer Registration Library Case #29: Intra-subject Brain DTI =
 
=  Slicer Registration Library Case #29: Intra-subject Brain DTI =
=== Input ===
+
== Input ==
 
{| style="color:#bbbbbb; " cellpadding="10" cellspacing="0" border="0"
 
{| style="color:#bbbbbb; " cellpadding="10" cellspacing="0" border="0"
 
|[[Image:RegLib_C29_thumb1.png|150px|lleft|this is the fixed reference image. All images are aligned into this space]]  
 
|[[Image:RegLib_C29_thumb1.png|150px|lleft|this is the fixed reference image. All images are aligned into this space]]  
|[[Image:RegArrow_Affine.png|100px|lleft]]  
+
|[[Image:RegArrow_Affine_Right.png|100px|lleft]]  
 
|[[Image:RegLib_C29_thumb2.png|150px|lleft|this is the T2 reference image, serves as target to the DTI baseline, but is itself aligned to the SPGR]]
 
|[[Image:RegLib_C29_thumb2.png|150px|lleft|this is the T2 reference image, serves as target to the DTI baseline, but is itself aligned to the SPGR]]
 
|[[Image:RegArrow_NonRigid.png|100px|lleft]]  
 
|[[Image:RegArrow_NonRigid.png|100px|lleft]]  
|[[Image:RegLib_C29_thumb3.png|150px|lleft|this is the DTI Baseline scan, to be registered with the T2]]
+
|[[Image:RegLib_C29_thumb4a.png|280px|lleft|this is the DTI tensor image, in the same orientation as the DTI Baseline]]
|[[Image:RegLib_C29_thumb4.png|150px|lleft|this is the DTI tensor image, in the same orientation as the DTI Baseline]]
 
 
|-
 
|-
|fixed image/target<br>T1 SPGR
+
|moving image<br>T1 SPGR
 
|
 
|
|moving image 1<br>T2
+
|fixed image 1<br>T2
 
|
 
|
|moving image 2a<br>DTI baseline
+
|moving image<br>DTI baseline+DTI tensor
|moving image 2b<br>DTI tensor
 
 
|}
 
|}
  
=== Slicer4 Modules used ===
+
== Description ==
* [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/DiffusionTensorEstimation Diffusion Tensor Estimation module]
+
This is a classic case of a multi-sequence MRI exam we wish to spatially align to the anatomical reference scan (T1-SPGR). The scan of interest is the DTI image to be aligned for surgical planning/reference.  Unlike [[Documentation:Nightly:Registration:RegistrationLibrary:RegLib_C27 |Case 27]]  this one does contain both a T1 and a T2 image. The T2 image being closer in contrast to the DWI/DTI baseline, it makes for the better registration reference. However the T1 contains the tissue contrast of interest. <br>
* [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/BRAINSFit General Registration (BRAINS) module]
+
'''Approach:''' we can use either T1 or T2 as the spatial reference. Ultimately we seek to overlay the DTI information onto the T1 image. But the T2 makes for a better registration reference because it matches better the DTI baseline contrast. Hence we will use the T2 as the reference and align the T1 to the T2 in a separate registration step. The typical DTI challenges are present here also:
* [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/ResampleDTI Resample DTI Volume module]
+
:*The DWI sequence (EPI) contains distortions we seek to correct via non-rigid alignment
 +
:*The DWI sequence also contains intensity inhomogeneity (coil bias)
 +
:*the DTI baseline is similar in contrast to a T2, albeit at much lower resolution
 +
:*we have different amounts of voxel-anisotropy
  
===Objective / Background ===
+
== Modules used ==
This is a classic case of a multi-sequence MRI exam we wish to spatially align to the anatomical reference scan (T1-SPGR). The scan of interest is the DTI image to be aligned for surgical planning/reference.
+
*[[Documentation/{{documentation/version}}/Modules/DiffusionWeightedVolumeMasking|''DiffusionWeightedVolumeMasking'' ]]
 +
*[[Documentation/{{documentation/version}}/Modules/DiffusionTensorEstimation| ''Diffusion Tensor Estimation'']]
 +
*[[Documentation/{{documentation/version}}/Modules/Editor| ''Editor (for mask generation)'']]
 +
*[[Documentation/{{documentation/version}}/Modules/BRAINSFit| ''General Registration (BRAINS)'']]
 +
*[[Documentation/{{documentation/version}}/Modules/ResampleDTI|''Resample DTI Volume'']]
  
=== Download (from NAMIC MIDAS) ===
+
== Download (from NAMIC MIDAS) ==
*DATA
+
<small>''Why 2 sets of files?  The "input data" mrb includes only the unregistered data to try the method yourself from start to finish. The full dataset includes intermediate files and results (transforms, resampled images etc.). If you use the full dataset we recommend to choose different names for the images/results you create yourself to distinguish the old data from the new one you generated yourself. ''</small>
**[http://slicer.kitware.com/midas3/download/?items=95057,1 RegLib_C29.mrb from MIDAS <small>(Slicer mrb file. 130 MB). </small>]
+
*[http://slicer.kitware.com/midas3/download/?items=95265 '''RegLib_C29_raw.mrb'''] <small>(input data, Slicer mrb file. 71 MB). </small> <br>
 +
*[http://slicer.kitware.com/midas3/download/?items=95058 '''RegLib_C29_full.mrb'''] <small>(input data+results, Slicer mrb file. 124 MB). </small>
  
=== Keywords ===
+
== Keywords ==
 
MRI, brain, head, intra-subject, DTI, T1, T2, non-rigid, tumor, surgical planning
 
MRI, brain, head, intra-subject, DTI, T1, T2, non-rigid, tumor, surgical planning
  
===Input Data===
+
==Registration Approach ==
*reference/fixed : T1 SPGR , 0.5x0.5x1 mm voxel size, 512 x 512 x 176
+
*a direct registration of the DTI_baseline to the T1 is not recommended, since the T2 is a better match in contrast to the DTI baseline. We therefore first align the DTI with the T2 and then also register the T1 to the T2.
*moving 1: T2 0.5x0.5x1.5 mm voxel size, 512 x 512 x 92
+
*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 in obtaining a meaningful transform. Registration without a mask is possible but not as good as with a mask.
*moving 2a: DTI baseline: 1 x 1 x 3 mm, 256 x 256 x 41
+
*The DTI estimation provides an automated mask for the DTI_baseline scan, but we have no mask for the T2. We obtain a T2 mask through separate segmentation.
*moving 2b: 1 x 1 x 3 mm, 256 x 256 x 41 x 9 (tensor), original: DWI 256 x 256 x 41 x 32 directions
+
*thus the suggested pipeline is:
 +
:#convert the DWI to DTI and generate a mask + baseline image
 +
:#build a mask for the T2
 +
:#Register DTI_baseline to T2
 +
:#Resample DTI with the result transform
 +
:#Register T1 to T2
  
===Registration Challenges===
+
=== Video Screencasts ===
*The DWI sequence (EPI) contains strong distortions we seek to correct via non-rigid alignment
+
#[[Media:RegLib_C29_m01_DWItoDTI.mov|'''Phase 1:''' Converting DWI to a DTI image]]
*The DWI sequence also contains strong intensity inhomogeneity (coil bias)
+
#[[Media:QuickMask_03_GrowCut.mov|'''Phase 2:'''Building a Mask for the T2]] (See here for a selection of [[Documentation/Nightly/RegistrationVideoTutorials#Registration_Masking:_How_do_I_quickly_generate_a_mask_for_use_in_registration.3F|'''videos showing 6 different methods to build a mask''']])
*the DTI baseline is similar in contrast to a T2, albeit at much lower resolution
+
#[[Media:RegLib_C29_m02a_BSpline+Mask.mov|'''Phase 3:'''Register DTI baseline to T2 (with dilated mask)]]
*we have different amounts of voxel-anisotropy
+
##[[Media:RegLib_C29_m02_BSpline.mov|if curious how the registration looks w/o masking: Register DTI baseline to T2 (no mask)]]
*a direct registration of the DTI_baseline to the SPGR will fail, hence a 2-step approach is required
+
##[[Media:RegLib_C29_m02b_BSpline+MaskUndilated.mov|if curious how the registration looks w/o dilation of the mask: Register DTI baseline to T2 (with undiluted mask)]]
 +
#[[Media:RegLib_C29_m03_DTIresample.mov|'''Phase 4:'''Resample DTI into space of T2]]
 +
#[[Media:RegLib_C29_m04_Coregister_T1.mov|'''Phase 5:'''Register T1 to T2]]
  
===Key Strategies===
+
== Procedures ==
*'''Slicer 4 recommended modules:  [http://www.slicer.org/slicerWiki/index.php/Modules:BRAINSFit BrainsFit]
+
*'''Phase 1a: Preprocessing: Build DWI mask + baseline'''  
*to align the DTI with the T1 we need 2 registration steps: 1.align the T2 with the T1 and 2. align the DTI with the T2. The DTI baseline scan has contrast most similar to the T2 and hence is best registered against the T2. However the structural reference scan with highest resolution and tissue contrast is the T1.
+
#open the [[Documentation/{{documentation/version}}/Modules/DiffusionWeightedVolumeMasking|''DiffusionWeightedVolumeMasking'' ]] module  
*we therefore use the following approach: 1) we first co-register the T2 with the SPGR T1.  2) we register the DTI baseline to the  registered/resampled T2;  3) resample the DTI volume with the new transform
 
*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 T2. We can either obtain one through separate segmentation or by sending the DTI_mask through an additional registration step. In this example we show the latter.
 
*thus the full pipeline is this:
 
:#Affine align T2-T1, incl. resampled T2 volume = T2r
 
:#Affine+BSpline align of DTI_baseline to T2r (unmasked)
 
:#Resample DTI_mask with above BSpline -> mask for the T2r
 
:#repeat Affine+BSpline align of DTI_base to T2r, WITH masks
 
:#resample DTI with result Affine+BSpline transform
 
=== Procedures ===
 
*'''Phase I: Preprocessing: Build DWI mask + baseline'''
 
#open the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/DiffusionWeightedMasking ''Modules:Diffusion:DiffusionWeightedImages:DiffusionWeightedVolumeMasking'' ] module  
 
 
##''Input DWI Volume'': "DWI"
 
##''Input DWI Volume'': "DWI"
##''Output Baseline Volume'':  ''Create New Volume'', rename to "DWI_baseline"
+
##''Output Baseline Volume'':  ''Create & Rename New Volume'', rename to "DWI_baseline"
##''Output Threshold Mask'': ''Create New Volume'', rename to "DWI_mask"
+
##''Output Threshold Mask'': ''Create & Rename New Volume'', rename to "DWI_mask"
##Leave other settings at default; click ''Apply''
+
##Leave other settings at default; click ''Apply'' -> You should obtain a baseline scalar image and a mask label map.
*'''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)
+
*'''Phase 1b: Preprocessing: Convert DWI -> DTI'''
##''Input DWI Volume'': DWI_iso,
+
#open the [[Documentation/{{documentation/version}}/Modules/DiffusionTensorEstimation|''Diffusion Tensor Estimation'' module]]
##''Output DTI Volume'': create new, rename to "DTI_iso"
+
##''Input DWI Volume'': DWI
##''Output Baseline Volume'': create new, rename to "DWI_iso_baseline"
+
##''Output DTI Volume'': create & rename new, rename to "DTI"
#Click: Apply
+
##''Output Baseline Volume'': create & rename new, rename to "DTI_baseline"
*'''Phase III: register T2 to T1'''
+
##Click: Apply -> you should get a 3x3 tensor image + a baseline image with contrast similar to a T2
#open the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/BRAINSFit General Registration (BRAINS) module]
+
 
##''Fixed Image Volume'': T1
+
*'''Phase 2: build a T2 mask'''
##''Moving Image Volume'': T2
+
See here for a selection of [[Documentation/Nightly/RegistrationVideoTutorials#Registration_Masking:_How_do_I_quickly_generate_a_mask_for_use_in_registration.3F|'''videos showing 6 different methods to build a mask''']]. Below is one of those, using the "GrowCut" tool in the Editor
##Output Settings:
+
#Open the  [[Documentation/{{documentation/version}}/Modules/Editor| "Editor" module]] , select the T2 as master volume and create a new label map.
###''Slicer BSpline Transform": none
+
#select the brush tool, set the label to 2 and the brush size to 80 mm or larger (filling almost entire FOV)
###''Slicer Linear Transform'': create new transform, rename to "Xf1_T2-T1"
+
#on 4 or 5 slices select the entire head and a good portion of the background
###''Output Image Volume'': create new volume, rename to "T2_Xf1"
+
#switch to the ''Level Tracing'' effect/tool. Switch the label to 1.
##''Registration Phases'': check boxes for ''Rigid'' and ''Affine''
+
#On the same slices as before, place the cursor near the brain surface until the yellow outline shows a good enclosure of the brain at that slice. Click the left mouse to fill.
##''Main Parameters'':
+
#you should now have a handful of slices, even distributed, where label 1 describes the brain parenchyma and label 2 everything else.
###''Number Of Samples'': 200,000
+
#switch to the ''GrowCutEffect'' and click Apply.
##Leave all other settings at default
+
#Apply some Dilation filtering: we want the mask to include the brain surface. Select the Dilation Effect and apply 3-4 times to grow the edge of the mask outward.
##click: Apply; runtime < 10 sec (MacPro QuadCore 2.4GHz)
+
#'''Also dilate the DWI mask:'''' switch to the DWI_mask image and also apply 3-4 steps of dilation
*'''Phase IV:  Register DTI (masked)'''
+
 
#open the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/BRAINSFit General Registration (BRAINS) module]
+
*'''Phase 3:  Register DTI (masked)'''
##''Fixed Image Volume'': FLAIR_Xf1
+
#open the [[Documentation/{{documentation/version}}/Modules/BRAINSFit|''General Registration (BRAINS)'' module]]
##''Moving Image Volume'': DWI_iso_baseline
+
##''Fixed Image Volume'': T2
 +
##''Moving Image Volume'': DTI_baseline
 
##Output Settings:  
 
##Output Settings:  
###''Slicer BSpline Transform": create new transform, rename to "Xf2_DTI-T1"
+
###''Slicer BSpline Transform": create & rename new transform, rename to "Xf1_DTI-T1"
 
###''Slicer Linear Transform'': none
 
###''Slicer Linear Transform'': none
###''Output Image Volume'': create new volume,  rename to DWI_baseline_Xf2
+
###''Output Image Volume'': create new volume,  rename to DTI_baseline_Xf1
##''Regstration Phases'': check boxes for ''Rigid'',  ''Affine'' and ''BSpline''
+
##''Registration Phases'': check boxes for ''Rigid'', ''Rigid+Scale'',  ''Affine'' and ''BSpline''
 
##''Main Parameters'':
 
##''Main Parameters'':
###''Number Of Samples'': 300,000
+
###''Number Of Samples'': 500,000
 
###''B-Spline Grid Size'': 7,7,5
 
###''B-Spline Grid Size'': 7,7,5
##''Mask Option'': select ''ROIAUTO'' button
+
##''Mask Option'': select ''ROI'' button
###''(ROIAUTO) Output fixed mask'': create new volume
+
###''(ROI) masking input fixed'': DWI_mask
###''(ROIAUTO) Output moving mask'': create new volume
+
###''(ROI) masking input  moving'': T2_mask
 
##Leave all other settings at default
 
##Leave all other settings at default
##click: Apply; runtime 1-2 min (MacPro QuadCore 2.4GHz)
+
##click: Apply. This may take several minutes depending on your CPU.
*'''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)
+
*'''Phase 4: Resample DTI'''
 +
#Open the [[Documentation/{{documentation/version}}/Modules/ResampleDTI|''Resample DTI Volume'' module]  (under ''All Modules'' menu; note this is distinct from the ResampleScalarVectorDWIVolume used above)]]
 
##''Input Volume'': DTI
 
##''Input Volume'': DTI
 
##''Output Volume'': create new DTI Volume, rename to ''DTI_Xf2''
 
##''Output Volume'': create new DTI Volume, rename to ''DTI_Xf2''
 
##''Reference Volume'': T2_Xf1
 
##''Reference Volume'': T2_Xf1
##''Transform Node'': select "Xf2_DTI-T1'' created above
+
##''Transform Node'': select "Xf2_DTI-T1" created above
 
##check box: ''displacement''
 
##check box: ''displacement''
 
#leave all other settings at defaults
 
#leave all other settings at defaults
Line 114: Line 118:
 
#Move fade slider to see DTI overlay onto the structural image
 
#Move fade slider to see DTI overlay onto the structural image
  
=== Registration Results===
+
*'''Phase 5: register T2 to T1'''
[[Image:RegLib_C29_registered.gif|500px|Registered DTI superimposed on SPGR and T2]] registered (cycles show T1 and T2 and color DTI overlay)<br>
+
#open the  [[Documentation/{{documentation/version}}/Modules/BRAINSFit| General Registration (BRAINS) module]]
<br>
+
##''Fixed Image Volume'': T1
 +
##''Moving Image Volume'': T2
 +
##Output Settings:
 +
###''Slicer BSpline Transform": none
 +
###''Slicer Linear Transform'': create & rename new transform, rename to "Xf3_T1-T2"
 +
###''Output Image Volume'': none ('''since this is an affine transform we need not resample to see the result''')
 +
##''Registration 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) -> This only generates the transform. We still need to apply it to the image
 +
##Go to the ''Data'' module. Find the nodes/entries for the T1 and the Xf3_T1-T2 transform. Drag the T1 node onto/into the transform Xf3_T2-T1 node. You should see the T2 now being listed nested within the transform.
 +
##right-click on the T1 image and from the pop-up menu, select ''Harden Transform''. This will apply the transform and move the new T1 back out onto the main level
 +
##double click on the T1 node and rename it to "T1_Xf3" or similar to make a record that this is no longer the original T1. '''Note that when you save your result, the save dialog may still display the name of the original T1. Make sure to change that before saving to prevent overwriting the original. '''Note that this way of applying the transform avoids resampling the data, it merely places the new orientation as a matrix in the image header'''.
 +
##Save results.
 +
 
 +
== Registration Results==
 +
{|cellpadding="10" cellspacing="0" border="0"
 +
|[[Image:RegLib_C29_registered.gif|400px]] ||original and registered pair of T1 and DTI (click to enlarge)
 +
|}

Latest revision as of 13:48, 3 September 2013

Home < Documentation < Nightly < Registration < RegistrationLibrary < RegLib C29


For the latest Slicer documentation, visit the read-the-docs.


Back to Registration Library

Slicer Registration Library Case #29: Intra-subject Brain DTI

Input

this is the fixed reference image. All images are aligned into this space lleft this is the T2 reference image, serves as target to the DTI baseline, but is itself aligned to the SPGR lleft this is the DTI tensor image, in the same orientation as the DTI Baseline
moving image
T1 SPGR
fixed image 1
T2
moving image
DTI baseline+DTI tensor

Description

This is a classic case of a multi-sequence MRI exam we wish to spatially align to the anatomical reference scan (T1-SPGR). The scan of interest is the DTI image to be aligned for surgical planning/reference. Unlike Case 27 this one does contain both a T1 and a T2 image. The T2 image being closer in contrast to the DWI/DTI baseline, it makes for the better registration reference. However the T1 contains the tissue contrast of interest.
Approach: we can use either T1 or T2 as the spatial reference. Ultimately we seek to overlay the DTI information onto the T1 image. But the T2 makes for a better registration reference because it matches better the DTI baseline contrast. Hence we will use the T2 as the reference and align the T1 to the T2 in a separate registration step. The typical DTI challenges are present here also:

  • The DWI sequence (EPI) contains distortions we seek to correct via non-rigid alignment
  • The DWI sequence also contains intensity inhomogeneity (coil bias)
  • the DTI baseline is similar in contrast to a T2, albeit at much lower resolution
  • we have different amounts of voxel-anisotropy

Modules used

Download (from NAMIC MIDAS)

Why 2 sets of files? The "input data" mrb includes only the unregistered data to try the method yourself from start to finish. The full dataset includes intermediate files and results (transforms, resampled images etc.). If you use the full dataset we recommend to choose different names for the images/results you create yourself to distinguish the old data from the new one you generated yourself.

Keywords

MRI, brain, head, intra-subject, DTI, T1, T2, non-rigid, tumor, surgical planning

Registration Approach

  • a direct registration of the DTI_baseline to the T1 is not recommended, since the T2 is a better match in contrast to the DTI baseline. We therefore first align the DTI with the T2 and then also register the T1 to the T2.
  • 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 in obtaining a meaningful transform. Registration without a mask is possible but not as good as with a mask.
  • The DTI estimation provides an automated mask for the DTI_baseline scan, but we have no mask for the T2. We obtain a T2 mask through separate segmentation.
  • thus the suggested pipeline is:
  1. convert the DWI to DTI and generate a mask + baseline image
  2. build a mask for the T2
  3. Register DTI_baseline to T2
  4. Resample DTI with the result transform
  5. Register T1 to T2

Video Screencasts

  1. Phase 1: Converting DWI to a DTI image
  2. Phase 2:Building a Mask for the T2 (See here for a selection of videos showing 6 different methods to build a mask)
  3. Phase 3:Register DTI baseline to T2 (with dilated mask)
    1. if curious how the registration looks w/o masking: Register DTI baseline to T2 (no mask)
    2. if curious how the registration looks w/o dilation of the mask: Register DTI baseline to T2 (with undiluted mask)
  4. Phase 4:Resample DTI into space of T2
  5. Phase 5:Register T1 to T2

Procedures

  • Phase 1a: Preprocessing: Build DWI mask + baseline
  1. open the DiffusionWeightedVolumeMasking module
    1. Input DWI Volume: "DWI"
    2. Output Baseline Volume: Create & Rename New Volume, rename to "DWI_baseline"
    3. Output Threshold Mask: Create & Rename New Volume, rename to "DWI_mask"
    4. Leave other settings at default; click Apply -> You should obtain a baseline scalar image and a mask label map.
  • Phase 1b: Preprocessing: Convert DWI -> DTI
  1. open the Diffusion Tensor Estimation module
    1. Input DWI Volume: DWI
    2. Output DTI Volume: create & rename new, rename to "DTI"
    3. Output Baseline Volume: create & rename new, rename to "DTI_baseline"
    4. Click: Apply -> you should get a 3x3 tensor image + a baseline image with contrast similar to a T2
  • Phase 2: build a T2 mask

See here for a selection of videos showing 6 different methods to build a mask. Below is one of those, using the "GrowCut" tool in the Editor

  1. Open the "Editor" module , select the T2 as master volume and create a new label map.
  2. select the brush tool, set the label to 2 and the brush size to 80 mm or larger (filling almost entire FOV)
  3. on 4 or 5 slices select the entire head and a good portion of the background
  4. switch to the Level Tracing effect/tool. Switch the label to 1.
  5. On the same slices as before, place the cursor near the brain surface until the yellow outline shows a good enclosure of the brain at that slice. Click the left mouse to fill.
  6. you should now have a handful of slices, even distributed, where label 1 describes the brain parenchyma and label 2 everything else.
  7. switch to the GrowCutEffect and click Apply.
  8. Apply some Dilation filtering: we want the mask to include the brain surface. Select the Dilation Effect and apply 3-4 times to grow the edge of the mask outward.
  9. Also dilate the DWI mask:' switch to the DWI_mask image and also apply 3-4 steps of dilation
  • Phase 3: Register DTI (masked)
  1. open the General Registration (BRAINS) module
    1. Fixed Image Volume: T2
    2. Moving Image Volume: DTI_baseline
    3. Output Settings:
      1. Slicer BSpline Transform": create & rename new transform, rename to "Xf1_DTI-T1"
      2. Slicer Linear Transform: none
      3. Output Image Volume: create new volume, rename to DTI_baseline_Xf1
    4. Registration Phases: check boxes for Rigid, Rigid+Scale, Affine and BSpline
    5. Main Parameters:
      1. Number Of Samples: 500,000
      2. B-Spline Grid Size: 7,7,5
    6. Mask Option: select ROI button
      1. (ROI) masking input fixed: DWI_mask
      2. (ROI) masking input moving: T2_mask
    7. Leave all other settings at default
    8. click: Apply. This may take several minutes depending on your CPU.
  • Phase 4: 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_Xf2
    3. Reference Volume: T2_Xf1
    4. Transform Node: select "Xf2_DTI-T1" 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
  • Phase 5: register T2 to T1
  1. open the General Registration (BRAINS) module
    1. Fixed Image Volume: T1
    2. Moving Image Volume: T2
    3. Output Settings:
      1. Slicer BSpline Transform": none
      2. Slicer Linear Transform: create & rename new transform, rename to "Xf3_T1-T2"
      3. Output Image Volume: none (since this is an affine transform we need not resample to see the result)
    4. Registration Phases: check boxes for Rigid and Affine
    5. Main Parameters : Number Of Samples: 200,000
    6. Leave all other settings at default
    7. click: Apply; runtime < 10 sec (MacPro QuadCore 2.4GHz) -> This only generates the transform. We still need to apply it to the image
    8. Go to the Data module. Find the nodes/entries for the T1 and the Xf3_T1-T2 transform. Drag the T1 node onto/into the transform Xf3_T2-T1 node. You should see the T2 now being listed nested within the transform.
    9. right-click on the T1 image and from the pop-up menu, select Harden Transform. This will apply the transform and move the new T1 back out onto the main level
    10. double click on the T1 node and rename it to "T1_Xf3" or similar to make a record that this is no longer the original T1. Note that when you save your result, the save dialog may still display the name of the original T1. Make sure to change that before saving to prevent overwriting the original. Note that this way of applying the transform avoids resampling the data, it merely places the new orientation as a matrix in the image header.
    11. Save results.

Registration Results

RegLib C29 registered.gif original and registered pair of T1 and DTI (click to enlarge)