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

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…')
 
Line 4: Line 4:
  
 
==Slicer Registration Library Exampe #11: Co-registration of two anatomic brain atlases for merging of structure labels ==
 
==Slicer Registration Library Exampe #11: Co-registration of two anatomic brain atlases for merging of structure labels ==
 
 
{| style="color:#bbbbbb; background-color:#333333;" cellpadding="10" cellspacing="0" border="0"
 
{| style="color:#bbbbbb; background-color:#333333;" cellpadding="10" cellspacing="0" border="0"
|[[Image:RegLib_C10_EMAtlas1.png|150px|lleft|this is the fixed reference image. All images are aligned into this space]]  
+
|[[Image:RegLib_C11_A1_gray.png|150px|lleft|this is the fixed reference image. All images are aligned into this space]]
 +
|[[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]]
 
|[[Image:Arrow_left_gray.jpg|100px|lleft]]  
 
|[[Image:Arrow_left_gray.jpg|100px|lleft]]  
|[[Image:RegLib_C10_EMAtlas2.png|150px|lleft|this is the moving image. The transform is calculated by matching this to the reference image]]
+
|[[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: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]]
 
|align="left"|LEGEND<br><small><small>
 
|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_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_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>
 
</small></small>
 
|-
 
|-
|[[Image:Button_red_fixed.jpg|40px|lleft]]  Target Atlas
+
|[[Image:Button_red_fixed.jpg|40px|lleft]]  Target Atlas T1
 +
|[[Image:Button_red_fixed.jpg|40px|lleft]]  Target Atlas Labelmap
 
|
 
|
|[[Image:Button_green_moving.jpg|40px|lleft]] 2nd (older) Atlas containing labels for thalamic nuclei
+
|[[Image:Button_blue_tag.jpg|40px|lleft]] Moving Atlas T1
 +
|[[Image:Button_green_moving.jpg|40px|lleft]] Moving Atlas Labelmap
 
|-
 
|-
|0.9375 x 0.9375 x 1.5 mm axial <br> 256 x 256 x 124<br>T1w, PA
+
|1mm isotropic<br> 256 x 256 x 256<br>PA
 +
|1mm isotropic<br> 256 x 256 x 256<br>PA
 
|
 
|
|0.9375 x 0.9375 x 1.5 mm axial <br> 256 x 256 x 124<br>T1w, PA
+
|0.9375 x 0.9375 x 1.5mm isotropic<br> 256 x 256 x 159<br>PA
 +
|0.9375 x 0.9375 x 1.5mm isotropic<br> 256 x 256 x 159<br>PA
 
|}
 
|}
 +
  
 
===Objective / Background ===
 
===Objective / Background ===
This is an example of sparse atlas co-registration. Not all atlases have an associated reference image that can be used for registration. Because the atlas represents a map of a particular tissue class probability, its contrast differs significantly from the target image.
+
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.
 +
 
 
=== Keywords ===
 
=== Keywords ===
MRI, brain, head, inter-subject, probabilistic atlas, atlas-based segmentation
+
MRI, brain, head, inter-subject, atlas to atlas, surface-based segmentation, thalamic nuclei
  
 
===Input Data===
 
===Input Data===
*[[Image:Button_red_fixed_white.jpg|20px]]reference/fixed : T1w axial, 1mm resolution in plane, 3mm slices
+
*[[Image:Button_red_fixed_white.jpg|20px]]reference/fixed : T1w coronal, 1mm isotropic. Called ''A1_gray''
*[[Image:Button_green_moving_white.jpg|20px]] moving: Probabilistic Tissue atlas,  
+
*[[Image:Button_red_fixed_white.jpg|20px]]reference/fixed : labelmap , aligned with above. Called ''A1_label''
 +
