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

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/")
 
(22 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 #19: Co-registration of two anatomic brain atlases for merging of structure labels ==
+
 
{| style="color:#bbbbbb; background-color:#333333;" cellpadding="10" cellspacing="0" border="0"
+
== <small>v3.6.1</small> [[Image:Slicer3-6Announcement-v1.png‎|150px]] Slicer Registration Library Case #19: Multi-contrast group analysis: intra- and inter-subject registration of multi-contrast MRI  ==
|[[Image:RegLib_C11_A1_gray.png|150px|lleft|this is the fixed reference image. All images are aligned into this space]]  
+
=== Input ===
|[[Image:RegLib_C11_A1_label.png|150px|lleft|this is the fixed target, a label-map in the same space as the fixed reference. The registration target is derived from this image]]
+
{| style="color:#bbbbbb; " cellpadding="2" cellspacing="0" border="0"
|[[Image:Arrow_left_gray.jpg|100px|lleft]]  
+
|[[Image:RegLib_C19_thumb_N2_T1.png|150px|this is the main reference image. All images are aligned into this space]]  
|[[Image:RegLib_C11_A0_gray.png|150px|lleft|this is the moving image, but the transform is calculated by matching surfaces derived from the labelmaps]]
+
|[[Image:RegArrow_Affine.png|70px|lleft]]  
|[[Image:RegLib_C11_A0_label.png|150px|lleft|this is the moving image to which the calculated transform is applied.  The model surfaces used to calculate the transform are derived from the two labelmaps]]
+
|[[Image:RegLib_C19_thumb_N2_T2.png|150px|this is the 1st intra-subject moving target,   to be aligned with the main reference directly]]
|align="left"|LEGEND<br><small><small>
+
|[[Image:RegLib_C19_thumb_N2_MRA.png|150px|this is the 2nd intra-subject moving target,  to be aligned with the main reference directly]]
[[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>
+
|subj 1: T1
[[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>
+
|subj 1: T2
 +
|subj 1: MRA
 
|-
 
|-
|[[Image:Button_red_fixed.jpg|40px|lleft]] Target Atlas T1
+
|[[Image:RegArrow_NonRigidVert.png|70px|lleft]]  
|[[Image:Button_red_fixed.jpg|40px|lleft]]  Target Atlas Labelmap
+
|
 
|
 
|
|[[Image:Button_blue_tag.jpg|40px|lleft]] Moving Atlas T1
+
|
|[[Image:Button_green_moving.jpg|40px|lleft]] Moving Atlas Labelmap
+
|-
 +
|[[Image:RegLib_C19_thumb_N4_T1.png|150px|this is  both the fixed target for the 2nd subject and the moving image for inter-subject registration]]
 +
|[[Image:RegArrow_Affine.png|70px|lleft]]  
 +
|[[Image:RegLib_C19_thumb_N4_T2.png|150px|this is a moving image to be aligned indirectly to the main ref]]
 +
|[[Image:RegLib_C19_thumb_N4_MRA.png|150px|his is a moving image to be aligned indirectly to the main ref ]]
 
|-
 
|-
|1mm isotropic<br> 256 x 256 x 256<br>PA
+
|subj 2: T1
|1mm isotropic<br> 256 x 256 x 256<br>PA
 
 
|
 
|
|0.9375 x 0.9375 x 1.5mm isotropic<br> 256 x 256 x 159<br>PA
+
|subj 2: T2
|0.9375 x 0.9375 x 1.5mm isotropic<br> 256 x 256 x 159<br>PA
+
|subj 2: MRA
 
|}
 
|}
  
 +
 +
*T1: 1mm isotropic;  176 x 256 x 176
 +
*T2: 1mm isotropic;  192 x 256 x 128
 +
*MRA: 0.51 x 0.51 x 0.8 mm; 448 x 448 x 128
 +
 +
=== Modules ===
 +
*'''Slicer 3.6.1 recommended modules:  [https://www.slicer.org/wiki/Modules:BRAINSFit BrainsFit]'''
 +
*For the inter-subject nonrigid portion: [https://www.slicer.org/wiki/Modules:DeformableB-SplineRegistration-Documentation-3.6 Fast nonrigid BSpline]
 +
*For combining the transforms: copy and paste in a Text Editor
 +
*For applying the transforms and resampling: [https://www.slicer.org/wiki/Modules:ResampleScalarVectorDWIVolume-Documentation-3.6 Resample Scalar/Vector/DWI Volume]
  
 
===Objective / Background ===
 
===Objective / Background ===
This is an example of inter-subject registration via surface matching. The structures of interest are a small subset of the entire image, hence registration is not driven by image intensities but rather two model surfaces derived from the labelmaps.
+
This is an example of multi-stage registration containing both intra- and inter-subject alignment. We have two sets of multi-sequence MRI for two subjects, each comprised of a T1, T2 and perfusion MRA scan. We ant everything aligned to a single space to enable regional or voxel-based group comparison.  
 
 
 
=== Keywords ===
 
=== Keywords ===
MRI, brain, head, inter-subject, atlas to atlas, surface-based registration, thalamic nuclei
+
multi-stage registration, MRI, brain, head, multi-contrast,  inter-subject, group analysis, MRA, T2
  
===Input Data===
 
*[[Image:Button_red_fixed_white.jpg|20px]]reference/fixed : T1w coronal, 1mm isotropic. Called ''A1_gray''
 
*[[Image:Button_red_fixed_white.jpg|20px]]reference/fixed : labelmap , aligned with above. Called ''A1_label''
 
*[[Image:Button_blue_tag_white.jpg|20px]] moving: T1w coronal, 0.9 inplane, 1.5mm coronal slices. Called ''A0_gray''
 
*[[Image:Button_green_moving_white.jpg|20px]] moving: labelmap , aligned with above. Called ''A0_label''
 
 
=== Methods ===
 
=== Methods ===
#Visualize & browse A0 data: determine label range of thalamic nuclei labels in A0_label: 500-526
+
#align T2 and MRA of each subject to their respective T1 via an affine transform
#Visualize & browse A1 data: determine label range of thalamus lables in A1_label: 10 and 49
+
#align the T1 of subject 2 to the T1 of subject 1 via a non-rigid transform, this establishes the inter-subject mapping
#Build label mask of thalamus for A0: '''Editor''' module
+
#combine the affine transforms of subject 2 T2 and MRA with the above nonrigid and resample the two images into the reference space
##Create Labelmap From”: ''A0_labels''
 
##Select Labelmap to Edit: select the newly created “A0_labels-label” and then select “Rename”. Rename the new volume to ''A0_thalamus''
 
##From the icon panel, select the “Threshold Icon”
 
##Threshold range: enter 500 and 526
 
#change ''A1_labels'': change label 10 to 49; '''Editor''' module
 
##Select Labelmap to Edit: ''Aa_labels''
 
##Label field: enter 49
 
##Change Island Icon; left click on area with left thalamus label 10
 
#Build label mask of thalamus for A1:  '''Editor''' module
 
##Create Labelmap From”: ''A1_labels''
 
##Select Labelmap to Edit: select the newly created “A1_labels-label” and then select “Rename”. Rename the new volume to ''A1_thalamus''
 
##From the icon panel, select the “Threshold Icon”
 
##Threshold range: enter 49 and 49
 
#Smooth A1 thalamus labelmap: '''Filtering / Denoising / Median Filter'''
 
##Neighborhood Size: (default) 1,1,1
 
##Input Volume: A1_thalamus
 
##Output Volume: A1_thalamus
 
#Build thalamus surface model of A0: '''Model Maker''' module
 
##Input Volume: ''A0_thalamus''
 
##Model Name: ''A0_ThalamusModel''
 
##Labels: 1
 
##Smooth: 50
 
##Decimate: 0.25
 
##Split Normals: no
 
##Point Normals: yes
 
##Save Intermediate Models: no
 
#Build thalamus surface model of A1 ('''Model Maker''' module as above, with ''A1_thalamus'' as input and ''A1_ThalamusModel'' as output.
 
#Co-register thalamus surfaces: '''Python Surface ICP Registration'''  module.  Settings:
 
##Landmark transform mode: Affine
 
##Mean Distance Mode: RMS
 
##Maximum Number of Iterations: 500
 
##Maximum Nmber of Landmarks: 200
 
##Start by matching centroids:  yes
 
##maximum mean distance:  0.01
 
##Initial Transform: none
 
##Input Surface: ''A0_ThalamusModel''
 
##Target Surface: ''A1_ThalamusModel''
 
##Output Surface: none
 
##Output Transform: ''Xform_A0Affine_ICP''
 
# Apply Registration Xform to labelmap: '''Resample Scalar/Vector/DWI Volume''' module. Settings:
 
##Input Volume : ''A0_labels''
 
##Reference Volume : ''A1_labels''
 
##Output Volume : “Create New Volume”, rename to “A0_labels_aff”
 
##Transform Node: ''Xform_A0Affine_ICP''
 
##Interpolation Type: “nn”
 
##Change datatype of new volume ''A0_labels_aff'' to labelmap ('''Volumes''' module)
 
# Apply Registration Xform to thalamus mask: '''Resample Scalar/Vector/DWI Volume''' module. Settings:
 
##Input Volume : ''A0_thalamus''
 
##Reference Volume : ''A1_labels''
 
##Output Volume : “Create New Volume”, rename to ''A0_thalamus_aff''
 
##Transform Node: ''Xform_A0Affine_ICP''
 
##Interpolation Type: “nn”
 
##Change datatype of new volume  ''A0_labels_aff'' to labelmap ('''Volumes''' module)
 
#Mask new labelmap with ''A0_thalamus_aff'': '''Mask Image''' module
 
##Input Volume : ''A0_labels_aff''
 
##Mask Volume : ''A0_thalamus_aff''
 
##Masked Volume: ''A0_labels aff''
 
##Mask new labelmap with A1_thalamus: '''Mask Image''' module
 
##Input Volume : ''A0_labels_aff''
 
##Mask Volume : ''A1_thalamus_aff''
 
##Masked Volume: New volume, rename to: ''A0_labels aff_clip''
 
#Typecast A1_labelmap: '''Cast Image''' module
 
##Input Volume: ''A1_label''
 
##Output Volume: ''A1_label''
 
##Output Type: “short”
 
#Merge Labelmaps:'''Image Label Combine''' module
 
##Input Label Map A: ''A0_label_aff_clip''
 
##Input Label Map B: ''A1_labels''
 
##Output Label Map: “Create New Volume”, rename to ''A1_labels_merged''
 
##First label overwrites second: yes
 
  
 
=== Registration Results===
 
=== Registration Results===
{| style="color:#bbbbbb; background-color:#333333;" cellpadding="10" cellspacing="0" border="0"
+
[[Image:RegLib_C19_unreg.gif|300px|unregistered]] unregistered (left)
|[[Image:RegLib_C11_AnimGif2.gif|200px|left|unregistered]] [[Image:RegLib_C11_AnimGif1.gif|200px|left|after ICP Surface Registration + Clipping]]  
+
[[Image:RegLib_C19_reg.gif|300px|registered]]  registered series : Affine + Fast BSpline (3x3x3). Note the animated gif cycles through both subjects and intra-subject scans.  <br>
|}
+
 
 +
[[Image:RegLib_C19_AGif_Intra_N2.gif|300px|registered]] registered intra-subject N2 [[Image:RegLib_C19_AGif_Intra_N4.gif|300px|registered]] registered intra-subject N4 (right): Affine only<br>
 +
[[Image:RegLib_C19_AGif_N4-N2_T1.gif|300px|registered]] registered N4-N2 (Affine+BSpline BRAINSfit 7x7x7)<br>
 +
[[Image:RegLib_C19_AGif_N4-N2_T2.gif|300px|registered]]  registered N4-N2 (Affine+BSpline BRAINSfit 7x7x7)<br>
 +
[[Image:RegLib_C19_AGif_N4-N2_MRA.gif|300px|registered]] registered N4-N2 (Affine+BSpline BRAINSfit 7x7x7)<br>
 +
[[Image:RegLib_C19_AGif_BSplDef.gif|300px|registered]]  registered N4-N2 BSpline deformation only applied to N4<br>
  
 
===Download ===
 
===Download ===
*[[Media:RegLib_C11_AtlasMerge_TutorialSet.zip‎‎|download entire '''tutorial package''' <small> (Original Data, Intermediate Results, Solution, zip file 74 MB) </small>]]
+
*Data
*[[Media:RegLib_C11_AtlasMerge_OldAtlas.zip‎‎|download '''old atlas dataset'''  <small> (MRI+labelmap,thalamic nuclei models, list of labels+names), zip file 5.4 MB) </small>]]
+
**[[Media:RegLib_C19_DATA.zip‎‎|download '''image data'''<small> (Original Data, Result transforms, parameter presets, zip file 81 MB) </small>]]
*[[Media:RegLib_C11_AtlasMerge_NewAtlas.zip‎‎|download '''new atlas dataset'''  <small> (MRI T1+T2, labelmap, thalamus model), zip file 126MB) </small>]]
+
*Presets
*[[Media:RegLib_C11_AtlasMerge_NewAtlasMerged.zip|download '''result merged new atlas dataset'''  <small> (MRI T1+T2, new merged labelmaps (2x)  incl. thalamic nuclei, colormap file with label names), zip file 126 MB) </small>]]
+
**[[Media:RegLib_C19_RegPresets.mrml‎‎|download '''registration parameter presets'''  <small> (mrml file, 12 kB) </small>]]
*[[Media:RegLib_C11_Tutorial_AtlasMerging.ppt.zip|download full '''step-by-step tutorial'''<small> (PowerPoint, zip file, 2.5 MB) </small>]]
+
*Documentation
*obsolete: [[Media:RegLib_C11_CompareSet.zip|download compare set<small>  (New Atlas, 2 merged versions (full & clipped), thalamus models, Xform, Merged colormap, zip file, 67 MB) </small>]]
+
**[[Media:RegLib_C19_Tutorial.ppt‎‎|download '''guided tutorial''' <small> (power point file, 1.5 MB) </small>]]
  
 
[[Projects:RegistrationDocumentation:ParameterPresetsTutorial|Link to User Guide: How to Load/Save Registration Parameter Presets]]
 
[[Projects:RegistrationDocumentation:ParameterPresetsTutorial|Link to User Guide: How to Load/Save Registration Parameter Presets]]
  
 
=== Discussion: Registration Challenges ===
 
=== Discussion: Registration Challenges ===
*Because the structures of interest are a very small subset of the image without distinct grayscale contrast
+
*We have two separate sets of registrations to combine. While theoretically possible to simply align every scan with the reference directly, this is likely to produce inferior results. Basic rule of thumb is to register to the image that is closest in anatomy and contrast, in that order.
*the two atlases represent different anatomies and hence some residual misalignment is inevitable
+
*the MRA has a strongly clipped FOV and low tissue contrast
*the two labelmaps have different resolutions and different smoothness of structure outlines. Some need filtering to remove spurious surface details that would distract the registration algorithm
+
*Currently (Slicer 3.6) the concatenation of linear and nonlinear transforms is not (yet) supported directly in slicer. However this is an easy and fast procedure that can be done with any text editor. We merely copy the affine portion from one transform file and paste it into the nonrigid transform file.
  
 
=== Discussion: Key Strategies ===
 
=== Discussion: Key Strategies ===
*Because the structures of interest are a very small subset of the image without distinct grayscale contrast, we co-register surfaces rather than intensity volumes
+
#For the intra-subject affine portion: [https://www.slicer.org/wiki/Modules:BRAINSFit BRAINSfit]
 
+
#For the inter-subject nonrigid portion: [https://www.slicer.org/wiki/Modules:DeformableB-SplineRegistration-Documentation-3.6 Fast nonrigid BSpline]
 +
#For combining the transforms: copy and paste in a Text Editor
 +
#For applying the transforms and resampling: [https://www.slicer.org/wiki/Modules:ResampleScalarVectorDWIVolume-Documentation-3.6 Resample Scalar/Vector/DWI Volume]
  
 
=== Acknowledgments ===
 
=== Acknowledgments ===
*dataset provided by Ron Kikinis, M.D. and Florin Talos, M.D.
+
*dataset provided by the [http://ij.itk.org/midas/community/view/21 UNC Midas Database of healthy volunteers]

Latest revision as of 18:07, 10 July 2017

Home < Projects:RegistrationLibrary:RegLib C19

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 #19: Multi-contrast group analysis: intra- and inter-subject registration of multi-contrast MRI

Input

this is the main reference image. All images are aligned into this space lleft this is the 1st intra-subject moving target, to be aligned with the main reference directly this is the 2nd intra-subject moving target, to be aligned with the main reference directly
subj 1: T1 subj 1: T2 subj 1: MRA
lleft
this is both the fixed target for the 2nd subject and the moving image for inter-subject registration lleft this is a moving image to be aligned indirectly to the main ref his is a moving image to be aligned indirectly to the main ref
subj 2: T1 subj 2: T2 subj 2: MRA


  • T1: 1mm isotropic; 176 x 256 x 176
  • T2: 1mm isotropic; 192 x 256 x 128
  • MRA: 0.51 x 0.51 x 0.8 mm; 448 x 448 x 128

Modules

Objective / Background

This is an example of multi-stage registration containing both intra- and inter-subject alignment. We have two sets of multi-sequence MRI for two subjects, each comprised of a T1, T2 and perfusion MRA scan. We ant everything aligned to a single space to enable regional or voxel-based group comparison.

Keywords

multi-stage registration, MRI, brain, head, multi-contrast, inter-subject, group analysis, MRA, T2

Methods

  1. align T2 and MRA of each subject to their respective T1 via an affine transform
  2. align the T1 of subject 2 to the T1 of subject 1 via a non-rigid transform, this establishes the inter-subject mapping
  3. combine the affine transforms of subject 2 T2 and MRA with the above nonrigid and resample the two images into the reference space

Registration Results

unregistered unregistered (left) registered registered series : Affine + Fast BSpline (3x3x3). Note the animated gif cycles through both subjects and intra-subject scans.

registered registered intra-subject N2 registered registered intra-subject N4 (right): Affine only
registered registered N4-N2 (Affine+BSpline BRAINSfit 7x7x7)
registered registered N4-N2 (Affine+BSpline BRAINSfit 7x7x7)
registered registered N4-N2 (Affine+BSpline BRAINSfit 7x7x7)
registered registered N4-N2 BSpline deformation only applied to N4

Download

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

Discussion: Registration Challenges

  • We have two separate sets of registrations to combine. While theoretically possible to simply align every scan with the reference directly, this is likely to produce inferior results. Basic rule of thumb is to register to the image that is closest in anatomy and contrast, in that order.
  • the MRA has a strongly clipped FOV and low tissue contrast
  • Currently (Slicer 3.6) the concatenation of linear and nonlinear transforms is not (yet) supported directly in slicer. However this is an easy and fast procedure that can be done with any text editor. We merely copy the affine portion from one transform file and paste it into the nonrigid transform file.

Discussion: Key Strategies

  1. For the intra-subject affine portion: BRAINSfit
  2. For the inter-subject nonrigid portion: Fast nonrigid BSpline
  3. For combining the transforms: copy and paste in a Text Editor
  4. For applying the transforms and resampling: Resample Scalar/Vector/DWI Volume

Acknowledgments