Difference between revisions of "Documentation:Nightly:Registration:RegistrationLibrary:RegLib C07"

From Slicer Wiki
Jump to: navigation, search
(Created page with 'Back to Registration Library <br> = Slicer Registration Library Case #7: Prostate MRI Cancer Monitoring = == Input == …')
 
Line 38: Line 38:
  
 
== Procedure ==
 
== Procedure ==
#'''Crop''':Extract left breast image of PreRx and PostRx scan [[Media:RegLib_C06_1_Import&Crop.mov|(screencast for this step)]]
+
#'''Bias Correction''': Correct for local intensity inhomogeneities [[Media:RegLib_C07_01_BiasCorr+AffineRegistration.mov|(screencast for this step)]]
##Open the  [[Documentation/Nightly/Modules/Crop_Volume| ''Crop Volume'']]  module (under ''Converters'' menu)
 
##''Input volume'':  "PreRx"
 
##''Input ROI'': "Create & rename new annotation ROI", rename to "PreRx_CropROI" or similar
 
##''Isotropic output voxel'': yes (checkbox)
 
##''Input spacing scaling constant'':increase to 3<small> (the original image has a 0.4 x 0.4 x 5 mm voxel size. Isotropic resolution is highly desirable for registration, but the full resolution would yield a 784^3 image volume that would use too much memory for purposes of this demonstration).  </small>
 
##''Interpolator'': "Linear" (radio button)
 
##you should see a set of colored dots/beads in at least one of the slice views. If not scroll a bit to locate them. The beads represent sides and corners of an ROI box. Drag the corners of the box to completely enclose the left breast (right side of image).
 
##click on the ''Crop!'' button
 
##go to the [[Documentation/Nightly/Modules/Data| ''Data'']] module
 
###several new nodes were created: look for the "PreRx_subvolume-scale_3" entry, double click and rename to "PreRx_Left" or "PreRx_crop" or similar.
 
###Turn off the visibility of the ROI box just created: click on the eye icon next to the "PreRx_CropROI" node. <small> (we do this to more easily distinguish the next ROI box created for the second volume below) </small>
 
##repeat the same for the "PostRx" image. Since this image is smaller, choose '''2''' for the ''Input spacing scaling constant'' (vs. 3 above).
 
##Save intermediate results. You should have now 2 new volumes at ~ 1.3 mm isotropic resolution.
 
#'''Bias Correction''': Correct for local intensity inhomogeneities [[Media: RegLib_C06_2_BiasCorrection.mov|(screencast for this step)]]
 
 
##Open the [[Documentation/Nightly/Modules/N4ITKBiasFieldCorrection| ''N4ITK MRI Bias Correction'']] module  (under ''Filters'' menu)
 
##Open the [[Documentation/Nightly/Modules/N4ITKBiasFieldCorrection| ''N4ITK MRI Bias Correction'']] module  (under ''Filters'' menu)
###Input Image: "PreRx_left"
+
###Input Image: "Day01_axial"
 
###Mask Image: none
 
###Mask Image: none
###Output Volume: create & rename new:  "PreRx_left_n4"
+
###Output Volume: create & rename new:  "Day01_axial_N4"
###Number of iterations:  reduce to 100,80,60
+
###Number of iterations:  reduce to 90,60,40
 
###Shrink factor:  reduce to 3
 
###Shrink factor:  reduce to 3
 
###leave all parameters at defaults
 
###leave all parameters at defaults
 
###Apply.  
 
###Apply.  
##repeat for the Post_Rx image. Same settings
+
##repeat for the "Day42_axial" image. Same settings
 
##save intermediate results
 
##save intermediate results
#'''Build Masks''': [[Media: RegLib_C06_3_BuildMask.mov|(screencast for this step)]]
+
#'''Affine pre-Registration''': [[Media:RegLib_C07_01_BiasCorr+AffineRegistration|(screencast for this step)]]
##open the  [[Documentation/Nightly/Modules/ForegroundMasking| ''Foregroud masking (BRAINS)'']] module (under Segmentation:Specialized)
 