*[[Image:Button_green_moving_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 ===
#build brain mask for fixed image using '''Skull Stripping''' module. Settings:  100 iterations, 20 subdivisions. New Volume: ''RegLib_C10_MRI_AtlasSegmentation_fixed_mask''
+
#Visualize & browse A0 data: determine label range of thalamic nuclei labels in A0_label: 500-526
#manually edit brain mask with '''Editor''' module. required manual fix at frontal and occipital lobe
+
#Visualize & browse A1 data: determine label range of thalamus lables in A1_label: 10 and 49
#run '''Register Images''' , Settings:  
+
#Build label mask of thalamus for A0: threshold A0_label from 500 t0 526
::*Fixed Image:
+
#Build label mask of thalamus for A1: change label 10 to 49; threshold A1_label from 49 to 49
::*Moving Image:
+
#Smooth A1 thalamus labelmap: Median Filter
::*Resample Image:
+
#Build thalamus surface model of A0
::*Load Transform:
+
#Build thalamus surface model of A1
::*Save Transform: ''RegLib_C10_MRI_AtlasSegmentation_Xform_Affine_wmsk''
+
#run '''Python Surface ICP Registration''' , Settings:
::*Initialization: Centers of Mass,
+
::*Landmark transform mode: Affine
::*Registration: PipelineAffine
+
::*Mean Distance Mode: RMS
::*Expected offset: 10
+
::*Maximum Number of Iterations: 500
::*Expected Rotation: 0.2
+
::*Maximum Nmber of Landmarks: 200
::*Expected Scale: 0.1
+
::*Start by matching centroidsyes
::*Expected Skew: 0.05
+
::*maximum mean distance:  0.01
::*Fixed Image Mask: ''RegLib_C10_MRI_AtlasSegmentation_fixed_mask''
+
::*Initial Transform: none
::*Affine Max Iteration: 80
+
::*Input Surface: ''A0_ThalamusModel''
::*Affine Sampling Ratio: 0.05
+
::*Target Surface: ''A1_ThalamusModel''
#(alternatively automated Affine Registration: '''Register Images Multires''' (Slicer 3.5) also produces good results
+
::*Output Surface: none
# run '''Deformable B-spline Registration''' module. Settings:  
+
::*Output Transform: ''Xform_A0Affine_ICP''
::*Grid Size: 5
+
# Apply Registration Xform to labelmap: '''Resample Scalar/Vector/DWI Volume''' module. Settings:  
:;*Histogram Bins: 50,
+
::*Input Volume : ''A0_labels''
::*Spatial Samples: 50000,
+
::*Reference Volume : ''A1_labels''
::*initial transform: ''RegLib_C10_MRI_AtlasSegmentation_Xform_Affine_wmsk''
+
::*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===

Revision as of 16:42, 17 February 2010

Home < Projects:RegistrationLibrary:RegLib C11

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

Slicer Registration Library Exampe #11: Co-registration of two anatomic brain atlases for merging of structure labels

this is the fixed reference image. All images are aligned into this space this is the fixed target, a label-map in the same space as the fixed reference. The registration target is derived from this image lleft this is the moving image, but the transform is calculated by matching surfaces derived from the labelmaps 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 LEGEND

lleft this indicates the reference image that is fixed and does not move. All other images are aligned into this space and resolution
lleft this indicates the moving image that determines the registration transform.
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.

lleft Target Atlas T1 lleft Target Atlas Labelmap lleft Moving Atlas T1 lleft Moving Atlas Labelmap
1mm isotropic
256 x 256 x 256
PA
1mm isotropic
256 x 256 x 256
PA
0.9375 x 0.9375 x 1.5mm isotropic
256 x 256 x 159
PA
0.9375 x 0.9375 x 1.5mm isotropic
256 x 256 x 159
PA


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.

Keywords

MRI, brain, head, inter-subject, atlas to atlas, surface-based segmentation, thalamic nuclei

Input Data

  • Button red fixed white.jpgreference/fixed : T1w coronal, 1mm isotropic. Called A1_gray
  • Button red fixed white.jpgreference/fixed : labelmap , aligned with above. Called A1_label
  • Button green moving white.jpg moving: T1w coronal, 0.9 inplane, 1.5mm coronal slices. Called A0_gray
  • Button green moving white.jpg moving: labelmap , aligned with above. Called A0_label

Methods

  1. Visualize & browse A0 data: determine label range of thalamic nuclei labels in A0_label: 500-526
  2. Visualize & browse A1 data: determine label range of thalamus lables in A1_label: 10 and 49
  3. Build label mask of thalamus for A0: threshold A0_label from 500 t0 526
  4. Build label mask of thalamus for A1: change label 10 to 49; threshold A1_label from 49 to 49
  5. Smooth A1 thalamus labelmap: Median Filter
  6. Build thalamus surface model of A0
  7. Build thalamus surface model of A1
  8. run Python Surface ICP Registration , 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
  1. 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”
    1. Change datatype of new volume A0_labels_aff to labelmap (Volumes module)
  1. 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”
    1. Change datatype of new volume A0_labels_aff to labelmap (Volumes module)
  1. 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
    1. 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
  1. Typecast A1_labelmap: Cast Image module
  • Input Volume: A1_label
  • Output Volume: A1_label
  • Output Type: “short”
  1. 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

unregistered
after BSpline non-rigid registration

Download

Discussion: Registration Challenges

  • Because the atlas represents a probabilistic image (i.e. contains blurring from combining multiple subjects), its contrast differs significantly from the target image.
  • The atlas has strong rotational misalignment that can cause difficulty for automated affine registration.
  • The two images represent different anatomies, a non-rigid registration is required

Discussion: Key Strategies

  • Because of the strong differences in image contrast, Mutual Information is recommended as the most robust metric.
  • masking (skull stripping) is highly recommended to obtain good results.
  • because speed is not that critical, we increase the sampling rate for both affine and BSpline registration
  • we also expect larger differences in scale & distortion than with regular structural scans: 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

  • dataset provided by Killian Pohl, Ph.D.