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

From NAMIC Wiki
Jump to: navigation, search
 
(12 intermediate revisions by the same user not shown)
Line 17: Line 17:
 
<big>[[Projects:RegistrationLibrary:RegLib_C06B|'''For the Slicer 3.6 version of this tutorial see here''']]</big>
 
<big>[[Projects:RegistrationLibrary:RegLib_C06B|'''For the Slicer 3.6 version of this tutorial see here''']]</big>
  
=== Modules ===
+
=== Slicer 4.1 Modules used ===
*'''Slicer 3.6.1 recommended modules:
+
*[http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/N4ITKBiasFieldCorrection ''N4ITKBiasFieldCorrection'']
** [http://www.slicer.org/slicerWiki/index.php/Modules:RegisterImagesMultiRes-Documentation-3.6 Robust Multiresolution Affine]'''
+
*[http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/Crop_Volume ''Crop Volume'']
** [http://www.slicer.org/slicerWiki/index.php/Modules:DeformableB-SplineRegistration-Documentation-3.6 Fast Nonrigid BSpline]'''
+
*[http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/ForegroundMasking ''Foregroud masking (BRAINS)'']
 
+
*[http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/Editor ''Editor'']
 +
*[http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/BRAINSFit ''General Registration (BRAINS)'']
 
===Objective / Background ===
 
===Objective / Background ===
 
We seek to align the post-treatment (PostRx) scan with the pre-treatment scan to compare local effects (left side only).
 
We seek to align the post-treatment (PostRx) scan with the pre-treatment scan to compare local effects (left side only).
Line 29: Line 30:
  
 
===Download ===
 
===Download ===
*Data:
+
*'''[[Media:RegLib_C06_Data.zip|RegLib_C06_BreastCancer_Data.zip  <small> (Data, Solution, zip file 164 MB) </small>]]'''
**'''[[Media:RegLib_C06_BreastCancer_Data.zip|RegLib_C06_BreastCancer_Data.zip  <small> (Data,Presets, Solution, zip file 85 MB) </small>]]'''
+
*Documentation: short movie clips (no sound), corresponding to phases 1-5 outlined in detail below.
*Presets
+
**Phase 1: cropping: ''[[Media:RegLib_C06_1-CropVolume.mov|RegLib_C06_1-CropVolume.mov <small> (3min, 12 MB, Quicktime .mov file) </small>]]''
**'''[[Media:RegLib_C06_BreastCancer_ParameterPresets.mrml|Registration parameter presets file <small> (.mrml  file 20 kB) </small>]]'''
+
**Phase 2: bias field inhomogeneity correction: ''[[Media:RegLib_C06_2-BiasCorrection.mov|RegLib_C06_2-BiasCorrection.mov  <small> ( 1.5min 3min, Quicktime .mov file) </small>]]''
**[[Projects:RegistrationDocumentation:ParameterPresetsTutorial|Link to User Guide: How to Load/Save Registration Parameter Presets]]
+
**Phase 3: build mask: ''[[Media:RegLib_C06_3-Masking.mov|RegLib_C06_3-Masking.mov  <small> (5min, 21 MB, Quicktime .mov file) </small>]]''
*Documentation
+
**Phase 4: affine registration: ''[[Media:RegLib_C06_4-AffineRegistration.mov|RegLib_C06_4-AffineRegistration.mov <small> (2min, 10 MB, Quicktime .mov file) </small>]]''
**'''[[Media:RegLib_C06_BreastCancer_Tutorial.ppt|download guided tutorial  <small> (PowerPoint,   2.6 MB) </small>]]'''
+
**Phase 5: nonrigid registration: ''[[Media:RegLib_C06_5-BSplineRegistration.mov|RegLib_C06_5-BSplineRegistration.mov<small> (3min, 17 MB, Quicktime .mov file) </small>]]''
**'''[[Media:RegLib_C06_BreastCancer_Tutorial.ppt|download guided tutorial  <small> (PDF,   1 MB) </small>]]'''
 
  
 
===Input Data===
 
===Input Data===
Line 44: Line 44:
  
 
=== Methods ===
 
=== Methods ===
#Extract left breast image of PreRx scan (''ExtractSubvolumeROI'' module)
+
*'''Phase 1: Extract left breast image of PreRx and PostRx scan'''
#Extract left breast image of PostRx scan (''ExtractSubvolumeROI'' module)
+
#Open the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/Crop_Volume ''Crop Volume'' module]
#run MRI Bias field inhomogeneity correction on PreRx scan (''MRI Bias Field Correction'' module)
+
##''Input volume'':  "PreRx"
#run affine registration (''Robust Multiresolution Affine'' module)
+
##''Input ROI'': "Create new annotation ROI"
##Fixed Image: PreRx_left_BiasCorr
+
##''ROI visibilité'': turn on
##Moving Image: PostRx_left
+
##''Isotropic output voxel'': yes (checkbox)
##Resample Image: none
+
##''Interpolator'': "WindowedSinc" (radio button)
##Output transform: Create new linear transform, rename to: ''Xform_Aff0_MRes''
+
##place/drag the color markers visible in the slice views to enclose the left breast only (right side of image)
##Fixed Image Mask: none
+
##click on ''Crop!'' button
##Step Size (voxels):5
+
#go to the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/Data ''Data module'']
#Evaluate quality of Affine registration: drag PostRx_left inside the abovecreated Xform node (''Data'' module)
+
##several new nodes were created: look for the "PreRx_subvolume-scale_1" entry, double click and rename to "PreRx_Left"
#run Bspline non-rigid registration (''Fast Deformable BSpline registration'' module)
+
#repeat the same for the "PostRx" image
##Iterations: 50
+
#Save intermediate results.
##Grid Size: 5
+
*'''Phase 2: MRI Bias field inhomogeneity correction
##Histogram Bins: 100
+
#Open the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/N4ITKBiasFieldCorrection ''N4ITKBiasFieldCorrection'' module]
##Spatial Samples: 80000
+
##Input Image: PreRx_left
##Constrain Deformation: no
+
##Mask Image: none
##Initial Transform: XForm_Aff0_MRes
+
##Output Volume: create & rename new: "PreRx_left_n4"
##Fixed Image: PreRx_left_BiasCorr
+
##leave all parameters at defaults
##Moving Image: PostRx_left
 
##Output Transform: Create New BSpline Transform, rename to: Xform_BSpline1_Aff0Init
 
##Output Volume: Create New Volume, rename to: PostRx_left_BSpline1
 
 
##Apply.
 
##Apply.
 +
#repeat for the Post_Rx image.
 +
#save intermediate results
 +
*'''Phase 3: Build masks'''
 +
#open the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/ForegroundMasking ''Foregroud masking (BRAINS)''] module (under Segmentation:Specialized)
 +
##''Input Image Volume'': PreRx_left
 +
##''Output Mask'': create & rename new: "PreRx_mask"
 +
##''Output Image clipped by ROI'':  none
 +
##''Configuration Parameters'':
 +
###''ROI Auto Dilate Size'': 0.1
 +
###defaults for the rest
 +
##''Apply''
 +
#repeat for Post_Rx_left_n4
 +
#save intermediate results
 +
#we need to exclude the tumor from the mask, to prevent the registration from trying to match that region. Much should already be excluded from the above segmentation, but it may be necessary to apply some manual edits:
 +
#Go to the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/Editor ''Editor''] module
 +
##Click ''Apply'' on the popup do confirm colormap selection (choice does not matter)
 +
##Master Volume: PreRx_left
 +
##''Merge Volume'': PreRx_mask (generated above)
 +
##click on the Brush Icon ("PaintEffect")
 +
##Label: 0 (black)
 +
##increase radius to ~ 10-15 mm.
 +
##navigate to an axial slice showing the tumor
 +
##click & drag  left mouse to apply, then use arrow keys to move to the next slice.
 +
#repeat for Post_Rx_mask
 +
#save intermediate results
 +
*'''Phase 4: Affine pre-Registration'''
 +
#open the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/BRAINSFit ''General Registration (BRAINS)''] module
 +
##''Fixed Image Volume'': PreRx_left_n4
 +
##''Moving Image Volume'': PostRx_left_n4
 +
##Output Settings:
 +
###''Slicer BSpline Transform": none
 +
###''Slicer Linear Transform'': create & rename new transform, rename to "Xf1_Affine"
 +
###''Output Image Volume'': none
 +
##''Registration Phases'': check boxes for ''Rigid'' , ''Rigid+Scale'' and ''Affine''
 +
##''Main Parameters'':
 +
###''Number Of Samples'': 200,000
 +
##Leave all other settings at default
 +
##''Apply''
 +
##this should generate a first alignment. note that the Slicer4.1 version of BRAINS registration does '''not''' automatically place the moving volume inside the result transform, as it did for Slicer 3.6. In order to see the result, you must either go to the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/Data ''Data module''] and drag the moving volume inside the transform node, or select to generate a resampled ''Output Volume''. See demo movie you can download above on how to do this.
 +
*'''Phase 5: Nonrigid final registration'''
 +
#open the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/BRAINSFit ''General Registration (BRAINS)''] module
 +
##''Fixed Image Volume'': PreRx_left_n4
 +
##''Moving Image Volume'': PostRx_left_n4
 +
##Output Settings:
 +
###''Slicer BSpline Transform": create & rename new transform, rename to "Xf2_BSpline"
 +
###''Slicer Linear Transform'': none
 +
###''Output Image Volume'': create & rename new transform, rename to "PostRx_left_Xf2"
 +
##''Registration Phases'': uncheck rigid & affine boxes, check box for ''BSpline'' only
 +
##''Main Parameters'':
 +
###''Number Of Samples'': 300,000
 +
###''B-Spline Grid Size'': 7,7,5
 +
##''Mask Option'': select ''ROI'' button
 +
###''ROI Masking input fixed'': select  "PreRx_mask" generated in Phase 3 above
 +
###''ROI Masking input moving'':  select  "PostRx_mask" generated in Phase 3 above
 +
##Leave all other settings at default
 +
##click: Apply
  
 
=== Registration Results===
 
=== Registration Results===
[[Image:RegLib_C06_LeftUnreg_AnimGif.gif||300px|unregistered]]
+
[[Image:RegLib_C06_unregistered.gif||300px|unregistered]] unregistered
[[Image:RegLib_C06_LeftAffreg_AnimGif.gif|300px|affine registered]]
+
[[Image:RegLib_C06_Affine.gif|300px|affine registered]] after affine registration
[[Image:RegLib_C06_LeftBSplreg_AnimGif.gif|300px|Bspline registered]]
+
[[Image:RegLib_C06_BSpline.gif|300px|Bspline registered]] after nonrigid (BSpline) registration
  
  
Line 88: Line 141:
 
=== Discussion: Key Strategies ===
 
=== Discussion: Key Strategies ===
 
*because of the strong changes in shape and position, we break the problem down and register each breast separately.  
 
*because of the strong changes in shape and position, we break the problem down and register each breast separately.  
*we perform a bias-field correction on both images before registration
+
*a bias-field correction on both images is necessary before registration
*we use the Multires version of RegisterImages for an initial affine alignment
+
*to get better control over the process, we separate affine prior from final nonrigid alignment. The result of the affine registration is used as initialization for the nonrigid portion
*the nonlinear portion is then addressed with a BSpline or DiffeomorphicDemons algorithm
+
*masking the tumor area is critical for a feasible solution, i.e. the tumor area in both scans should '''not''' participate actively in the registration, i.e. we create a mask that includes everything except the tumor area
*because accuracy is more important than speed here, we increase the sampling rate (i.e. the number of points sampled for the BSpline registration)
 

Latest revision as of 20:43, 6 June 2012

Home < Projects:RegistrationLibrary:RegLib C06

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

updated for v4.1 Slicer4 RegLibLogo.png Registration Library Case #6: Breast MRI Treatment Assessment

this is the fixed reference image. All images are aligned into this space lleft this is the DTI Baseline scan, to be registered with the T2
fixed image/target
pre Rx MRI
moving image
post Rx MRI

Versions

For the Slicer 3.6 version of this tutorial see here

Slicer 4.1 Modules used

Objective / Background

We seek to align the post-treatment (PostRx) scan with the pre-treatment scan to compare local effects (left side only).

Keywords

MRI, breast cancer, intra-subject, treatment assessment, change detection, non-rigid registration

Download

Input Data

  • reference/fixed : 0.44 x 0.44 x 5 mm , 784 x 784 x 30
  • moving: 0.68 x 0.68 x 1.5 mm, 515 x 515 x 93


Methods

  • Phase 1: Extract left breast image of PreRx and PostRx scan
  1. Open the Crop Volume module
    1. Input volume: "PreRx"
    2. Input ROI: "Create new annotation ROI"
    3. ROI visibilité: turn on
    4. Isotropic output voxel: yes (checkbox)
    5. Interpolator: "WindowedSinc" (radio button)
    6. place/drag the color markers visible in the slice views to enclose the left breast only (right side of image)
    7. click on Crop! button
  2. go to the Data module
    1. several new nodes were created: look for the "PreRx_subvolume-scale_1" entry, double click and rename to "PreRx_Left"
  3. repeat the same for the "PostRx" image
  4. Save intermediate results.
  • Phase 2: MRI Bias field inhomogeneity correction
  1. Open the N4ITKBiasFieldCorrection module
    1. Input Image: PreRx_left
    2. Mask Image: none
    3. Output Volume: create & rename new: "PreRx_left_n4"
    4. leave all parameters at defaults
    5. Apply.
  2. repeat for the Post_Rx image.
  3. save intermediate results
  • Phase 3: Build masks
  1. open the Foregroud masking (BRAINS) module (under Segmentation:Specialized)
    1. Input Image Volume: PreRx_left
    2. Output Mask: create & rename new: "PreRx_mask"
    3. Output Image clipped by ROI: none
    4. Configuration Parameters:
      1. ROI Auto Dilate Size: 0.1
      2. defaults for the rest
    5. Apply
  2. repeat for Post_Rx_left_n4
  3. save intermediate results
  4. we need to exclude the tumor from the mask, to prevent the registration from trying to match that region. Much should already be excluded from the above segmentation, but it may be necessary to apply some manual edits:
  5. Go to the Editor module
    1. Click Apply on the popup do confirm colormap selection (choice does not matter)
    2. Master Volume: PreRx_left
    3. Merge Volume: PreRx_mask (generated above)
    4. click on the Brush Icon ("PaintEffect")
    5. Label: 0 (black)
    6. increase radius to ~ 10-15 mm.
    7. navigate to an axial slice showing the tumor
    8. click & drag left mouse to apply, then use arrow keys to move to the next slice.
  6. repeat for Post_Rx_mask
  7. save intermediate results
  • Phase 4: Affine pre-Registration
  1. open the General Registration (BRAINS) module
    1. Fixed Image Volume: PreRx_left_n4
    2. Moving Image Volume: PostRx_left_n4
    3. Output Settings:
      1. Slicer BSpline Transform": none
      2. Slicer Linear Transform: create & rename new transform, rename to "Xf1_Affine"
      3. Output Image Volume: none
    4. Registration Phases: check boxes for Rigid , Rigid+Scale and Affine
    5. Main Parameters:
      1. Number Of Samples: 200,000
    6. Leave all other settings at default
    7. Apply
    8. this should generate a first alignment. note that the Slicer4.1 version of BRAINS registration does not automatically place the moving volume inside the result transform, as it did for Slicer 3.6. In order to see the result, you must either go to the Data module and drag the moving volume inside the transform node, or select to generate a resampled Output Volume. See demo movie you can download above on how to do this.
  • Phase 5: Nonrigid final registration
  1. open the General Registration (BRAINS) module
    1. Fixed Image Volume: PreRx_left_n4
    2. Moving Image Volume: PostRx_left_n4
    3. Output Settings:
      1. Slicer BSpline Transform": create & rename new transform, rename to "Xf2_BSpline"
      2. Slicer Linear Transform: none
      3. Output Image Volume: create & rename new transform, rename to "PostRx_left_Xf2"
    4. Registration Phases: uncheck rigid & affine boxes, check box for BSpline only
    5. Main Parameters:
      1. Number Of Samples: 300,000
      2. B-Spline Grid Size: 7,7,5
    6. Mask Option: select ROI button
      1. ROI Masking input fixed: select "PreRx_mask" generated in Phase 3 above
      2. ROI Masking input moving: select "PostRx_mask" generated in Phase 3 above
    7. Leave all other settings at default
    8. click: Apply

Registration Results

unregistered unregistered affine registered after affine registration Bspline registered after nonrigid (BSpline) registration


Discussion: Registration Challenges

  • soft tissue deformations during image acquisition cause large differences in appearance
  • the large tumor recession represents a significant pre/post difference in image content that will influence unmasked intensity-driven registration, which becomes a problem for the non-rigid portion of registration, particularly at higher DOF, because the registration will try to "recreate" the tumor area from the postRx image in order to match the content.
  • contrast enhancement and pathology and treatment changes cause additional differences in image content
  • the surface coils used cause strong differences in intensity inhomogeneity.
  • we have strongly anisotropic voxel sizes with much less through-plane resolution
  • resolution and FOV change between the two scans

Discussion: Key Strategies

  • because of the strong changes in shape and position, we break the problem down and register each breast separately.
  • a bias-field correction on both images is necessary before registration
  • to get better control over the process, we separate affine prior from final nonrigid alignment. The result of the affine registration is used as initialization for the nonrigid portion
  • masking the tumor area is critical for a feasible solution, i.e. the tumor area in both scans should not participate actively in the registration, i.e. we create a mask that includes everything except the tumor area