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

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…')
 
m (Text replacement - "http://www.slicer.org/slicerWiki/index.php/" to "https://www.slicer.org/wiki/")
 
(15 intermediate revisions by one other 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 #9: Functional MRI aligned with structural reference MRI==
+
== <small>v3.6.3</small> [[Image:Slicer3-6Announcement-v1.png‎|150px]] Slicer Registration Library Case 09: Functional MRI aligned with structural reference MRI ==
 
+
=== Input ===
{| style="color:#bbbbbb; background-color:#333333;" cellpadding="10" cellspacing="0" border="0"
+
{| style="color:#bbbbbb; " cellpadding="10" cellspacing="0" border="0"
|[[Image:RegLib_C03_Reference_axial.png|150px|lleft|this is the fixed reference image. All images are aligned into this space]]  
+
|[[Image:RegLib_C09_Thumb1.png|150px|lleft|this is the fixed T1 reference image.]]  
|[[Image:Arrow_left_gray.jpg|100px|lleft]]  
+
|[[Image:RegArrow_NonRigid.png|100px|lleft]]  
|[[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:RegLib_C09_Thumb2.png|150px|left|this is the fMRI baseline image, to be registered to the T1]]
|[[Image:RegLib_C03_DTIVol_axial.png|150px|lleft|this is a passive image to which the calculated transform is applied. It is a label-map in the same space as the moving FLAIR image]]
 
|align="left"|LEGEND<br><small><small>
 
[[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: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
 
|
 
|[[Image:Button_green_moving.jpg|40px|lleft]] DTI Baseline
 
|[[Image:Button_blue_tag.jpg|40px|lleft]] DTI volume
 
 
|-
 
|-
|0.46 x 0.46 x 3.0 mm axial <br> 512 x 512 x 46<br>RAS
+
|Target Anatomical Ref.  
 
|
 
|
|1.0 x 1.0 x 3.3 mm <br> axial oblique<br> 256 x 256 x 36<br>RAS
+
|fMRI
|1.0 x 1.0 x 3.3 mm <br> axial oblique<br> 256 x 256 x 36 x 9 <br>RAS
 
 
|}
 
|}
 +
 +
=== Modules ===
 +
*'''Slicer 3.6.1 recommended modules:  [https://www.slicer.org/wiki/Modules:BRAINSFit BrainsFit]'''
  
 
===Objective / Background ===
 
===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.
+
This is a typical example of fMRI pre-processing. Goal is to align the fMRI image with a structural scan that provides accuracte anatomical reference. The fMRI contains acquisition-related distortion and low contrast to discern much anatomical detail. We also have pathology (stroke) with variable contrast across different MRI protocols.
 +
 
 
=== Keywords ===
 
=== Keywords ===
MRI, brain, head, intra-subject, DTI, DWI
+
MRI, brain, head, intra-subject, fMRI
  
 
===Input Data===
 
===Input Data===
*[[Image:Button_red_fixed_white.jpg|20px]]reference/fixed : T2w axial, 0.4mm resolution in plane, 3mm slices
+
*reference/fixed : T1  0.5 x 0.5 x 1 mm , 512 x 512 x 176
*[[Image:Button_green_moving_white.jpg|20px]] moving: Baseline image of acquired DTI volume, corresponds to T2w MRI , 0.9375 x 0.9375 x 1.4 mm voxel size, oblique
+
*moving: fMRI sequence of motor task (right hand clench)  2 x 2 x 4 mm, 128 x 128 x 19
*[[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 26 directions, the extracted DTI volume has 9 scalars, i.e. 256 x 256 x 36 x 9
 
 
 
=== Registration Results===
 
{| style="color:#bbbbbb; background-color:#333333;" cellpadding="10" cellspacing="0" border="0"
 
|[[Image:RegLib_C03_AffineResult_AnimGif.gif|200px|left|after affine alignment]]
 
|}
 
  
 
===Download ===
 
===Download ===
*'''[[Media:RegLib_03_DTIExample_full.zip‎|download entire package <small> (Data,Presets,Tutorial, Solution, zip file 33.7 MB) </small>]]''' (to be added: tutorial + presets)
+
*'''[[Media:RegLib_C09_Data.zip‎|download example data <small> (Data,Presets, Solution, zip file 60 MB) </small>]]'''  
*Presets
+
*'''[[Media:RegLib_C09_Presets.mrml‎|download parameter preset file  <small> ( MRML file 12 kB) </small>]]'''
*Tutorial only
+
:[[Projects:RegistrationDocumentation:ParameterPresetsTutorial|Link to User Guide: How to Load/Save Registration Parameter Presets]]
*Image Data only
 
<!--
 
**[[Media:RegPreset_RegUC-001.txt|download registration parameter presets file  <small> (MRML file, import as scene) </small>]]
 
**[[Media:RegLib_C01_Data_TumorGrowth.zip|download image dataset only  <small>(NRRD, 10.7 MB, filename: RegLib_C01_Data_TumorGrowth.zip) </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> ]]
 
**[[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:RegXForm_RegUC-001.tfm.txt|result transform file <small>(ITK .tfm file, load into slicer and apply to the target volume)</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 fMRI contains acquisition-related distortions that can make automated registration difficult.
 +
*the fMRI contains low tissue contrast, making  automated intensity-based 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 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
  
 
=== 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.
+
*this example manages to lock onto the target w/o masking, despite the FOV clipping. For similar cases it is likely that masking of the brain in both images may be necessary to obtain a good match.  
*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.
+
*a good rigid alignment is important before proceeding to non-rigid alignment to further correct for distortions. Affine is not recommended w/o masking, because the FOV differences would incur large scaling distortions.
*because we seek to assess/quantify regional size change, we must use a rigid (6DOF) scheme, i.e. we must exclude scaling.
+
*The nonrigid portion should be constrained to a max. deformation, e.g. 3mm
*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.
 
*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%.
 
*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 ===
+
=== Methods ===
 +
*place SPGR in background and fMRI in foreground. Review initial misalignment.
 +
*if there is little or no initial overlap, go to the [https://www.slicer.org/wiki/Modules:Volumes-Documentation-3.6 Volumes module], select the ''Info'' tab and click the ''Center Volume'' button. Repeat for both images. This should roughly center the volumes in the same physical space. Alternatively, when loading the data, consider checking the box for "Centered'' in the "Open File" dialog
 +
*'''Phase 1: BRAINSfit rigid w/o masking'''
 +
#open the Registration / [https://www.slicer.org/wiki/Modules:BRAINSFit BRAINSfit module]
 +
##Select Preset "Xf0_Rigid" or set the parameters as shown below:
 +
##fixed image: SPGR;  moving image: fMRI
 +
##Registration phases:
 +
###Initialize check: ''useGeometryAlign'';  check: ''Rigid''
 +
##Output: under ''Slicer Linear Transform'', select "create new" and rename to "Xf0_Rigid" or similar
 +
##leave rest at defaults
 +
##click: ''Apply''
 +
*'''Phase 2: Nonrigid BSpline'''
 +
#open the Registration / [https://www.slicer.org/wiki/Modules:BRAINSFit BRAINSfit module]
 +
##Select Preset "Xf1_BSpline" or set the parameters as shown below:
 +
##fixed image: SPGR;  moving image: fMRI
 +
##Initialize with previous transform: select the above "Xf0_Rigid"
 +
##Output: under ''Slicer BSpline Transform'', select "create new" and rename to "Xf1_BSpline" or similar
 +
##Output: under ''Output Image Volume'', select "create new" and rename to "fMRI_Xf1"
 +
##Output Image Pixel Type: check box for "ushort"
 +
##Registration Parameters: Number of Grid Subdivisions: 7,7,5
 +
##Maximum B-Spline Displacement: set to 3 [mm]
 +
##leave rest at defaults
 +
##Click: ''Apply''
 +
#Return to ''Data'' module. To compare the different alignments, move the fMRI volume back under the rigid transform. BRAINSfit automatically places the moving volume into the result transform, but since nonrigid transformations cannot be visualized directly the orientation does not seem to change. For Nonrigid deformations a resampled volume must be produced to see the effect.
 +
 
 +
=== Registration Results===
 +
[[Image:RegLib_C09_unregistered.gif|400px|unregistered]] unregistered  <br>
 +
[[Image:RegLib_C09_rigid.gif|400px|after rigid registration]] after rigid registration<br>
 +
[[Image:RegLib_C09_BSpline.gif‎|400px|after non-rigid registration]] after additional BSpline non-rigid registration<br><br>

Latest revision as of 18:07, 10 July 2017

Home < Projects:RegistrationLibrary:RegLib C09

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

v3.6.3 Slicer3-6Announcement-v1.png Slicer Registration Library Case 09: Functional MRI aligned with structural reference MRI

Input

this is the fixed T1 reference image. lleft
this is the fMRI baseline image, to be registered to the T1
Target Anatomical Ref. fMRI

Modules

Objective / Background

This is a typical example of fMRI pre-processing. Goal is to align the fMRI image with a structural scan that provides accuracte anatomical reference. The fMRI contains acquisition-related distortion and low contrast to discern much anatomical detail. We also have pathology (stroke) with variable contrast across different MRI protocols.

Keywords

MRI, brain, head, intra-subject, fMRI

Input Data

  • reference/fixed : T1 0.5 x 0.5 x 1 mm , 512 x 512 x 176
  • moving: fMRI sequence of motor task (right hand clench) 2 x 2 x 4 mm, 128 x 128 x 19

Download

Link to User Guide: How to Load/Save Registration Parameter Presets

Discussion: Registration Challenges

  • the fMRI contains acquisition-related distortions that can make automated registration difficult.
  • the fMRI contains low tissue contrast, making automated intensity-based 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 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

Discussion: Key Strategies

  • this example manages to lock onto the target w/o masking, despite the FOV clipping. For similar cases it is likely that masking of the brain in both images may be necessary to obtain a good match.
  • a good rigid alignment is important before proceeding to non-rigid alignment to further correct for distortions. Affine is not recommended w/o masking, because the FOV differences would incur large scaling distortions.
  • The nonrigid portion should be constrained to a max. deformation, e.g. 3mm

Methods

  • place SPGR in background and fMRI in foreground. Review initial misalignment.
  • if there is little or no initial overlap, go to the Volumes module, select the Info tab and click the Center Volume button. Repeat for both images. This should roughly center the volumes in the same physical space. Alternatively, when loading the data, consider checking the box for "Centered in the "Open File" dialog
  • Phase 1: BRAINSfit rigid w/o masking
  1. open the Registration / BRAINSfit module
    1. Select Preset "Xf0_Rigid" or set the parameters as shown below:
    2. fixed image: SPGR; moving image: fMRI
    3. Registration phases:
      1. Initialize check: useGeometryAlign; check: Rigid
    4. Output: under Slicer Linear Transform, select "create new" and rename to "Xf0_Rigid" or similar
    5. leave rest at defaults
    6. click: Apply
  • Phase 2: Nonrigid BSpline
  1. open the Registration / BRAINSfit module
    1. Select Preset "Xf1_BSpline" or set the parameters as shown below:
    2. fixed image: SPGR; moving image: fMRI
    3. Initialize with previous transform: select the above "Xf0_Rigid"
    4. Output: under Slicer BSpline Transform, select "create new" and rename to "Xf1_BSpline" or similar
    5. Output: under Output Image Volume, select "create new" and rename to "fMRI_Xf1"
    6. Output Image Pixel Type: check box for "ushort"
    7. Registration Parameters: Number of Grid Subdivisions: 7,7,5
    8. Maximum B-Spline Displacement: set to 3 [mm]
    9. leave rest at defaults
    10. Click: Apply
  2. Return to Data module. To compare the different alignments, move the fMRI volume back under the rigid transform. BRAINSfit automatically places the moving volume into the result transform, but since nonrigid transformations cannot be visualized directly the orientation does not seem to change. For Nonrigid deformations a resampled volume must be produced to see the effect.

Registration Results

unregistered unregistered
after rigid registration after rigid registration
after non-rigid registration after additional BSpline non-rigid registration