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

From Slicer Wiki
Jump to: navigation, search
m (Text replacement - "\[http:\/\/wiki\.slicer\.org\/slicerWiki\/index\.php\/([^ ]+) ([^]]+)]" to "$2")
 
(13 intermediate revisions by one other user not shown)
Line 3: Line 3:
 
== Input ==
 
== Input ==
 
{| style="color:#bbbbbb; " cellpadding="10" cellspacing="0" border="0"
 
{| style="color:#bbbbbb; " cellpadding="10" cellspacing="0" border="0"
|[[Image:Reglib_C06_Thumb1.jpg|100px|lleft|this is the main fixed reference image. All images are ev. aligned into this space]]  
+
|[[Image:RegLib_C06_Thumb1.png|100px|lleft|this is the main fixed reference image. All images are ev. aligned into this space]]  
|[[Image:Reglib_C06_Thumb_T21.jpg|100px|lleft|this is the main fixed reference image. All images are ev. aligned into this space]]  
+
|[[Image:RegArrow_NonRigid.png|100px|left]]  
|[[Image:RegArrow_Nonrigid.png|70px|lleft]]
+
|[[Image:RegLib_C06_Thumb2.png|100px|lleft|this is the moving image.]]  
|[[Image:Reglib_C04_Thumb_Gd1.jpg|100px|lleft|this is the intra-subject moving image. ]]
 
 
|-
 
|-
 
|exam 1: baseline Pre Rx
 
|exam 1: baseline Pre Rx
 +
|
 
|exam 1: follow-up Post Rx
 
|exam 1: follow-up Post Rx
 
|}
 
|}
Line 14: Line 14:
 
==Description ==
 
==Description ==
 
This is an example of serial/logitudinal imaging for change assessment. We have a pre- and post-treatment MRI. To assess the treatment effect we seek to register the postRx scan to the baseline. Because of the strong changes in image content and contrast between the two exams, some additional work is necessary to obtain a good registration: 1) we will register only the left breast containing the tumor, i.e. we will crop the image to a much smaller FOV, while also obtaining a more isotropic resolution; 2) we have strong intensity bias in the images (originating from MR receiver coil sensitivity) that needs to be corrected first, otherwise it will negatively bias the registration; and 3) we will generate masks that include the breast but not the tumor, to ensure the nonrigid portion of the registration will not try to compensate for the tumor change.
 
This is an example of serial/logitudinal imaging for change assessment. We have a pre- and post-treatment MRI. To assess the treatment effect we seek to register the postRx scan to the baseline. Because of the strong changes in image content and contrast between the two exams, some additional work is necessary to obtain a good registration: 1) we will register only the left breast containing the tumor, i.e. we will crop the image to a much smaller FOV, while also obtaining a more isotropic resolution; 2) we have strong intensity bias in the images (originating from MR receiver coil sensitivity) that needs to be corrected first, otherwise it will negatively bias the registration; and 3) we will generate masks that include the breast but not the tumor, to ensure the nonrigid portion of the registration will not try to compensate for the tumor change.
 +
