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…')
 
m (Text replacement - "http://www.slicer.org/slicerWiki/index.php/" to "https://www.slicer.org/wiki/")
 
(25 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 #11: Co-registration of two anatomic brain atlases for merging of structure labels ==
+
==<small>v3.6.1</small> [[Image:Slicer3-6Announcement-v1.png‎|150px]] Slicer Registration Library Case #11: <br>Co-registration of two anatomic brain atlases for merging of structure labels ==
 
+
=== Input ===
{| style="color:#bbbbbb; background-color:#333333;" cellpadding="10" cellspacing="0" border="0"
+
{| style="color:#bbbbbb; " 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:Arrow_left_gray.jpg|100px|lleft]]
+
|[[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:RegLib_C10_EMAtlas2.png|150px|lleft|this is the moving image. The transform is calculated by matching this to the reference image]]
+
|[[Image:RegArrow_Affine.png|100px|lleft]]  
|align="left"|LEGEND<br><small><small>
+
|[[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: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: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 this image]]
[[Image:Button_green_moving.jpg|20px|lleft]]  this indicates the moving image that determines the registration transform.  <br>
 
</small></small>
 
|-
 
|[[Image:Button_red_fixed.jpg|40px|lleft]]  Target Atlas
 
|
 
|[[Image:Button_green_moving.jpg|40px|lleft]] 2nd (older) Atlas containing labels for thalamic nuclei
 
 
|-
 
|-
|0.9375 x 0.9375 x 1.5 mm axial <br> 256 x 256 x 124<br>T1w, PA
+
|Target Atlas T1
 +
|Target Atlas Labelmap
 
|
 
|
|0.9375 x 0.9375 x 1.5 mm axial <br> 256 x 256 x 124<br>T1w, PA
+
|Moving Atlas T1
 +
|Moving Atlas Labelmap
 
|}
 
|}
 +
 +
=== Modules ===
 +
'''Slicer 3.6.1''' recommended modules:  [https://www.slicer.org/wiki/Modules:PythonSurfaceICPRegistration-Documentation-3.6 ''Surface Registration''']
 +
 +
===Download ===
 +
*Data
 +
**[[Media:RegLib_C11_AtlasMerge_TutorialSet.zip‎‎|download entire '''tutorial package'''  <small> (Original Data, Intermediate Results, Solution, zip file 74 MB) </small>]]
 +
**[[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_C11_AtlasMerge_NewAtlas.zip‎‎|download '''new atlas dataset'''  <small> (MRI T1+T2, labelmap, thalamus model), zip file 126MB) </small>]]
 +
**[[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 132 MB) </small>]]
 +
**[[Media:RegLib_C11_Resampled.zip|download '''resampled atlas dataset'''  <small> (T1 only resampled to 1mm isotropic, padded to 256 , labelmap reoriented as sagittal), zip file 9 MB) </small>]]
 +
*Documentation
 +
**[[Media:RegLib_C11_Tutorial_AtlasMerging.ppt|download full '''step-by-step tutorial'''<small>  (PowerPoint  file, 2.5 MB) </small>]]
 +
**[[Media:RegLib_C11_Tutorial_AtlasMerging.pdf|download full '''step-by-step tutorial'''<small>  (PDF file, 2.8 MB) </small>]]
  
 
===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 registration, thalamic nuclei
  
 
===Input Data===
 
===Input Data===
*[[Image:Button_red_fixed_white.jpg|20px]]reference/fixed : T1w axial, 1mm resolution in plane, 3mm slices
+
*fixed : T1w coronal, 1mm isotropic. Called ''A1_gray''; 1mm isotropic, 256 x 256 x 256
*[[Image:Button_green_moving_white.jpg|20px]] moving: Probabilistic Tissue atlas,  
+
*fixed : labelmap , aligned with above. Called ''A1_label''; 1mm isotropic, 256 x 256 x 256
 +
*moving: T1w coronal, 0.9 inplane, 1.5mm coronal slices. Called ''A0_gray''; 0.9375 x 0.9375 x 1.5mm isotropic, 256 x 256 x 159
 +
*moving: labelmap , aligned with above. Called ''A0_label''; 0.9375 x 0.9375 x 1.5mm isotropic, 256 x 256 x 159
 +
 
 
