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

From NAMIC Wiki
Jump to: navigation, search
Line 7: Line 7:
 
=== Input ===
 
=== Input ===
 
{| style="color:#bbbbbb; " cellpadding="10" cellspacing="0" border="0"
 
{| style="color:#bbbbbb; " cellpadding="10" cellspacing="0" border="0"
|[[Image:RegLib_C12_LiverTumor_CTpre.png|150px|lleft|this is the intra-op CT reference image. All images are aligned into this space]]  
+
|[[Image:RegLib_C12_Thumb1.png|150px|lleft|this is the intra-op CT reference image. All images are aligned into this space]]  
 
|[[Image:RegArrow_NonRigid.png|100px|lleft]]  
 
|[[Image:RegArrow_NonRigid.png|100px|lleft]]  
|[[Image:RegLib_C12_LiverTumor_CTcontrast-pre.png|150px|lleft|this is an intermediate pre-op CT, used as reference to match the MRI]]
+
|[[Image:RegLib_C12_Thumb2.png|150px|lleft|this is an intermediate pre-op CT, used as reference to match the MRI]]
 
|[[Image:RegArrow_NonRigid.png|100px|lleft]]  
 
|[[Image:RegArrow_NonRigid.png|100px|lleft]]  
|[[Image:RegLib_C12_LiverTumor_MRI.png|150px|lleft|this is the pre-op MRI we seek to align with the intra-op CT]]
+
|[[Image:RegLib_C12_Thumb3.png|150px|lleft|this is the pre-op MRI we seek to align with the intra-op CT]]
 
|-
 
|-
 
|fixed image/target
 
|fixed image/target
Line 24: Line 24:
  
 
===Objective / Background ===
 
===Objective / Background ===
We seek to align a pre-operative MRI with the intra-operative CT to enhance tumor visibility for surgical guidance.
+
We seek to align a pre-operative MRI with the intra-operative CT for surgical guidance.
  
 
=== Keywords ===
 
=== Keywords ===
Line 34: Line 34:
  
 
=== Notes / Overall Strategy ===
 
=== Notes / Overall Strategy ===
*because the torso is already well registered and does not move across the sequence, a global affine/rigid registration is of no use. Instead we seek to assess the internal displacements caused across the breathing cycle. We therefore choose a low-DOF BSpline model.
+
*the intra-op CT is acquired with a clipped FOV (to minimize acquisition time & exposure). This causes difficulty for intensity-based automated registration. We therefore use an intermediate pre-op CT with full FOV to bridge to the MRI
*Because the implementation of the BRAINSfit module used here expects a 3D volume, we choose a slightly larger grid and make it isotropic, although the 3rd dimension of the grid is not used. We expect the optimizer in the registration to not move outside the slice plane and simply return 0 deformations there.
+
*masking is required to focus the registration algorithm on the structure of interest
*An alternative strategy would be to register each image to its immediate previous timepoint, and then integrating the displacements. This has the advantage that nonrigid registration tends to be better for smaller differences, but it bears the risk of accumulating error and hence a lower robustness.
 
*A related option to improve precision would be to initialize each registration with the result of the previous one. Unfortunately the BRAINSfit registration modules do not (yet) allow to initialize with anything other than an affine.
 
*The additional information/constraint, that the displacements defined by the series of registrations should describe a smooth motion that is contiguous and differentiable, has not been exploited in this approach. This could be done a posteriori by applying a temporal filter across the transforms or fitting an appropriate model curve to each node displacement.
 
 
*Overall strategy:
 
*Overall strategy:
:#select one frame within the breathing cycle as reference frame
+
:#obtain (manual) a coarse segmentation of the liver in both MRI and CT. Dilate by a few pixels to include the organ boundary
:#compute non-rigid BSpline registration of all images to the reference frame
+
:#perform a manual initial alignment of MR to CT. Use this alignment as starting point for the automated registration
:#extract the displacements of indiv. grid nodes and plot over time
+
:#run an affine registration with above masks and intial alignment
 +
#run a non-rigid BSpline registration with above affine alignment as starting point
 +
 
 
=== Discussion: Registration Challenges ===
 
=== Discussion: Registration Challenges ===
 
*large differences in FOV
 
*large differences in FOV
Line 48: Line 47:
 
*contrast enhancement and pathology and treatment changes cause additional differences in image content
 
*contrast enhancement and pathology and treatment changes cause additional differences in image content
 
*we have strongly anisotropic voxel sizes with much less through-plane resolution
 
*we have strongly anisotropic voxel sizes with much less through-plane resolution
 
  
 
=== Procedures ===
 
=== Procedures ===
Line 85: Line 83:
 
=== Registration Results===
 
=== Registration Results===
 
{| style="color:#bbbbbb; " cellpadding="10" cellspacing="0" border="0"
 
{| style="color:#bbbbbb; " cellpadding="10" cellspacing="0" border="0"
|[[Image:RegLib_C46_Thumb2.gif|300px|lleft|moving input]]  
+
|[[Image:RegLib_C12_unregistered.gif|300px|lleft|unregistered MRI & CT]]  
|[[Image:RegLib_C46_Moving_animReg.gif|300px|lleft|moving input after registration (only frames 1-27 shown)]]  
+
|[[Image:RegLib_C12_masks.png|300px|lleft|registration masks]]
|[[Image:RegLib_C46_Displacements.png|300px|lleft|displacements]]
+
|[[Image:RegLib_C12_manualInit.gif|300px|lleft|manual initial alignment of MRI & CT]]
 +
|[[Image:RegLib_C12_affine.gif|300px|lleft|affine registered MRI & CT]]  
 +
|[[Image:RegLib_C12_Nonrigid.gif|300px|lleft|nonrigid registered MRI & CT]]  
 
|-
 
|-
|unregistered moving series
+
|unregistered MRI & CT]]
|moving input after registration (only frames 1-27 shown)
+
|registration masks]]
|[[Media:RegLib_C46_Displacements.pdf|displacements (PDF)]]
+
|manual initial alignment of MRI & CT]]
 +