###''Input Image Volume'': PreRx_left_n4
 
###''Output Mask'': create & rename new: "PreRx_mask"
 
###''Apply''
 
##(alternatively you can also use the threshold tool in the Editor to obtain a quick mask)
 
##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 we also need to dilate the mask a bit to extend beyon the edge and include some of the background, which will fill in the tumor space again. Hence we make some manual edits to delete the tumor area from the mask:
 
##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 the Post_Rx_mask
 
##save intermediate results
 
#'''Affine pre-Registration''': [[Media: RegLib_C06_4_Registration.mov|(screencast for this step)]]
 
 
##open the *[[Documentation/Nightly/Modules/BRAINSFit| ''General Registration (BRAINS)'']] module
 
##open the *[[Documentation/Nightly/Modules/BRAINSFit| ''General Registration (BRAINS)'']] module
###''Fixed Image Volume'': PreRx_left_n4
+
###''Fixed Image Volume'': "Day01_axial_N4"
###''Moving Image Volume'': PostRx_left_n4
+
###''Moving Image Volume'': "Day42_axial_N4"
 
###Output Settings:  
 
###Output Settings:  
 
###''Slicer BSpline Transform": none
 
###''Slicer BSpline Transform": none
Line 95: Line 63:
 
###''Apply''
 
###''Apply''
 
###this should generate a first alignment. note that we need not generate an output volume, because this is an intermediate result, and the BRAINS registration tool will automatically place the moving volume inside the result transform.  
 
###this should generate a first alignment. note that we need not generate an output volume, because this is an intermediate result, and the BRAINS registration tool will automatically place the moving volume inside the result transform.  
###Place "PreRx_left_n4" in the background and "PostRx_left_n4" in the foreground. Use fade slider to evaluate the result.
+
###Place "Day01_axial_N4" in the background and "Day42_axial_N4" in the foreground. Use fade slider to evaluate the result. In the Data module, verify that the "Day42_axial_N4" image is sitting ''inside'' the transform "Xf1_Affine"
#'''Nonrigid final Registration''':  [[Media: RegLib_C06_4_Registration.mov|(screencast for this step)]]
+
#'''Build Masks''': [[Media:RegLib_C07_03_GlobalMaskBuilding|(screencast for this step)]]
 +
##open the  [[Documentation/Nightly/Modules/Editor| ''Editor'']] module.
 +
###''Master Volume'': "Day01_axial_N4"
 +
###''Merge Volume'':  create & rename new: "Day01_axial_mask" or similar
 +
###Click ''Apply'' on the popup do confirm colormap selection (choice does not matter)
 +
##click on the Brush Icon ("PaintEffect")
 +
##Label: 1 (black)
 +
##increase radius to ~ 40-50 mm.
 +
##swicth to the "Red Slice Only" view. Navigate to an axial slice showing the prostate
 +
##place brush circle over the prostate & left click to apply, then use arrow keys to move to the next slice.
 +
##repeat for the"Day42_axial_N4" image
 +
##save intermediate results
 +
#'''Nonrigid global Registration''':  [[Media:RegLib_C07_02_BSplineRegistration_unmasked.mov|(screencast for this step)]]
 
##open the [[Documentation/Nightly/Modules/BRAINSFit| ''General Registration (BRAINS)'']] module
 
##open the [[Documentation/Nightly/Modules/BRAINSFit| ''General Registration (BRAINS)'']] module
###''Fixed Image Volume'': PreRx_left_n4
+
###''Fixed Image Volume'': "Day01_axial_N4"
###''Moving Image Volume'': PostRx_left_n4
+
###''Moving Image Volume'': "Day42_axial_N4"
 
###''Initialization transform'': "Xf1_Affine''
 
###''Initialization transform'': "Xf1_Affine''
 
###''Initialize Transform Mode'': de-select ''Use Moments Align'', select '''None'''
 
###''Initialize Transform Mode'': de-select ''Use Moments Align'', select '''None'''
Line 105: Line 85:
 
###''Slicer BSpline Transform": create & rename new transform, rename to "Xf2_BSpline"
 