*[http://na-mic.org/Wiki/index.php/Projects:RegistrationLibrary:RegLib_C06 see here for the '''Slicer 4.1''' version of this case/tutorial]
 +
*[http://na-mic.org/Wiki/index.php/Projects:RegistrationLibrary:RegLib_C06B see here for the '''Slicer 3.6''' version of this case/tutorial]
  
 
== Modules used ==
 
== Modules used ==
 
*[[Documentation/Nightly/Modules/Crop_Volume| ''Crop Volume'']]
 
*[[Documentation/Nightly/Modules/Crop_Volume| ''Crop Volume'']]
 
*[[Documentation/Nightly/Modules/N4ITKBiasFieldCorrection| ''N4ITKBiasFieldCorrection (filter correcting for local intensity inhomogeneity)'']]
 
*[[Documentation/Nightly/Modules/N4ITKBiasFieldCorrection| ''N4ITKBiasFieldCorrection (filter correcting for local intensity inhomogeneity)'']]
*[[Documentation/Nightly/Modules/ForegroundMasking| '''Foregroud masking (BRAINS) (quick mask generation)'']]
+
*[[Documentation/Nightly/Modules/ForegroundMasking| ''Foregroud masking (BRAINS) (quick mask generation)'']]
 
*[[Documentation/Nightly/Modules/Editor| ''Editor'']]
 
*[[Documentation/Nightly/Modules/Editor| ''Editor'']]
 
*[[Documentation/Nightly/Modules/BRAINSFit| ''General Registration (BRAINS)'']]
 
*[[Documentation/Nightly/Modules/BRAINSFit| ''General Registration (BRAINS)'']]
Line 25: Line 27:
 
== Download (from NAMIC MIDAS) ==
 
== Download (from NAMIC MIDAS) ==
 
<small>''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. ''</small>
 
<small>''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. ''</small>
*[http://slicer.kitware.com/midas3/download/?items=xx '''RegLib_C06.mrb''': input data only, use this to run the tutorial from the start <small>(Slicer mrb file. 19 MB). </small>]
+
*[http://slicer.kitware.com/midas3/download/?items=116852 '''RegLib_C06.mrb''': input data only, use this to run the tutorial from the start <small>(Slicer mrb file. 40 MB). </small>]
*[http://slicer.kitware.com/midas3/download/?items=xx '''RegLib_C06_full.mrb''': includes raw data + all solutions and intermediate files, use to browse/verify <small>(Slicer mrb file. 19 MB). </small>]
+
*[http://slicer.kitware.com/midas3/download/?items=116851 '''RegLib_C06_full.mrb''': includes raw data + all solutions and intermediate files, use to browse/verify <small>(Slicer mrb file. 65 MB). </small>]
  
 
== Keywords ==
 
== Keywords ==
Line 38: Line 40:
  
 
== Procedure ==
 
== Procedure ==
#'''Crop''':Extract left breast image of PreRx and PostRx scan
+
#'''Crop''':Extract left breast image of PreRx and PostRx scan [[Media:RegLib_C06_1_Import&Crop.mov|(screencast for this step)]]
##Open the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/Crop_Volume ''Crop Volume'' module]
+
##Open the [[Documentation/Nightly/Modules/Crop_Volume| ''Crop Volume'']]  module (under ''Converters'' menu)
 
##''Input volume'':  "PreRx"
 
##''Input volume'':  "PreRx"
##''Input ROI'': "Create new annotation ROI"
+
##''Input ROI'': "Create & rename new annotation ROI", rename to "PreRx_CropROI" or similar
##''ROI visibilité'': turn on
 
 
##''Isotropic output voxel'': yes (checkbox)
 
##''Isotropic output voxel'': yes (checkbox)
##''Interpolator'': "WindowedSinc" (radio button)
+
##''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>
##place/drag the color markers visible in the slice views to enclose the left breast only (right side of image)
+
##''Interpolator'': "Linear" (radio button)
##click on ''Crop!'' 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).
#go to the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/Data ''Data module'']
+
##click on the ''Crop!'' button
##several new nodes were created: look for the "PreRx_subvolume-scale_1" entry, double click and rename to "PreRx_Left"
+
##go to the [[Documentation/Nightly/Modules/Data| ''Data'']] module
#repeat the same for the "PostRx" image
+
###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.
#Save intermediate results.
+
###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>
*'''Phase 2: MRI Bias field inhomogeneity correction
+
##repeat the same for the "PostRx" image. Since this image is smaller, choose '''2''' for the ''Input spacing scaling constant'' (vs. 3 above).
#Open the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/N4ITKBiasFieldCorrection ''N4ITKBiasFieldCorrection'' module]
+
##Save intermediate results. You should have now 2 new volumes at ~ 1.3 mm isotropic resolution.
##Input Image: PreRx_left
+
#'''Bias Correction''': Correct for local intensity inhomogeneities [[Media: RegLib_C06_2_BiasCorrection.mov|(screencast for this step)]]
##Mask Image: none
+
##Open the [[Documentation/Nightly/Modules/N4ITKBiasFieldCorrection| ''N4ITK MRI Bias Correction'']] module (under ''Filters'' menu)
##Output Volume: create & rename new:  "PreRx_left_n4"
+
###Input Image: "PreRx_left"
##leave all parameters at defaults
+
###Mask Image: none
##Apply.
+
###Output Volume: create & rename new:  "PreRx_left_n4"
#repeat for the Post_Rx image.
+
###Number of iterations:  reduce to 100,80,60
#save intermediate results
+
###Shrink factor:  reduce to 3
*'''Phase 3: Build masks'''
+
###leave all parameters at defaults
#open the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/ForegroundMasking ''Foregroud masking (BRAINS)''] module (under Segmentation:Specialized)
+
###Apply.  
##''Input Image Volume'': PreRx_left
+
##repeat for the Post_Rx image. Same settings
##''Output Mask'': create & rename new: "PreRx_mask"
+
##save intermediate results
##''Output Image clipped by ROI'':  none
+
#'''Build Masks''': [[Media: RegLib_C06_3_BuildMask.mov|(screencast for this step)]]
##''Configuration Parameters'':
+
##open the [[Documentation/Nightly/Modules/ForegroundMasking| ''Foregroud masking (BRAINS)'']] module (under Segmentation:Specialized)
###''ROI Auto Dilate Size'': 0.1
+
###''Input Image Volume'': PreRx_left_n4
###defaults for the rest
+
###''Output Mask'': create & rename new: "PreRx_mask"
##''Apply''
+
###''Apply''
#repeat for Post_Rx_left_n4
+
##(alternatively you can also use the threshold tool in the Editor to obtain a quick mask)
#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 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:
#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 [[Documentation/4.1/Modules/Editor|''Editor'']] module
#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)
##Click ''Apply'' on the popup do confirm colormap selection (choice does not matter)
+
###Master Volume: PreRx_left
##Master Volume: PreRx_left
+
###''Merge Volume'': PreRx_mask (generated above)
##''Merge Volume'': PreRx_mask (generated above)
 
 
##click on the Brush Icon ("PaintEffect")
 
##click on the Brush Icon ("PaintEffect")
 
##Label: 0 (black)
 
##Label: 0 (black)
Line 81: Line 81:
 
##navigate to an axial slice showing the tumor
 
##navigate to an axial slice showing the tumor
 
##click & drag  left mouse to apply, then use arrow keys to move to the next slice.
 
##click & drag  left mouse to apply, then use arrow keys to move to the next slice.
#repeat for Post_Rx_mask
+
##repeat for the Post_Rx_mask
#save intermediate results
+
##save intermediate results
*'''Phase 4: Affine pre-Registration'''
+
#'''Affine pre-Registration''': [[Media: RegLib_C06_4_Registration.mov|(screencast for this step)]]
#open the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/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'': PreRx_left_n4
##''Moving Image Volume'': PostRx_left_n4
+
###''Moving Image Volume'': PostRx_left_n4
##Output Settings:  
+
###Output Settings:  
 
###''Slicer BSpline Transform": none
 
###''Slicer BSpline Transform": none
 
###''Slicer Linear Transform'': create & rename new transform, rename to "Xf1_Affine"
 
###''Slicer Linear Transform'': create & rename new transform, rename to "Xf1_Affine"
 
###''Output Image Volume'': none
 
###''Output Image Volume'': none
##''Registration Phases'': check boxes for ''Rigid'' , ''Rigid+Scale'' and ''Affine''
+
###''Initialize Transform Mode'': select ''Use Moments Align''.
##''Main Parameters'':
+
###''Registration Phases'': check boxes for ''Rigid'' , ''Rigid+Scale'' and ''Affine''
###''Number Of Samples'': 200,000
+
###''Main Parameters : Number Of Samples'': 200,000
##Leave all other settings at default
+
###Leave all other settings at default
##''Apply''
+
###''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.
+
###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.  
*'''Phase 5: Nonrigid final registration'''
+
###Place "PreRx_left_n4" in the background and "PostRx_left_n4" in the foreground. Use fade slider to evaluate the result.
#open the [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/BRAINSFit ''General Registration (BRAINS)''] module
+
#'''Nonrigid final Registration''':  [[Media: RegLib_C06_4_Registration.mov|(screencast for this step)]]
##''Fixed Image Volume'': PreRx_left_n4
+
##open the [[Documentation/Nightly/Modules/BRAINSFit| ''General Registration (BRAINS)'']] module
##''Moving Image Volume'': PostRx_left_n4
+
###''Fixed Image Volume'': PreRx_left_n4
##Output Settings:  
+
###''Moving Image Volume'': PostRx_left_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 "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"
+
###''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.
##''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
+
###''Mask Option'': select ''ROI'' button
###''ROI Masking input fixed'': select  "PreRx_mask" generated in Phase 3 above
+
####''ROI Masking input fixed'': select  "PreRx_mask" generated in Phase 3 above
 
###''ROI Masking input moving'':  select  "PostRx_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
  
 +
=
 +
=== Registration Results===
 +
[[Image:RegLib_C06_unregistered.gif||300px|unregistered]] unregistered
 +
[[Image:RegLib_C06_Affine.gif|300px|affine registered]] after affine registration
 +
[[Image:RegLib_C06_BSpline.gif|300px|Bspline registered]] after nonrigid (BSpline) registration
  
#'''Intra-Exam''': register intra-examT1Gd to PD
 
##open the [[Documentation/Nightly/Modules/BRAINSFit|''General Registration (BRAINS)'' module]]
 
##''Fixed Image Volume'': e1_PD
 
##''Moving Image Volume'': e1_T1Gd
 
##Output Settings:
 
###''Slicer BSpline Transform": none
 
###''Slicer Linear Transform'': create & rename new transform: Xf1_e1-T1Gd_Affine.tfm
 
###''Output Image Volume'': none
 
##''Registration Phases'': check boxes for ''Rigid'', ''Rigid+Scale'' and ''Affine''
 
##''Main Parameters''
 
###'''Number of Samples''': 200,000
 
##click: Apply; runtime < 10 sec (MacPro QuadCore 2.4GHz)
 
#'''repeat for exam 2''', i.e
 
##''Fixed Image Volume'': e2_PD
 
##''Moving Image Volume'': e2_T1Gd
 
##''Slicer Linear Transform'': create & rename new transform: Xf2_e2-T1Gd_Affine.tfm
 
#'''Inter-Exam Registration''': register exam 2 -> exam 1
 
#open the [[Documentation/Nightly/Modules/BRAINSFit|''General Registration (BRAINS)'' module]]
 
##''Fixed Image Volume'': e1_PD
 
##''Moving Image Volume'': e2_PD
 
##Output Settings:
 
###''Slicer BSpline Transform": none
 
###''Slicer Linear Transform'': create & rename new transform: Xf3_e21_Affine.tfm
 
###''Output Image Volume'': none
 
##''Registration Phases'': check boxes for ''Rigid''  and ''Affine''
 
##''Main Parameters''
 
###'''Number of Samples''': 200,000
 
##click: Apply; runtime < 10 sec (MacPro QuadCore 2.4GHz)
 
#'''Organize transform hierarchies'''
 
##go to the [[Documentation/Nightly/Modules/Data|''Data'' module]]
 
##drag the volume node e1_T1Gd onto the transform  Xf1_e1-T1Gd_Affine; let go of the mouse button when you see a hilight box appear around the transform node name
 
##drag the volume node e2_T1Gd onto the transform  Xf2_e2-T1Gd_Affine;
 
##drag the volume node e2_T2 onto the transform Xf3_e21_Affine.tfm
 
##drag the transform node Xf3_e2_T1Gd_Rigid.tfm onto the transform Xf1_e21_Affine.tfm
 
##drag the entire transform  Xf2_e2-T1Gd_Affine '''and its contents''' onto the transform Xf3_e21_Affine.tfm
 
##your MRML data tree should look something like this: [[Image:RegLib_C04_TransformHierarchy.png|100px|lleft|transform hierarchy of inter- and intra-exam registration, bringing everything into alignment with the baseline PD/T2 pair. ]]
 
 
#'''Apply Transform (without resampling''')
 
##for linear (rigid to affine) transforms you have two options for generating a result image in the new orientation: with and without resampling. The method without resampling leaves the original image data untouched and writes the new orientation into the image header. This preserves the full original image quality and is the preferred method, provided that the software using the result image can read the spatial information in the header correctly. If you open an image with a software that does not account for this header information, the image will appear in its original orientation. The resampling method will create a new image volume by interpolating the data into the new space. This has the advantage that your registered volume will have matching size and resolution as your reference image, but it is associated with some data loss from the interpolation during resampling.
 
##''Apply Transform without resampling'':
 
##Go to the [[Documentation/Nightly/Modules/Data|''Data'' module]]
 
##left click on the moving image node and drag it into/onto the transform node. You should see a "+" sign appear next to the transform node indicating the volume is now placed under that transform. If the image is in either foreground or background and visible in the slice views or 3D view, you will see the image update to its new position immediately.
 
##right click on the image node and from the pop-up menu, select ''Harden Transform''. This will apply the transform and move the image node back outside onto the main level.
 
##double click on the image node and rename it to document that this is no longer the original image but the reoriented one. Note that the image in its original position is replaced in memory and no longer accessible. There is no "undo" for this step, so if you wish to return to the original image, you must reload it from the original file. '''Be careful not to accidentally overwrite the original image file with the resampled one. Use a new filename when saving the image'''.
 
#Alternative: '''Apply Transform with resampling''':
 
##Go to the [[Documentation/Nightly/Modules/BRAINSResample|''BRAINSResample'' module]]
 
###''Image To Warp'': select e2_PD
 
###''Reference Image'': select e1_PD
 
###''Outputs:OutputImage'': create & rename new, rename to "e2_PD_Xf3"
 
###''Pixel Type'': select ''short'' , or match the datatype of the original image.
 
###''Transform File'': select "Xf3_e21_Affine.tfm"
 
###''Interpolation Mode'': select "WindowedSinc" (recommended for 3D MRI). For labelmaps select ''Nearest Neighbor''
 
###Click Apply. This will generate a new volume with the same resolution as the reference image.
 
##repeat the same for the label map, but select ''Nearest Neighbor'' as the interpolation type.
 
  
==Registration Results==
+
<!--
 +
comment
 +
-->
  
{|cellpadding="10" cellspacing="0" border="0"
+
== Discussion: Registration Challenges ==
|[[Image:RegLib_C04_unregistered1.gif|300px]] ||baseline PD & contrast T1Gd before registration (click to enlarge)
+
*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.
|[[Image:RegLib_C04_unregistered2.gif|300px]]||baseline and follow-up PD before registration (click to enlarge)
+
*contrast enhancement and pathology and treatment changes cause additional differences in image content
|-
+
*the surface coils used cause strong differences in intensity inhomogeneity.  
|[[Image:RegLib_C04_registered1.gif|300px]]||baseline PD & contrast T1Gd after registration (click to enlarge)
+
*we have strongly anisotropic voxel sizes with much less through-plane resolution
|-
+
*resolution and FOV change between the two scans
|[[Image:RegLib_C04_registered2.gif|300px]]||baseline and follow-up PD after registration (click to enlarge)
 
|-
 
|[[Image:RegLib_C04_registered3.gif|300px]]||baseline and follow-up T1Gd contrast after registration(click to enlarge)
 
|}
 
  
=== Acknowledgments ===
+
== 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

Latest revision as of 02:15, 27 November 2019

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

Back to Registration Library

Slicer Registration Library Case #6: Breast MRI Cancer Treatment

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 Pre Rx exam 1: follow-up Post Rx

Description

This is an example of serial/logitudinal imaging for change assessment. We have a pre- and post-treatment MRI. To assess the treatment effect we seek to register the postRx scan to the baseline. Because of the strong changes in image content and contrast between the two exams, some additional work is necessary to obtain a good registration: 1) we will register only the left breast containing the tumor, i.e. we will crop the image to a much smaller FOV, while also obtaining a more isotropic resolution; 2) we have strong intensity bias in the images (originating from MR receiver coil sensitivity) that needs to be corrected first, otherwise it will negatively bias the registration; and 3) we will generate masks that include the breast but not the tumor, to ensure the nonrigid portion of the registration will not try to compensate for the tumor change.

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, breast, intra-subject, breast cancer, treatment effect

Video Screencasts

  1. Movie/screencast showing importing and cropping the image volume
  2. Movie/screencast showing the bias (intensity inhomogeneity) correction step
  3. Movie/screencast showing building the masks for registration
  4. Movie/screencast showing affine + BSpline registration

Procedure

  1. Crop:Extract left breast image of PreRx and PostRx scan (screencast for this step)
    1. Open the Crop Volume module (under Converters menu)
    2. Input volume: "PreRx"
    3. Input ROI: "Create & rename new annotation ROI", rename to "PreRx_CropROI" or similar
    4. Isotropic output voxel: yes (checkbox)
    5. Input spacing scaling constant:increase to 3 (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).
    6. Interpolator: "Linear" (radio button)
    7. 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).
    8. click on the Crop! button
    9. go to the Data module
      1. 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.
      2. Turn off the visibility of the ROI box just created: click on the eye icon next to the "PreRx_CropROI" node. (we do this to more easily distinguish the next ROI box created for the second volume below)
    10. repeat the same for the "PostRx" image. Since this image is smaller, choose 2 for the Input spacing scaling constant (vs. 3 above).
    11. Save intermediate results. You should have now 2 new volumes at ~ 1.3 mm isotropic resolution.
  2. 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: "PreRx_left"
      2. Mask Image: none
      3. Output Volume: create & rename new: "PreRx_left_n4"
      4. Number of iterations: reduce to 100,80,60
      5. Shrink factor: reduce to 3
      6. leave all parameters at defaults
      7. Apply.
    2. repeat for the Post_Rx image. Same settings
    3. save intermediate results
  3. Build Masks: (screencast for this step)
    1. open the Foregroud masking (BRAINS) module (under Segmentation:Specialized)
      1. Input Image Volume: PreRx_left_n4
      2. Output Mask: create & rename new: "PreRx_mask"
      3. Apply
    2. (alternatively you can also use the threshold tool in the Editor to obtain a quick mask)
    3. 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:
    4. 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)
    5. click on the Brush Icon ("PaintEffect")
    6. Label: 0 (black)
    7. increase radius to ~ 10-15 mm.
    8. navigate to an axial slice showing the tumor
    9. click & drag left mouse to apply, then use arrow keys to move to the next slice.
    10. repeat for the Post_Rx_mask
    11. save intermediate results
  4. Affine pre-Registration: (screencast for this step)
    1. open the * General Registration (BRAINS) module
      1. Fixed Image Volume: PreRx_left_n4
      2. Moving Image Volume: PostRx_left_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 "PreRx_left_n4" in the background and "PostRx_left_n4" in the foreground. Use fade slider to evaluate the result.
  5. Nonrigid final Registration: (screencast for this step)
    1. open the General Registration (BRAINS) module
      1. Fixed Image Volume: PreRx_left_n4
      2. Moving Image Volume: PostRx_left_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 "PostRx_left_Xf2" (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: 7,7,5
      13. Mask Option: select ROI button
        1. ROI Masking input fixed: select "PreRx_mask" generated in Phase 3 above
      14. ROI Masking input moving: select "PostRx_mask" generated in Phase 3 above
      15. Leave all other settings at default
      16. 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