|affine registered MRI & CT]]
 +
|nonrigid registered MRI & CT]]  
 
|}
 
|}
  

Revision as of 18:50, 18 August 2011

Home < Projects:RegistrationLibrary:RegLib C12

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

v3.6.3 Slicer3-6Announcement-v1.png Slicer Registration Library Case #12: Liver Tumor Cryoablation

Input

this is the intra-op CT reference image. All images are aligned into this space lleft this is an intermediate pre-op CT, used as reference to match the MRI lleft this is the pre-op MRI we seek to align with the intra-op CT
fixed image/target intermediate ref. image moving image

Modules

Objective / Background

We seek to align a pre-operative MRI with the intra-operative CT for surgical guidance.

Keywords

MRI, CT, IGT, intra-operative, liver, cryoablation, change detection, non-rigid registration

Input Data

  • reference/fixed : pr-op CT, 0.95 x 0.95 x 5 mm voxel size
  • moving: intra-op MRI, 0.78 x 0.78 x 2.5 mm axial,

Notes / Overall Strategy

  • the intra-op CT is acquired with a clipped FOV (to minimize acquisition time & exposure). This causes difficulty for intensity-based automated registration. We therefore use an intermediate pre-op CT with full FOV to bridge to the MRI
  • masking is required to focus the registration algorithm on the structure of interest
  • Overall strategy:
  1. obtain (manual) a coarse segmentation of the liver in both MRI and CT. Dilate by a few pixels to include the organ boundary
  2. perform a manual initial alignment of MR to CT. Use this alignment as starting point for the automated registration
  3. run an affine registration with above masks and intial alignment
  1. run a non-rigid BSpline registration with above affine alignment as starting point

Discussion: Registration Challenges

  • large differences in FOV
  • strong differences in image contrast between MRI & CT
  • contrast enhancement and pathology and treatment changes cause additional differences in image content
  • we have strongly anisotropic voxel sizes with much less through-plane resolution

Procedures

  • Phase I: Pilot to determine optimal registration parameters
  1. load reference image and one moving image from the series
  2. open Registration : BrainsFit module
    1. Registration Phases:
    2. set "reference" fixed and "moving_??" as moving image
      1. select/check Include BSpline registration phase
    3. Output Settings:
      1. select a new transform "Slicer BSpline Transform", rename to "Xf1_moving_??"
      2. select a new volume "Output Image Volume, rename to "moving_??_Xf1"
    4. Registration Parameters: increase Number Of Samples to 200,000
    5. Registration Parameters: set Number Of Grid Subdivisions to 5,5,5
    6. Leave all other settings at default
    7. click: Apply; (runtime < 10 sec. on MacPro)
    8. adjust grid size until registration is acceptable
    9. you can see the commandline text of the registration performed by opening the Window/Error Log window and clicking on BRAINSfit commandline input
  • Phase II: Batch Run
  1. open a terminal window
    1. via a TextEditor or prototyping/scripting software (e.g. Matlab), copy and modify the prototype line below, by changing only the moving input image:
 /Applications/Slicer36/Slicer3 --launch  /Applications/Slicer36/lib/Slicer3/Plugins/BRAINSFit --useBSpline --splineGridSize 5,5,5 --outputVolumePixelType short /
 --numberOfSamples 200000 --costMetric MMI --fixedVolume Reference/refLung_001.dcm --movingVolume Moving/Moving_001/Moving_001.dcm /
 --bsplineTransform Xforms/Moving_001_XfBSpl5.tfm --outputVolume MovingResampled/Moving_001_r.nrrd >> Logs/Moving_001_RegLog.txt 2>&1
    1. replace "/Applications/Slicer36" with your path of 3DSlicer
    2. create result directories MovingResampled, Logs, Xforms
    3. note that because input image is DICOM, and images are 2D only, each image of the time series must be in its own directory, otherwise Slicer will read them as a volume.
    4. paste all commands into a terminal window, or copy into a shell script and execute.
  • Phase III: Evaluate Transform files
    1. upon completion, read the transform files with an editor and extract the displacements of interest
    2. The ITK transform files describe displacements at the grid nodes, many of which are outside the region of interest. Because BRAINSfit pads the grid with 1 voxel, the grid returned is actually 8x8x8. We use only the plane (*,*,4) for analysis and discard the y-direction displacements, which as expected are all zero.
    3. for details on the ITK transform format see the FAQ here
    4. To obtain displacements at arbitrary coordinates, interpolate the transform into a deformation field, e.g. using this module (details FAQ here):
/Applications/Slicer3.6.3/lib/Slicer3/Plugins/BSplineToDeformationField

Registration Results

unregistered MRI & CT registration masks manual initial alignment of MRI & CT affine registered MRI & CT nonrigid registered MRI & CT
unregistered MRI & CT]] registration masks]] manual initial alignment of MRI & CT]] affine registered MRI & CT]] nonrigid registered MRI & CT]]


Download

Link to User Guide: How to Load/Save Registration Parameter Presets

Acknowledgments

Thanks to Dr.Stuart Silverman and Dr. Nobuhiko Hata for sharing this case.