###''Slicer BSpline Transform": create & rename new transform, rename to "Xf2_BSpline"
 
###''Slicer Linear Transform'': none
 
###''Slicer Linear Transform'': none
###''Output Image Volume'': create & rename new transform, rename to "PostRx_left_Xf2" <small> (this time we must request an output volume, since the nonrigid deformations cannot be visualized on the "fly.
+
###''Output Image Volume'': create & rename new transform, rename to "Day42_Xf2" or similar <small> (this time we must request an output volume, since the nonrigid deformations cannot be visualized on the "fly.
 +
###''Registration Phases'': uncheck rigid & affine boxes, check box for ''BSpline'' only
 +
###''Main Parameters'':
 +
###''Number Of Samples'': 300,000
 +
###''B-Spline Grid Size'': 5,5,5
 +
###Leave all other settings at default
 +
###click: Apply
 +
#'''Nonrigid masked Registration''':  [[Media:RegLib_C07_04_BSplineRegistration_masked.mov|(screencast for this step)]]
 +
##open the [[Documentation/Nightly/Modules/BRAINSFit| ''General Registration (BRAINS)'']] module
 +
###''Fixed Image Volume'': "Day01_axial_N4"
 +
###''Moving Image Volume'': "Day42_axial_N4"
 +
###''Initialization transform'': "Xf1_Affine''
 +
###''Initialize Transform Mode'': de-select ''Use Moments Align'', select '''None'''
 +
###Output Settings:
 +
###''Slicer BSpline Transform": create & rename new transform, rename to "Xf3_BSpline_masked"
 +
###''Slicer Linear Transform'': none
 +
###''Output Image Volume'': create & rename new transform, rename to "Day42_Xf3" or similar
 
###''Registration Phases'': uncheck rigid & affine boxes, check box for ''BSpline'' only
 
###''Registration Phases'': uncheck rigid & affine boxes, check box for ''BSpline'' only
 
###''Main Parameters'':
 
###''Main Parameters'':
 
###''Number Of Samples'': 300,000
 
###''Number Of Samples'': 300,000
 
###''B-Spline Grid Size'': 7,7,5
 
###''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
 
###Leave all other settings at default
 
###click: Apply
 
###click: Apply

Revision as of 17:41, 3 September 2013

Home < Documentation:Nightly:Registration:RegistrationLibrary:RegLib C07

Back to Registration Library

Slicer Registration Library Case #7: Prostate MRI Cancer Monitoring

Input

this is the main fixed reference image. All images are ev. aligned into this space
RegArrow NonRigid.png
this is the moving image.
exam 1: baseline MRI exam 1: follow-up MRI

Description

This is an example of serial/logitudinal imaging for change assessment in prostate cancer. We seek to register the follow-up scan to the baseline. Because of the strong changes in image field of view and contrast between the two exams, some additional work is necessary to obtain a good registration: 1) we will first apply a bias field correction to both images, to reduce regional intensity inhomogeneities caused during acquisition by the surface coils. 2) we will generate masks that include only the prostate and a bit of the surroundings. The field of view between the two images is different. When there is content that extends beyond the FOV and the amount differs in both images, leaving that clipped structure unmasked is problematic, particularly for highe DOF registrations, since the registration will try to match the "missing content" by expanding/stretching in that direction. Hence we mask out significant content present only in one image.

Modules used


Download (from NAMIC MIDAS)

Why 2 sets of files? The "input data" mrb includes only the unregistered data to try the method yourself from start to finish. The full dataset includes intermediate files and results (transforms, resampled images etc.). If you use the full dataset we recommend to choose different names for the images/results you create yourself to distinguish the old data from the new one you generated yourself.

Keywords

MRI, prostate, intra-subject, prostate cancer

Video Screencasts

  1. Movie/screencast showing importing, bias correction and affine registration
  2. Movie/screencast showing nonrigid registration without any masking
  3. Movie/screencast showing building the masks for registration
  4. Movie/screencast showing BSpline registration with the use of a mask