=== 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: '''Editor''' module
::*Fixed Image:
+
##Create Labelmap From”: ''A0_labels''
::*Moving Image:
+
##Select Labelmap to Edit: select the newly created “A0_labels-label” and then select “Rename”. Rename the new volume to ''A0_thalamus''
::*Resample Image:
+
##From the icon panel, select the “Threshold Icon”
::*Load Transform:
+
##Threshold range: enter 500 and 526
::*Save Transform: ''RegLib_C10_MRI_AtlasSegmentation_Xform_Affine_wmsk''
+
#change ''A1_labels'': change label 10 to 49; '''Editor''' module
::*Initialization: Centers of Mass,  
+
##Select Labelmap to Edit: ''Aa_labels''
::*Registration: PipelineAffine
+
##Label field: enter 49
::*Expected offset: 10
+
##Change Island Icon; left click on area with left thalamus label 10
::*Expected Rotation: 0.2
+
#Build label mask of thalamus for A1:  '''Editor''' module
::*Expected Scale: 0.1
+
##Create Labelmap From”: ''A1_labels''
::*Expected Skew: 0.05
+
##Select Labelmap to Edit: select the newly created “A1_labels-label” and then select “Rename”. Rename the new volume to ''A1_thalamus''
::*Fixed Image Mask: ''RegLib_C10_MRI_AtlasSegmentation_fixed_mask''
+
##From the icon panel, select the “Threshold Icon”
::*Affine Max Iteration: 80
+
##Threshold range: enter 49 and 49
::*Affine Sampling Ratio: 0.05
+
#Smooth A1 thalamus labelmap: '''Filtering / Denoising / Median Filter'''
#(alternatively automated Affine Registration:  '''Register Images Multires''' (Slicer 3.5) also produces good results
+
##Neighborhood Size: (default) 1,1,1
# run '''Deformable B-spline Registration''' module. Settings:  
+
##Input Volume: A1_thalamus
::*Grid Size: 5
+
##Output Volume: A1_thalamus
:;*Histogram Bins: 50,  
+
#Build thalamus surface model of A0: '''Model Maker''' module
::*Spatial Samples: 50000,
+
##Input Volume: ''A0_thalamus''
::*initial transform: ''RegLib_C10_MRI_AtlasSegmentation_Xform_Affine_wmsk''
+
##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"
 
{| style="color:#bbbbbb; background-color:#333333;" cellpadding="10" cellspacing="0" border="0"
|[[Image:RegLib_C10_unreg_AnimGif.gif|200px|left|unregistered]] [[Image:RegLib_C10_BSpline_AnimGif.gif|200px|left|after BSpline non-rigid registration]]  
+
|[[Image:RegLib_C11_AnimGif2.gif|200px|left|unregistered]] [[Image:RegLib_C11_AnimGif1.gif|200px|left|after ICP Surface Registration + Clipping]]  
 
|}
 
|}
  
===Download ===
 
*'''[[Media: RegLib_C10_MRI_AtlasSegmentation_Data.zip‎‎|download entire package  <small> (Data,Tutorial, Solution, zip file 14 MB) </small>]]'''
 
*Presets
 
*Tutorial only
 
*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 ===
*Because the atlas represents a probabilistic image (i.e. contains blurring from combining multiple subjects), its contrast differs significantly from the target image.
+
*Because the structures of interest are a very small subset of the image without distinct grayscale contrast
*The atlas has strong rotational misalignment that can cause difficulty for automated affine registration.
+
*the two atlases represent different anatomies and hence some residual misalignment is inevitable
*The two images represent different anatomies, a non-rigid registration is required
+
*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
  
 
=== Discussion: Key Strategies ===
 
=== Discussion: Key Strategies ===
*Because of the strong differences in image contrast, Mutual Information is recommended as the most robust metric.
+
*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
*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 ===
 
=== Acknowledgments ===
*dataset provided by Killian Pohl, Ph.D.
+
*dataset provided by Ron Kikinis, M.D.  and Florin Talos, M.D.

Latest revision as of 17:17, 10 July 2017

Home < Projects:RegistrationLibrary:RegLib C11

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 #11:
Co-registration of two anatomic brain atlases for merging of structure labels

Input

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 this image
Target Atlas T1 Target Atlas Labelmap Moving Atlas T1 Moving Atlas Labelmap

Modules

'Slicer 3.6.1 recommended modules: Surface Registration

Download

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 registration, thalamic nuclei

