Difference between revisions of "DBP3:Utah:RegSegPipeline"

From NAMIC Wiki
Jump to: navigation, search
m (Text replacement - "http://www.slicer.org/slicerWiki/index.php/" to "https://www.slicer.org/wiki/")
 
(37 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
   [[DBP3:Utah| back to DBP3 home]]
 
   [[DBP3:Utah| back to DBP3 home]]
 
= The CARMA DBP: MRI-based study and treatment of atrial fibrillation =
 
= The CARMA DBP: MRI-based study and treatment of atrial fibrillation =
 +
== Pilot Studies on a Registration & Segmentation Pipeline & Workflow ==
 
Alex Zaitsev, Dominik Meier, Ron Kikinis
 
Alex Zaitsev, Dominik Meier, Ron Kikinis
  
== Pilot Studies on a Registration & Segmentation Pipeline & Workflow ==
+
=== Background ===
Overall processing steps are (order tentative)
+
By Rob MacLeod, PI AFib DBP
#N4 bias field correction for the MRI (surface coils):
+
 
## run on entire image gives some benefit that '''may''' be improved with masking: again the dominant intensity dropoff from the surface coil occurs along the chest wall and ribcage. Even if that is not the structure of interest, it is the low-freq. variation the bias correction algorithm is searching for, and masking that out can be counter-productive: via masking we may end up with a smoother image, but the intensity variations removed were not caused by the coil but are actually true signal.
+
The Utah group carries out analysis of MRI scans from all patients coming to our clinical with symptoms of Atrial Fibrillation (AF) and continues to conduct regular MRI scans for patients once they undergo treatment by our physicians. The result is over 1000 MRI scans per year that we process using a set of heterogeneous tools.  One goal of our collaboration with NAMIC is to explore new tools and capabilities to consolidate and streamline this processing pipeline.  The goals of the process vary slightly depending on the timing of the imaging relative to patient care but all involve some combination of image correction, region of interest definition, segmentation of the left atrium (in some cases also right atrium and esophagus), and quantitative evaluation of enhancement in the images, due either to pre-existing fibrosis or post-treatment scar. In many cases, registration is also necessary to compare multiple images from the same patients over time and to compare multiple patients at the same stage of disease progression and treatment.
##Module used: [http://www.slicer.org/slicerWiki/index.php/Modules:N4ITKBiasFieldCorrection-Documentation-3.6 N4 ITK]
+
 
#registration MRA>cMRI
+
For more information, please see the following references:
##the MRA contains the same FOV and has surrounding structures (liver, chest, spine etc) visible also, despite lower intensities. A global affine is thus not necessarily going to benefit from masking the heart, unless the relative motion of the heart becomes the dominant reason for misalignment.
+
 
##Module used: [http://www.slicer.org/slicerWiki/index.php/Modules:BRAINSFit BRAINSfit]
+
R.S. Oakes, T.J. Badger, E.G. Kholmovski, N. Akoum, N.S. Burgon, E.N. Fish, J.J. Blauer, S.N. Rao, E.V. DiBella, N.M. Segerson, M. Daccarett, J. Windfelder, C.J. McGann, D. Parker, R.S. MacLeod, N.F. Marrouche. “Detection and quantification of left atrial structural remodeling with delayed-enhancement magnetic resonance imaging in patients with atrial fibrillation,” In Circulation, Vol. 119, No. 13, pp. 1758--1767. 2009. http://www.sci.utah.edu/publications/oaks09/Oaks_Circ2009.pdf
#ROI definition (manual box ROI or automated via atlas)
+
 
#segmentation of LA from MRA -> inner wall
+
C.J. McGann, E.G. Kholmovski, R.S. Oakes, J.J. Blauer, M. Daccarett, N. Segerson, K.J. Airey, N. Akoum, E. Fish, T.J. Badger, E.V. DiBella, D. Parker, R.S. MacLeod, N.F. Marrouche. “New Magnetic Resonance Imaging-Based Method for Defining the Extent of Left Atrial Wall Injury After the Ablation of Atrial Fibrillation,” In Journal of the American College of Cardiology, Vol. 52, No. 15, pp. 1263--1271. Oct 7, 2008. http://www.sci.utah.edu/publications/mcgann08/mcg2008.pdf
##as a dynamic image the MRA contains significant spread and likely requires interactive segmentation/thresholding to yield a satisfactory LA volume
+
 
##Module used: [http://www.slicer.org/slicerWiki/index.php/Modules:Editor-Documentation-3.6 Editor: thresholding]  or thresholding within [http://www.slicer.org/slicerWiki/index.php/Modules:Volumes-Documentation-3.6 Volumes thresholding option within ''Display'' tab, use ''iron'' colormap & low alpha setting to check for ventricular wall borders.
+
C. Mahnkopf, T.J. Badger, N.S. Burgon, M. Daccarett, T.S. Haslam, C.T. Badger, C.J. McGann, N. Akoum, E. Kholmovski, R.S. Macleod, N.F. Marrouche. “Evaluation of the left atrial substrate in patients with lone atrial fibrillation using delayed-enhanced MRI: implications for disease progression and response to catheter ablation,” In Heart Rhythm, Vol. 7, No. 10, pp. 1475--1481. 2010.  http://www.sci.utah.edu/publications/mahnkopf10/mahnkopf2010.pdf
 +
 
 +
A set of anonymized test data of sixty patients available for general use and more extensive deidentified data for exclusive use with NAMIC is available here: http://hdl.handle.net/1926/1757. Please contact me (macleod@sci.utah.edu) for more details.
  
##cropping and island removal
+
=== Main processing pipeline ===
#LA wall segmentation
+
To facilitate the workflow, we can place all the automated steps at the beginning and cluster interactive elements at the end. Exception is the cropping step required as input for nonrigid registration.<br>
## very small structure, most reliably done manually direct. Starting with automation may yield more effort on post-edits
+
1. N4 bias field correction for the MRI (surface coils):
##Module used: [http://www.slicer.org/slicerWiki/index.php/Modules:Editor-Documentation-3.6 Editor: manual outline]   
+
::*'''Input''': MRI_pre and MRI_post, each run separately with the same parameters below; '''Output:''' MRI_pre_n4 and MRI_post_n4
#segmentation of enhancement within LA wall: intensity statistics. An atlas-based set of intensity distributions may be more meaningful here than a simple Otsu, because both amount and location of enhancement is unknown and can in theory be 0.  
+
::*'''Module used:''' [https://www.slicer.org/wiki/Modules:N4ITKBiasFieldCorrection-Documentation-3.6 N4 ITK]; '''Parameters:''' convergence: 1e-5, iterations: 50,40,30,20, shrink factor: 3
#registration follow-up -> baseline
+
::*''Comments:'' a run  on entire image gives some benefit that '''may''' be improved with masking: again the dominant intensity dropoff from the surface coil occurs along the chest wall and ribcage. Even if that is not the structure of interest, it is the low-freq. variation the bias correction algorithm is searching for, and masking that out can be counter-productive: via masking we may end up with a smoother image, but the intensity variations removed were not caused by the coil but are actually true signal.
##most reliably done on the post contrast MRI.
+
2. affine registration MRA ->MRI (both pre and post)
##DOF of 12 or even low-res BSpline should be ok
+
::*'''Input''': MRI_pre_n4 (fixed) and MRA_pre ; '''Output:''' Xf1_pre_MRA-MRI.tfm"
##Module used: [http://www.slicer.org/slicerWiki/index.php/Modules:BRAINSFit BRAINSfit]
+
::*'''Input''': MRI_post_n4 (fixed) and MRA_post ; '''Output:''' Xf2_post_MRA-MRI.tfm"
 +
::*'''Module used:'''  [https://www.slicer.org/wiki/Modules:BRAINSFit BRAINSfit]
 +
::*'''Parameters:''' no initialization; samples: 200k, convergence: 1e-5, iterations:
 +
::*''Comments:'' from the example dataset (P1) we infer that the two scans tend to have little initial alignment, hence initialization steps are not recommended. We choose registration parameters such that the chance of the registration making the alignment worse is minimized.  Decide in a subsequent review/QC step if we keep the transform or the original pose. The MRA contains the same FOV and has surrounding structures (liver, chest, spine etc) visible also, despite lower intensities. A global affine is thus not necessarily going to benefit from masking the heart, unless the relative motion of the heart becomes the dominant reason for misalignment. We tried masking with both BrainsFit and RobustMultires modules. Both failed to provide better alignment with masking.
 +
3. registration post -> pre: phase 1: AFFINE
 +
::*'''Input''': MRI_pre_n4 (fixed) and MRI_post_n4 (moving) ; '''Output:''' Xf3_pre-post_affine.tfm
 +
::*'''Module used:'''  [https://www.slicer.org/wiki/Modules:BRAINSFit BRAINSfit]
 +
::*'''Parameters:''' DOF: rigid+similarity+affine (possibly rigid only);  initialization: Moments align ; samples: 200k, convergence: 1e-5, iterations:
 +
::*''Comments:'' done on the entire image. The surrounding structures are useful in constraining the solution transform and should provide a more robust behavior. Cropping down to the cardiac only ROI is deferred to the nonrigid registration in phase 2. The inferior-superior FOV can differ, e.g. how much of the liver is included. If the two exams differ significantly (>30%) in that content, the above affine could fail and a prior cropping step is then suggested to better match image content before registration. Resampling to isotropic voxel size at this stage is also advantageous but will generate very large files > 100MB due to the full FOV.
 +
4. Cropping to VOI:
 +
::*'''Input''': MRI_pre_n4 (fixed) and MRI_post_n4 (moving) ; '''Output:''' MRI_pre_n4_cropped, MRI_post_n4_cropped
 +
::*'''Module used:''' [https://www.slicer.org/wiki/Modules:CropVolume-Documentation-3.6 Crop Volume]
 +
::*''Comments:'' the [https://www.slicer.org/wiki/Modules:VolumeRendering-Documentation-3.6 volume rendering module] may help in obtaining a good cropping ROI. Because of the high contrast, the MRA provides a good source for volume rendering.
 +
5. registration post -> pre: phase 2: nonrigid / BSPLINE
 +
::*'''Input''': MRI_pre_n4_cropped (fixed) and MRI_post_n4_cropped (moving) ; '''Output:''' Xf4_pre-post_BSpline.tfm"
 +
::*'''Module used:'''  [https://www.slicer.org/wiki/Modules:BRAINSFit BRAINSfit] or  [https://www.slicer.org/wiki/Modules:CMTK CMTK]
 +
::*'''Parameters:''' DOF: BSpline only;  initialization: Xf3_pre-post_affine.tfm ; samples: 200k, convergence: 1e-5, iterations:
 +
::*''Comments:'' crop to volume of interest: [https://www.slicer.org/wiki/Modules:CropVolume-Documentation-3.6 CropVolume module], use ''Resample to isotropic voxelsize'' option.
 +
6. resample MRA: apply above BSpline to the pre MRA
 +
::*'''Input Volume''': MRA_post_n4_cropped
 +
::*'''Input Transform''': above Xf4_pre-post_BSpline.tfm; '''Output Volume''': MRA_post_n4_cropped_Xf4
 +
::*'''Module used:'''  [https://www.slicer.org/wiki/Modules:ResampleScalarVectorDWIVolume-Documentation-3.6 ResampleScalarVectorDWIVolume]
 +
::*'''Parameters:''' output-to-input box checked, interpolation: linear
 +
7. ROI definition (manual box ROI or automated via atlas)
 +
::*'''Module used:'''  [https://www.slicer.org/wiki/Modules:BRAINSFit BRAINSfit] or  [https://www.slicer.org/wiki/Modules:CMTK CMTK]
 +
8. segmentation of LA from MRA -> inner wall
 +
::*'''Module used:'''  [https://www.slicer.org/wiki/Modules:RobustStatisticsSeg-Documentation-3.6 Robust Statistics module] or    [https://www.slicer.org/wiki/Modules:Editor-Documentation-3.6 Editor: thresholding]  for thresholding within [https://www.slicer.org/wiki/Modules:CMTK CMTK]
 +
::*''Comments:'' as a dynamic image the MRA contains significant spread and likely requires interactive segmentation/thresholding to yield a satisfactory LA volume. For validation/visualization, use the :[https://www.slicer.org/wiki/Modules:Volumes-Documentation-3.6 Volumes] thresholding option within ''Display'' tab, use ''iron'' colormap & low alpha setting to check for ventricular wall borders. (see figures below)
 +
9. LA wall segmentation
 +
::*'''Module used:''' ''Atrium Cardiac Wall Segmentation'' (Extension Module, no documentation yet, authors: Yi Gao, Behnood Gholami, Allen Tannenbaum)
 +
10. segmentation of enhancement  
 +
::*'''Module:'''  [https://www.slicer.org/wiki/Modules:Editor-Documentation-3.6 Editor: thresholding]
 +
::*'''alternative Module:''' [http://wiki.na-mic.org/Wiki/index.php/Projects:AblationScarSegmentation AblationScarSegmentation]
 +
::*''Comments:'; operate only on ROI within LA wall. Based on proper intensity statistics. An atlas-based set of intensity distributions may be more meaningful here than a simple Otsu, because both amount and location of enhancement is unknown and can in theory be 0.  
  
 
<gallery perrow="4" widths="200px">
 
<gallery perrow="4" widths="200px">
Line 30: Line 66:
 
Image:DBP3_AFib_LA_overlay_2.jpg|Example contrast MRI with thresholded MRA as color overlay and areas of enhancement marked
 
Image:DBP3_AFib_LA_overlay_2.jpg|Example contrast MRI with thresholded MRA as color overlay and areas of enhancement marked
 
Image:DBP3_histogramMRA.png|Histogram of MRA intensities: green = entire FOV, red: cardiac structures only (excl. aorta), which make only 6% of the total image content and thus are unlikely to disturb a registration based on the entire image.  
 
Image:DBP3_histogramMRA.png|Histogram of MRA intensities: green = entire FOV, red: cardiac structures only (excl. aorta), which make only 6% of the total image content and thus are unlikely to disturb a registration based on the entire image.  
 +
Image:DBP3_Biasfield_masked-unmasked.png|Bias field correction results (N4ITK) with and without masking of the structures of interest. Masking causes a different correction not related to coil sensitivity but rather local image content. Masking is not recommended at this point.
 +
 +
</gallery>
 +
 +
=== Example Cases ===
 +
* [[Media:AFib_Example_P1_Data.zip|Example Case P1 : pre-post N4 bias corregtion, registration, LA segmentation]]
 +
 +
=== Current Progress ===
 +
As we proceed and make progress with the pipeline we have simplified it by consolidating many of the steps with minimal user input. Users are now prompted to provide a pre and post set of MRI data. Once provided, a button labeled 'MRI Intensity Correction' is enabled. When the user clicks the button, Slicer begins the pipeline by using N4 ITK MRI bias correction immediately followed by a whole-image affine registration. Once completed, the user is then prompted to crop the images to the desired ROI. After the ROI is defined a non-rigid registration is performed yielding registered pre and post MRI images and the corresponding transformation matrix. The following image gallery shows the progress and current state of the GUI.
 +
 +
<gallery perrow="2" widths="550px" heights="300px">
 +
Image:PipelineStart.png|Registration Segmentation Pipeline input selection - raw images.
 +
Image:PipelineStep1.png|N4 ITK MRI bias correction completed.
 +
</gallery>
  
 +
<gallery perrow="1" widths="500px" heights="340px">
 +
Image:NAMIC_Flow_Chart.png|Proposed processing pipeline.  This pipeline takes raw DE-MRI images pre- and post-ablation as input.  The images are registered, cropped, and corrected for MRI bias fields.  In addition to the registered output images, the transofrmation matrix of the registration steps is also included.  The red, dashed bounding box denotes the current state (8.29.11) of the completed Slicer code.
 
</gallery>
 
</gallery>

Latest revision as of 16:59, 10 July 2017

Home < DBP3:Utah:RegSegPipeline
  back to DBP3 home

The CARMA DBP: MRI-based study and treatment of atrial fibrillation

Pilot Studies on a Registration & Segmentation Pipeline & Workflow

Alex Zaitsev, Dominik Meier, Ron Kikinis

Background

By Rob MacLeod, PI AFib DBP

The Utah group carries out analysis of MRI scans from all patients coming to our clinical with symptoms of Atrial Fibrillation (AF) and continues to conduct regular MRI scans for patients once they undergo treatment by our physicians. The result is over 1000 MRI scans per year that we process using a set of heterogeneous tools. One goal of our collaboration with NAMIC is to explore new tools and capabilities to consolidate and streamline this processing pipeline. The goals of the process vary slightly depending on the timing of the imaging relative to patient care but all involve some combination of image correction, region of interest definition, segmentation of the left atrium (in some cases also right atrium and esophagus), and quantitative evaluation of enhancement in the images, due either to pre-existing fibrosis or post-treatment scar. In many cases, registration is also necessary to compare multiple images from the same patients over time and to compare multiple patients at the same stage of disease progression and treatment.

For more information, please see the following references:

R.S. Oakes, T.J. Badger, E.G. Kholmovski, N. Akoum, N.S. Burgon, E.N. Fish, J.J. Blauer, S.N. Rao, E.V. DiBella, N.M. Segerson, M. Daccarett, J. Windfelder, C.J. McGann, D. Parker, R.S. MacLeod, N.F. Marrouche. “Detection and quantification of left atrial structural remodeling with delayed-enhancement magnetic resonance imaging in patients with atrial fibrillation,” In Circulation, Vol. 119, No. 13, pp. 1758--1767. 2009. http://www.sci.utah.edu/publications/oaks09/Oaks_Circ2009.pdf

C.J. McGann, E.G. Kholmovski, R.S. Oakes, J.J. Blauer, M. Daccarett, N. Segerson, K.J. Airey, N. Akoum, E. Fish, T.J. Badger, E.V. DiBella, D. Parker, R.S. MacLeod, N.F. Marrouche. “New Magnetic Resonance Imaging-Based Method for Defining the Extent of Left Atrial Wall Injury After the Ablation of Atrial Fibrillation,” In Journal of the American College of Cardiology, Vol. 52, No. 15, pp. 1263--1271. Oct 7, 2008. http://www.sci.utah.edu/publications/mcgann08/mcg2008.pdf

C. Mahnkopf, T.J. Badger, N.S. Burgon, M. Daccarett, T.S. Haslam, C.T. Badger, C.J. McGann, N. Akoum, E. Kholmovski, R.S. Macleod, N.F. Marrouche. “Evaluation of the left atrial substrate in patients with lone atrial fibrillation using delayed-enhanced MRI: implications for disease progression and response to catheter ablation,” In Heart Rhythm, Vol. 7, No. 10, pp. 1475--1481. 2010. http://www.sci.utah.edu/publications/mahnkopf10/mahnkopf2010.pdf

A set of anonymized test data of sixty patients available for general use and more extensive deidentified data for exclusive use with NAMIC is available here: http://hdl.handle.net/1926/1757. Please contact me (macleod@sci.utah.edu) for more details.

Main processing pipeline

To facilitate the workflow, we can place all the automated steps at the beginning and cluster interactive elements at the end. Exception is the cropping step required as input for nonrigid registration.
1. N4 bias field correction for the MRI (surface coils):

  • Input: MRI_pre and MRI_post, each run separately with the same parameters below; Output: MRI_pre_n4 and MRI_post_n4
  • Module used: N4 ITK; Parameters: convergence: 1e-5, iterations: 50,40,30,20, shrink factor: 3
  • Comments: a run on entire image gives some benefit that may be improved with masking: again the dominant intensity dropoff from the surface coil occurs along the chest wall and ribcage. Even if that is not the structure of interest, it is the low-freq. variation the bias correction algorithm is searching for, and masking that out can be counter-productive: via masking we may end up with a smoother image, but the intensity variations removed were not caused by the coil but are actually true signal.

2. affine registration MRA ->MRI (both pre and post)

  • Input: MRI_pre_n4 (fixed) and MRA_pre ; Output: Xf1_pre_MRA-MRI.tfm"
  • Input: MRI_post_n4 (fixed) and MRA_post ; Output: Xf2_post_MRA-MRI.tfm"
  • Module used: BRAINSfit
  • Parameters: no initialization; samples: 200k, convergence: 1e-5, iterations:
  • Comments: from the example dataset (P1) we infer that the two scans tend to have little initial alignment, hence initialization steps are not recommended. We choose registration parameters such that the chance of the registration making the alignment worse is minimized. Decide in a subsequent review/QC step if we keep the transform or the original pose. The MRA contains the same FOV and has surrounding structures (liver, chest, spine etc) visible also, despite lower intensities. A global affine is thus not necessarily going to benefit from masking the heart, unless the relative motion of the heart becomes the dominant reason for misalignment. We tried masking with both BrainsFit and RobustMultires modules. Both failed to provide better alignment with masking.

3. registration post -> pre: phase 1: AFFINE

  • Input: MRI_pre_n4 (fixed) and MRI_post_n4 (moving) ; Output: Xf3_pre-post_affine.tfm
  • Module used: BRAINSfit
  • Parameters: DOF: rigid+similarity+affine (possibly rigid only); initialization: Moments align ; samples: 200k, convergence: 1e-5, iterations:
  • Comments: done on the entire image. The surrounding structures are useful in constraining the solution transform and should provide a more robust behavior. Cropping down to the cardiac only ROI is deferred to the nonrigid registration in phase 2. The inferior-superior FOV can differ, e.g. how much of the liver is included. If the two exams differ significantly (>30%) in that content, the above affine could fail and a prior cropping step is then suggested to better match image content before registration. Resampling to isotropic voxel size at this stage is also advantageous but will generate very large files > 100MB due to the full FOV.

4. Cropping to VOI:

  • Input: MRI_pre_n4 (fixed) and MRI_post_n4 (moving) ; Output: MRI_pre_n4_cropped, MRI_post_n4_cropped
  • Module used: Crop Volume
  • Comments: the volume rendering module may help in obtaining a good cropping ROI. Because of the high contrast, the MRA provides a good source for volume rendering.

5. registration post -> pre: phase 2: nonrigid / BSPLINE

  • Input: MRI_pre_n4_cropped (fixed) and MRI_post_n4_cropped (moving) ; Output: Xf4_pre-post_BSpline.tfm"
  • Module used: BRAINSfit or CMTK
  • Parameters: DOF: BSpline only; initialization: Xf3_pre-post_affine.tfm ; samples: 200k, convergence: 1e-5, iterations:
  • Comments: crop to volume of interest: CropVolume module, use Resample to isotropic voxelsize option.

6. resample MRA: apply above BSpline to the pre MRA

  • Input Volume: MRA_post_n4_cropped
  • Input Transform: above Xf4_pre-post_BSpline.tfm; Output Volume: MRA_post_n4_cropped_Xf4
  • Module used: ResampleScalarVectorDWIVolume
  • Parameters: output-to-input box checked, interpolation: linear

7. ROI definition (manual box ROI or automated via atlas)

8. segmentation of LA from MRA -> inner wall

  • Module used: Robust Statistics module or Editor: thresholding for thresholding within CMTK
  • Comments: as a dynamic image the MRA contains significant spread and likely requires interactive segmentation/thresholding to yield a satisfactory LA volume. For validation/visualization, use the :Volumes thresholding option within Display tab, use iron colormap & low alpha setting to check for ventricular wall borders. (see figures below)

9. LA wall segmentation

  • Module used: Atrium Cardiac Wall Segmentation (Extension Module, no documentation yet, authors: Yi Gao, Behnood Gholami, Allen Tannenbaum)

10. segmentation of enhancement

  • Module: Editor: thresholding
  • alternative Module: AblationScarSegmentation
  • Comments:'; operate only on ROI within LA wall. Based on proper intensity statistics. An atlas-based set of intensity distributions may be more meaningful here than a simple Otsu, because both amount and location of enhancement is unknown and can in theory be 0.

Example Cases

Current Progress

As we proceed and make progress with the pipeline we have simplified it by consolidating many of the steps with minimal user input. Users are now prompted to provide a pre and post set of MRI data. Once provided, a button labeled 'MRI Intensity Correction' is enabled. When the user clicks the button, Slicer begins the pipeline by using N4 ITK MRI bias correction immediately followed by a whole-image affine registration. Once completed, the user is then prompted to crop the images to the desired ROI. After the ROI is defined a non-rigid registration is performed yielding registered pre and post MRI images and the corresponding transformation matrix. The following image gallery shows the progress and current state of the GUI.