Projects:RegistrationLibrary:RegLib C07

From NAMIC Wiki
Revision as of 13:50, 19 August 2011 by Meier (talk | contribs) (Created page with 'Back to ARRA main page <br> Back to Registration main page <br> [[Projects:RegistrationDocumentation:UseCaseInv…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Home < Projects:RegistrationLibrary:RegLib C07

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 #07: Prostate MRI follow-up

Input

this is the fixed reference image. All images are aligned into this space lleft this is the time series of 2D images to be registered with the reference
fixed:prostate MRI
day 1
moving:prostate MRI
day 42

Modules

Objective / Background

Evaluate changes

Keywords

MRI, prostate, follow-up

Input Data

  • reference/fixed : axial MRI 256x256x36 ,0.7 x 0.7 x 4mm voxel size
  • moving: axial MRI 256x256x20 ,0.8 x 0.8 x 5mm voxel size

Notes / Overall Strategy

  • voxel size differs between the two images, also anisotropy is high: for the fine tuning a resampling to isotropic voxels for both volumes is recommended
  • the large FOV includes a lot of additional image content that can be useful in constraining the alignment but also limits precision on the region of interest. Ev. cropping or masking to an ROI containing the prostate only is likely to improve the quality of the final registration
  • the surface coils cause strong field inhomogeneity artifacts, apparent as strong intensity bias in both images. Bias correcion is recommended as preprocessing step.
  • Overall strategy:
  1. Bias correction of both images
  2. Affine automated registration of Day42->Day1
  3. Low-level BSpline registration (5x5x3) on global image, using above affine as starting point
  4. Crop both images to prostate region only, resample to isotropic sizes
  5. and apply above registration to cropped version of Day42
  6. BSpline registration of cropped images only
  7. Reapply final transform to entire (uncropped image)

Procedures

  • Phase I: Bias field correction
  1. load reference image and one moving image from the series
  2. open N4ITKBiasFieldCorrection module
    1. optional: select presets ("N4_Day1_axial" ) for module parameters from Parameter Set menu, or:
    2. select "Day01_axial" as input image, create new "Day1_axial_N4" output image
    3. set Iterations to 90,60,40
    4. set BSpline grid resolution to 2,2,1
    5. set Shrink factor to 3
    6. click Apply
  3. repeat above for the other image: "Day42_axial"
  • Phase II: Affine Alignment
  1. go to BRAINSfit module
    1. Select Fixed Image = Day01_axial_n4 and Moving Image as "Day42_axial_n4"
    2. check boxes to include "rigid","scale", "skew" and "affine" registration phases


      1. select/check Include BSpline registration phase
    1. 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"
    2. Registration Parameters: increase Number Of Samples to 200,000
    3. Registration Parameters: set Number Of Grid Subdivisions to 5,5,5
    4. Leave all other settings at default
    5. click: Apply; (runtime < 10 sec. on MacPro)
    6. adjust grid size until registration is acceptable
    7. 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

moving input moving input after registration (only frames 1-27 shown) displacements
unregistered moving series moving input after registration (only frames 1-27 shown) displacements (PDF)


Download

Acknowledgments

Thanks to Amir Owrangi and Dr.Grace Parraga from the Robarts Institute for sharing the registration problem and data.