Input Data

  • fixed : T1w coronal, 1mm isotropic. Called A1_gray; 1mm isotropic, 256 x 256 x 256
  • fixed : labelmap , aligned with above. Called A1_label; 1mm isotropic, 256 x 256 x 256
  • moving: T1w coronal, 0.9 inplane, 1.5mm coronal slices. Called A0_gray; 0.9375 x 0.9375 x 1.5mm isotropic, 256 x 256 x 159
  • moving: labelmap , aligned with above. Called A0_label; 0.9375 x 0.9375 x 1.5mm isotropic, 256 x 256 x 159

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: Editor module
    1. Create Labelmap From”: A0_labels
    2. Select Labelmap to Edit: select the newly created “A0_labels-label” and then select “Rename”. Rename the new volume to A0_thalamus
    3. From the icon panel, select the “Threshold Icon”
    4. Threshold range: enter 500 and 526
  4. change A1_labels: change label 10 to 49; Editor module
    1. Select Labelmap to Edit: Aa_labels
    2. Label field: enter 49
    3. Change Island Icon; left click on area with left thalamus label 10
  5. Build label mask of thalamus for A1: Editor module
    1. Create Labelmap From”: A1_labels
    2. Select Labelmap to Edit: select the newly created “A1_labels-label” and then select “Rename”. Rename the new volume to A1_thalamus
    3. From the icon panel, select the “Threshold Icon”
    4. Threshold range: enter 49 and 49
  6. Smooth A1 thalamus labelmap: Filtering / Denoising / Median Filter
    1. Neighborhood Size: (default) 1,1,1
    2. Input Volume: A1_thalamus
    3. Output Volume: A1_thalamus
  7. Build thalamus surface model of A0: Model Maker module
    1. Input Volume: A0_thalamus
    2. Model Name: A0_ThalamusModel
    3. Labels: 1
    4. Smooth: 50
    5. Decimate: 0.25
    6. Split Normals: no
    7. Point Normals: yes
    8. Save Intermediate Models: no
  8. Build thalamus surface model of A1 (Model Maker module as above, with A1_thalamus as input and A1_ThalamusModel as output.
  9. Co-register thalamus surfaces: Python Surface ICP Registration module. Settings:
    1. Landmark transform mode: Affine
    2. Mean Distance Mode: RMS
    3. Maximum Number of Iterations: 500
    4. Maximum Nmber of Landmarks: 200
    5. Start by matching centroids: yes
    6. maximum mean distance: 0.01
    7. Initial Transform: none
    8. Input Surface: A0_ThalamusModel
    9. Target Surface: A1_ThalamusModel
    10. Output Surface: none
    11. Output Transform: Xform_A0Affine_ICP
  10. Apply Registration Xform to labelmap: Resample Scalar/Vector/DWI Volume module. Settings:
    1. Input Volume : A0_labels
    2. Reference Volume : A1_labels
    3. Output Volume : “Create New Volume”, rename to “A0_labels_aff”
    4. Transform Node: Xform_A0Affine_ICP
    5. Interpolation Type: “nn”
    6. Change datatype of new volume A0_labels_aff to labelmap (Volumes module)
  11. Apply Registration Xform to thalamus mask: Resample Scalar/Vector/DWI Volume module. Settings:
    1. Input Volume : A0_thalamus
    2. Reference Volume : A1_labels
    3. Output Volume : “Create New Volume”, rename to A0_thalamus_aff
    4. Transform Node: Xform_A0Affine_ICP
    5. Interpolation Type: “nn”
    6. Change datatype of new volume A0_labels_aff to labelmap (Volumes module)
  12. Mask new labelmap with A0_thalamus_aff: Mask Image module
    1. Input Volume : A0_labels_aff
    2. Mask Volume : A0_thalamus_aff
    3. Masked Volume: A0_labels aff
    4. Mask new labelmap with A1_thalamus: Mask Image module
    5. Input Volume : A0_labels_aff
    6. Mask Volume : A1_thalamus_aff
    7. Masked Volume: New volume, rename to: A0_labels aff_clip
  13. Typecast A1_labelmap: Cast Image module
    1. Input Volume: A1_label
    2. Output Volume: A1_label
    3. Output Type: “short”
  14. Merge Labelmaps:Image Label Combine module
    1. Input Label Map A: A0_label_aff_clip
    2. Input Label Map B: A1_labels
    3. Output Label Map: “Create New Volume”, rename to A1_labels_merged
    4. First label overwrites second: yes

Registration Results

unregistered
after ICP Surface Registration + Clipping


Discussion: Registration Challenges

  • Because the structures of interest are a very small subset of the image without distinct grayscale contrast
  • the two atlases represent different anatomies and hence some residual misalignment is inevitable
  • 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

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


Acknowledgments

  • dataset provided by Ron Kikinis, M.D. and Florin Talos, M.D.