Procedure

  1. Bias Correction: Correct for local intensity inhomogeneities (screencast for this step)
    1. Open the N4ITK MRI Bias Correction module (under Filters menu)
      1. Input Image: "Day01_axial"
      2. Mask Image: none
      3. Output Volume: create & rename new: "Day01_axial_N4"
      4. Number of iterations: reduce to 90,60,40
      5. Shrink factor: reduce to 3
      6. leave all parameters at defaults
      7. Apply.
    2. repeat for the "Day42_axial" image. Same settings
    3. save intermediate results
  2. Affine pre-Registration: (screencast for this step)
    1. open the * General Registration (BRAINS) module
      1. Fixed Image Volume: "Day01_axial_N4"
      2. Moving Image Volume: "Day42_axial_N4"
      3. Output Settings:
      4. Slicer BSpline Transform": none
      5. Slicer Linear Transform: create & rename new transform, rename to "Xf1_Affine"
      6. Output Image Volume: none
      7. Initialize Transform Mode: select Use Moments Align.
      8. Registration Phases: check boxes for Rigid , Rigid+Scale and Affine
      9. Main Parameters : Number Of Samples: 200,000
      10. Leave all other settings at default
      11. Apply
      12. this should generate a first alignment. note that we need not generate an output volume, because this is an intermediate result, and the BRAINS registration tool will automatically place the moving volume inside the result transform.
      13. Place "Day01_axial_N4" in the background and "Day42_axial_N4" in the foreground. Use fade slider to evaluate the result. In the Data module, verify that the "Day42_axial_N4" image is sitting inside the transform "Xf1_Affine"
  3. Build Masks: (screencast for this step)
    1. open the Editor module.
      1. Master Volume: "Day01_axial_N4"
      2. Merge Volume: create & rename new: "Day01_axial_mask" or similar
      3. Click Apply on the popup do confirm colormap selection (choice does not matter)
    2. click on the Brush Icon ("PaintEffect")
    3. Label: 1 (black)
    4. increase radius to ~ 40-50 mm.
    5. swicth to the "Red Slice Only" view. Navigate to an axial slice showing the prostate
    6. place brush circle over the prostate & left click to apply, then use arrow keys to move to the next slice.
    7. repeat for the"Day42_axial_N4" image
    8. save intermediate results
  4. Nonrigid global Registration: (screencast for this step)
    1. open the General Registration (BRAINS) module
      1. Fixed Image Volume: "Day01_axial_N4"
      2. Moving Image Volume: "Day42_axial_N4"
      3. Initialization transform: "Xf1_Affine
      4. Initialize Transform Mode: de-select Use Moments Align, select None
      5. Output Settings:
      6. Slicer BSpline Transform": create & rename new transform, rename to "Xf2_BSpline"
      7. Slicer Linear Transform: none
      8. Output Image Volume: create & rename new transform, rename to "Day42_Xf2" or similar (this time we must request an output volume, since the nonrigid deformations cannot be visualized on the "fly.
      9. Registration Phases: uncheck rigid & affine boxes, check box for BSpline only
      10. Main Parameters:
      11. Number Of Samples: 300,000
      12. B-Spline Grid Size: 5,5,5
      13. Leave all other settings at default
      14. click: Apply
  5. Nonrigid masked Registration: (screencast for this step)
    1. open the General Registration (BRAINS) module
      1. Fixed Image Volume: "Day01_axial_N4"
      2. Moving Image Volume: "Day42_axial_N4"
      3. Initialization transform: "Xf1_Affine
      4. Initialize Transform Mode: de-select Use Moments Align, select None
      5. Output Settings:
      6. Slicer BSpline Transform": create & rename new transform, rename to "Xf3_BSpline_masked"
      7. Slicer Linear Transform: none
      8. Output Image Volume: create & rename new transform, rename to "Day42_Xf3" or similar
      9. Registration Phases: uncheck rigid & affine boxes, check box for BSpline only
      10. Main Parameters:
      11. Number Of Samples: 300,000
      12. B-Spline Grid Size: 7,7,5
      13. Leave all other settings at default
      14. 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