Difference between revisions of "Projects:RegistrationDocumentation:ReferenceManual"

From NAMIC Wiki
Jump to: navigation, search
m (Text replacement - "[http://www.na-mic.org/Wiki/images/" to "[https://na-mic.org/w/images/")
 
(13 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
== Main Register Images Parameters ==
 
== Main Register Images Parameters ==
  
*'''Parameter set'':  could be made into the "Presets" menu?
+
*'''Parameter set'':  will become "Presets" menu
 
*IO
 
*IO
**'''Fixed Image''':
+
**'''Input Fixed Image''':
**'''Moving Image''':
+
**'''Input Moving Image''':
**'''Resample Image''':
+
**'''Input Mask/ROI''': (optional) provide ROI or labelmap to focus registration only on a particular area of the image. Use the editor to create a labelmap or ROI tool to create an ROI box.
*Registration Parameters
+
**'''Input Transform''': provide the Loaded Transform for the loaded phase of registration
*'''Load Transform''': provide the Loaded Transform for the loaded phase of registration
+
**'''Output Result Transform''': results of the entire registration pipeline will be saved as Xform node here
*'''Save Transform''': results of the entire registration pipeline will be saved here
+
**'''Output Resampled Registered Image''': result Xform applied to moving image and resampled, creates a new volume node
*'''Initialization''':  
+
*Initialization (only if no input Xform specified above):
**None (sets the center of rotation to the center of the moving image)
+
**'''None'''
**Landmark (uses N-pairs of landmarks (passed as vectors) and a least-squared error metric to register the images using a rigid transform
+
**'''Image Centers''' (shifts the images to align their centers)
**Image Centers (shifts the images to align their centers)
+
**'''Centers of Mass''' (shifts the images to align their centers of mass)
**Centers of Mass (shifts the images to align their centers of mass)
+
**'''Second Moments''' (shifts and rotates the images to align the 1st and 2nd moments)
**Second Moments (shifts and rotates the images to align the 1st and 2nd moments)
+
*Registration DOF (for details on DOF see xxLinkToBasicsTutorial)
*'''Registration'''
+
**'''Rigid 6 DOF''':computes a rigid transform with 6DOF: 3 Translations & 3 Rotations
**None (applies the loaded transforms)
+
**'''Rigid 7 DOF''':computes a rigid transform + a global scaling factor. Moving image will resize, but aspect ratio stays intact
**Initial: computes and applies the initial transform to the loaded registrations)
+
**'''Similarity 9 DOF''':computes a similarity transform + 3 individual scaling factors. Moving image will resize and aspect ratio will change.
**Rigid:computes a rigid transform and then applies it to the loaded registrations
+
**'''Affine 12 DOF''': computes a full affine transform incl. local scaling and shearing.
**Affine: computes an affine transform and then applies it to the loaded registrations
+
**'''BSpline''': -> will become a separate submodule. computes a B-spline transform, which is a non-rigid and nonlinear transform. Image is allowed to deform locally. Also known as "image warping". The amount of regularization, i.e. how much local deformation is allowed is controlled via the grid-spacing.
**BSpline: computes a bspline transform and then applies it to the loaded registrations
+
*Metric
**PipelineRigid: computes a rigid transform (initialized using the results from the initial registration) and then applies it to the loaded registrations
+
** '''Mutual Information''' metric.  It is an multithreaded and optimized version of the Mattes MI method. For more details about how MI works see xxLinkToBasicsTutorial. For developers will find details in the code: Insight/Code/Review/itkOptMattesMutualInformationImageMetric.h/txx
**PipelineAffine: computes a rigid transform (initialized using the results from the initial registration), uses those results to initialize and compute an affine transform, and then applies it to the loaded registrations
+
** '''NormCorr''': Normalized Image Correlation. Image cross-correlation as surrogate for similarity.  This works well for similar contrast and can give better accuracy than MI, albeit less robust to large misalignment. Current version is not parallelized, i.e. will not take advantage of multiple CPU threads and is therefore much slower than MI.
**PipelineBSpline: computes a rigid transform (initialized using the results from the initial registration), uses those results to initialize and compute an affine transform, and then applies it to the loaded registrations, THEN computes and applies a BSpline transform
+
** '''MeanSqrd''': Mean-square intensity difference.  As NormCorr, this  works well for similar contrast and can give better accuracy than MI. Depends more on similar contrast than NormCorr.
*'''Metric'''
+
**'''Cost Function Scaling Factors''': These control on how the optimization landscape is calibrated, i.e. how big translation steps should be relative to rotation etc. These parameters, although complex, are important tools to calibrate a registration to an individual challenge and can greatly improve the result is set correctly.
** '''Mutual Information''' metric.  It is an multithreaded and optimized version of the Mattes MI method. For more information, check the code; Insight/Code/Review/itkOptMattesMutualInformationImageMetric.h/txx
+
** '''Expected Offset''' controls the offset scales in rigid and affine registration
** '''NormCorr'''
+
** '''Expected Rotation''' is roughly in terms of radians.  It controls the rotation angles in rigid and affine registration
** '''MeanSqrd'''
+
** '''Expected Scale''' is for scaling during affine registration
* "Expected Offset" controls the offset scales in rigid and affine registration the deformation vector scale in bspline registration
+
** '''Expected Skew''' is for skew for affine registration
* "Expected Rotation" is roughly in terms of radians.  It controls the rotation angles in rigid and affine registration
 
* "Expected Scale" is for scaling during affine registration
 
* "Expected Skew" is for skew for affine registration
 
 
*Advanced Tab
 
*Advanced Tab
*'''Verbosity Level'''
+
**'''Verbosity Level''': Controls the level of detail in the reports in the log file
*'''Sample from fixed/moving overlap'''
+
**'''Sample from fixed/moving overlap''': When the fixed image is much larger than the moving image, it is CRITICAL to set this flag and to pick a good initialization method.  In that way, only the portion of the fixed image that is initially covered by the moving image will be used during registration.  This prevents ITK from throwing an exception (error) stating that too many fixed-image samples miss (map outside of) the moving image.
*''Fixed Image Mask'''
+
**'''Random Number Seed''':  To ensure consistent performance, you can set a seed - repeated runs should produce identical results.
*'''Random Number Seed'''
+
**'''Number of Threads''': Number of multi-core/mult-processor threads to use during metric value computations.
*'''Number of Threads'''
+
**'''Minimize Memory''':  Turns off caching of intermediate values during bspline registration
*'''Minimize Memory'''
+
**''Interpolation'': select interpolation type for resampling result image immediately
*''Interpolation''
+
**'''Max.iterations''' Number of iterations for one-plus-one and for FRPR registration
*'''Max.iterations'''
+
**'''Sampling Ratio''' Portion of the image pixels to be used when computing the metric
*'''Sampling Ratio'''
+
**'''Apply''' button: this launches the automated registration process. Other functions of Slicer are still accessible while the registration is running. The registration module itself is disabled (appears in gray) and the notice '''Running''' appears at the top.
*'''Apply''' button: this launches the automated registration process. Other functions of Slicer are still accessible while the registration is running. The registration module itself is disabled (appears in gray) and the notice '''Running''' appears at the top.
 
  
 +
== Main Algorithm ==
 +
*For rigid and affine registrations, one-plus-one evoluation optimization is first applied for N iterations, and then FRPR gradient-line-search optimization is applied.
 +
*** For more information, check the code: RegisterImagesModule/itkOptimizedImageToImageRegistrationmethod.h/txx
 +
** For BSpline registration, a hierarchical registration scheme is used.  An image pyramid having 3 levels is used to resample the images and the control grids.  Heuristics are used to control the various resampling parameters.  At each level, registration is conducted using FRPR gradient-line-search optimization.
 +
*** For more information, check the code: RegisterImagesModule/itkBSplineImageToImageRegistrationMethod.h/txx
 +
 +
== Register Images Usage ==
 +
 +
  --processinformationaddress <std::string>
 +
    Address of a structure to store process information (progress, abort,
 +
    etc.). (default: 0)
 +
 +
  --xml
 +
    Produce xml description of command line arguments (default: 0)
 +
 +
  --echo
 +
    Echo the command line arguments (default: 0)
 +
 +
  --controlPointSpacing <int>
 +
    Number of pixels between control points (default: 40)
 +
 +
  --bsplineSamplingRatio <float>
 +
    Portion of the image to use in computing the metric during BSpline
 +
    registration (default: 0.1)
 +
 +
  --bsplineMaxIterations <int>
 +
    Maximum number of bspline optimization iterations (default: 20)
 +
 +
  --affineSamplingRatio <float>
 +
    Portion of the image to use in computing the metric during affine
 +
    registration (default: 0.02)
 +
 +
  --affineMaxIterations <int>
 +
    Maximum number of affine optimization iterations (default: 50)
 +
 +
  --rigidSamplingRatio <float>
 +
    Portion of the image to use in computing the metric during rigid
 +
    registration (default: 0.01)
 +
 +
  --rigidMaxIterations <int>
 +
    Maximum number of rigid optimization iterations (default: 100)
 +
 +
  --movingLandmarks <std::vector<std::vector<float> >>  (accepted multiple
 +
      times)
 +
    Ordered list of landmarks in the moving image
 +
 +
  --fixedLandmarks <std::vector<std::vector<float> >>  (accepted multiple
 +
      times)
 +
    Ordered list of landmarks in the fixed image
 +
 +
  --baselineResampledMovingImage <std::string>
 +
    Result resampling the moving image to the space of the baseline image
 +
 +
  --baselineDifferenceImage <std::string>
 +
    Result from subtracting the registered moving image from the baseline
 +
    image
 +
 +
  --baselineRadiusTolerance <int>
 +
    Maximum neighborhood that will be searched to find a matching pixel
 +
    (default: 0)
 +
 +
  --baselineIntensityTolerance <double>
 +
    Maximum intensity difference for pixels to be considered matching
 +
    (default: 10)
 +
 +
  --baselineNumberOfFailedPixelsTolerance <int>
 +
    Maximum number of pixels that can differ and the test pass (default:
 +
    1000)
 +
 +
  --baselineImage <std::string>
 +
    Image against which the resampled moving image will be compared
 +
 +
  --interpolation <NearestNeighbor|Linear|BSpline>
 +
    Method for interpolation within the optimization process (default:
 +
    Linear)
  
 +
  --minimizeMemory
 +
    Reduce the amount of memory required at the cost of increased
 +
    computation time (default: 0)
  
=== Advaned Registration Parameters Tab ===
+
  --numberOfThreads <int>
* Verbosity level
+
    Number of CPU threads to use (default: 0)
** Controls the level of detail in the reports in the log file
 
* Sample from fixed/moving overlap
 
** When the fixed image is much larger than the moving image, it is CRITICAL to set this flag and to pick a good initialization method.  In that way, only the portion of the fixed image that is initially covered by the moving image will be used during registration.  This prevents ITK from throwing an exception (error) stating that too many fixed-image samples miss (map outside of) the moving image.
 
* Fixed image intensity percentage threshold
 
** A less robust way to overcome the image overlap issue discussed above, you can specify a threshold as a portion (0 to 1) of the fixed image intensity range that should be used to select fixed image samples for computing the metric.  That is, by specifying 0.5, only the pixels in the upper half of the fixed-image's intensity range will be used during random sample selection.
 
** Remember, it is important to include pixels inside and outside of the object of interest, otherwise the fixed image histogram may be too homogeneous for mis-registrations to be detected.
 
* Random number seed
 
** To ensure consistent performance, you can set a seed - repeated runs should produce identical results.
 
* Number of threads
 
** Number of multi-core/mult-processor threads to use during metric value computations.
 
* MimimizeMemory
 
** Turns off caching of intermediate values during bspline registration
 
** Provides a way to compute bspline registrations using a dense set of control points and a large number of samples on "normal" computers (albeit computation time increases)
 
** Rule of thumb, if the BSpline registration crashes - re-run with this option enabled.
 
* use windowed sinc for final interpolation
 
** If you have time to kill.  Extremely slow and only marginally better than bspline resampling (the default).
 
  
=== Registration Testing Parameters ===
+
  --randomNumberSeed <int>
* Baseline Image
+
    Seed to generate a consistent random number sequence (default: 0)
** Set the image against which the Resampled Image (IO tab) will be compared after registration
 
* Number of Failed Pixels Tolerance
 
** Registration returns "failure" if this many pixels are different between the Resampled and Baseline images
 
* Intensity Tolerance
 
** Minimum intensity difference between corresponding Resampled and Baseline pixels for those pixels to be counted as failures
 
* Radius Tolerance
 
** The program will search this neighborhood size about each Resampled pixel to find the closest matching Baseline pixel.  The closest matching pixels are compared using the Intensity Tolerance (above)
 
* Baseline Difference Image
 
** Result of subtracting the resampled image from the baseline image
 
* Baseline Resamples Moving Image
 
** resampled image, resampled into the space of the baseline image
 
  
=== Advanced Initial Registration Parameters ===
+
  --fixedImageMask <std::string>
* Fixed / Moving Landmarks
+
    Image which defines a mask for the fixed image
** A vector string (comma separated base-3 list) of the indexes of corresponding points in the fixed and moving images
 
** If supplied, then choose "Landmarks" as the initial registration method (see discussion on registration pipeline)
 
  
=== Advanaced Rigid and Affine Parameters ===
+
  --sampleFromOverlap
* MaxIterations
+
    Limit metric evaluation to the fixed image region overlapped by the
** Number of iterations for one-plus-one and for FRPR registration
+
    moving image (default: 0)
* Sampling Ratio
 
** Portion of the image pixels to be used when computing the metric
 
  
=== Advanced BSpline Parameters ===
+
  --verbosityLevel <Silent|Standard|Verbose>
* MaxIterations
+
    Level of detail of reporting progress (default: Standard)
** Number of iterations for one-plus-one and for FRPR registration
 
* Sampling Ratio
 
** Portion of the image pixels to be used when computing the metric
 
** Do the math...if you have 40 pixels between control points, then there will be 40^3 (64,000) pixels relevant to each control point.  That excessive for directing one control point. Keep the sampling small.  For 40 pixels between control points, a sampling density of 0.1 provide 6,400 pixels for metric computation at each control point - more than enough.
 
** When in doubt, turn on MinimizeMemory
 
* Control point spacing (pixels)
 
** Don't think about grid size - instead think about the level of detail that needs to be resolved (see discussion on sampling ratio).
 
** When in doubt, turn on MinimizeMemory
 
  
== Incorporates testing ==
+
  --expectedSkew <float>
 +
    Expected misalignment after initialization (default: 0.01)
  
* See discussion on the "Registration Testing Parameters" tab.
+
  --expectedScale <float>
 +
    Expected misalignment after initialization (default: 0.05)
  
 +
  --expectedRotation <float>
 +
    Expected misalignment after initialization (default: 0.1)
  
 +
  --expectedOffset <float>
 +
    Expected misalignment after initialization (default: 10)
  
== Class structure ==
+
  --metric <MattesMI|NormCorr|MeanSqrd>
 +
    Method to quantify image match (default: MattesMI)
  
* Try it, you'll like it.
+
  --registration <None|Initial|Rigid|Affine|BSpline|PipelineRigid
* Follows the coding style of itk
+
      |PipelineAffine|PipelineBSpline>
* Limited comments, but meaningful variable names
+
    Method for the registration process (default: PipelineAffine)
* No documentation is provided or planned - don't even ask.
 
  
= Instructions for Enabling the RegisterImages module =
+
  --initialization <None|Landmarks|ImageCenters|CentersOfMass
 +
      |SecondMoments>
 +
    Method to prime the registration process (default: CentersOfMass)
  
This module should now be built and distributed by default.  No special steps are needed to use this module.
+
  --saveTransform <std::string>
 +
    Save the transform that results from registration
  
= Background =
+
  --loadTransform <std::string>
 +
    Load a transform that is immediately applied to the moving image
  
== Goals ==
+
  --resampledImage <std::string>
 +
    Registration results
  
There are two components to this research
+
  --,  --ignore_rest
# Identify registration algorithms that are suitable for non-rigid registration problems that are endemic to NA-MIC
+
    Ignores the rest of the labeled arguments following this flag.
# Develop implementations of those algorithms that take advantage of multi-core and multi-processor hardware
 
  
== Steps involved ==
+
  --version
 +
    Displays version information and exits.
  
# Modify ITK's registration framework to support oriented images
+
  -h,  --help
# Modify ITK's registration framework to be thread safe
+
    Displays usage information and exits.
# Develop multi-threaded versions of select registration modules
 
# Make everything backward compatible with ITK's existing registration methods and framework
 
# Deliver in ITK
 
# Develop helper classes and write IJ article
 
  
Target date for these deliverables: Jan 1, 2008
+
  <std::string>
 +
    (required)  Image which defines the space into which the moving image
 +
    is registered
  
== Main Algorithm ===
+
  <std::string>
*For rigid and affine registrations, one-plus-one evoluation optimization is first applied for N iterations, and then FRPR gradient-line-search optimization is applied.
+
    (required) The transform goes from the fixed image's space into the
*** For more information, check the code: RegisterImagesModule/itkOptimizedImageToImageRegistrationmethod.h/txx
+
    moving image's space
** For BSpline registration, a hierarchical registration scheme is used. An image pyramid having 3 levels is used to resample the images and the control grids.  Heuristics are used to control the various resampling parameters.  At each level, registration is conducted using FRPR gradient-line-search optimization.
 
*** For more information, check the code: RegisterImagesModule/itkBSplineImageToImageRegistrationMethod.h/txx
 
  
== Planned follow-on work ==
 
  
Devise a new metric for MI registration
+
  Description: Provides rigid, affine, and BSpline registration methods
# If we always use every voxel for the metric, then we can cache the weights by the voxel's position wrt the adjacent control points.  For example, for Kilian's situation of a control point every 2 voxels, then there really are only a few unique weight sets that are repeated throughout the volume. Luis had already brought up a variation on this idea.
+
  via a simple GUI
# This method could also be combined with the rule to not evaluate voxels or control points that fall on background voxels.  This too has been discussed, but such a rule makes multi-threading tricky in that we don't want to waste threads by allocating them to image regions that contain only background voxels.
 
# The metric could be closely tied to a multiresolution registration scheme.  In fact, the grid and the image resolutions should perhaps be linearly related.  That is, we could tie the metric computation to the resolution of the deformation grid by subsampling the image.  There are situations where this is not a right thing to do (just because the grid is coarse doesn't mean that a small movement isn't important); HOWEVER, as part of a multiresolution registration strategy, it is perhaps the viable option. This would need to be evaluated on the data.
 
# Have "don't-care" regions in which bspline control points are processed/don't move, e.g., no need to adjust ones that only contain background
 
  
== Status and News ==
+
  Author(s): Stephen R Aylward
Thanks (but not your questions or comments) go to
 
* Luis Ibanez, Matt Turek, Stephen Aylward
 
Questions and comments should go to the Slicer Developers' list
 
  
 
== Publications ==
 
== Publications ==
 
 
# [http://insight-journal.org/InsightJournalManager/view_reviews.php?pubid=172 Aylward, Stephen; Jomier, Julien; Barre, Sebastien; Davis, Brad; Ibanez, Luis, "Optimizing ITK’s Registration Methods for Multi-processor, Shared-Memory Systems." MICCAI Open Source and Open Data Workshop, 2007] [http://insight-journal.org/InsightJournalManager/download_publication.php?pubid=172&revision=2&name=OptimizingITKRegistrationMethods.pdf&pdf=1 (Download PDF)]
 
# [http://insight-journal.org/InsightJournalManager/view_reviews.php?pubid=172 Aylward, Stephen; Jomier, Julien; Barre, Sebastien; Davis, Brad; Ibanez, Luis, "Optimizing ITK’s Registration Methods for Multi-processor, Shared-Memory Systems." MICCAI Open Source and Open Data Workshop, 2007] [http://insight-journal.org/InsightJournalManager/download_publication.php?pubid=172&revision=2&name=OptimizingITKRegistrationMethods.pdf&pdf=1 (Download PDF)]
 
# [[NAC_Grid_Enabled_ITK | BWH Neuroimaging Analysis Center (NAC), 2007-2008: Grid Enabled ITK]]
 
# [[NAC_Grid_Enabled_ITK | BWH Neuroimaging Analysis Center (NAC), 2007-2008: Grid Enabled ITK]]
Line 176: Line 210:
 
*# DTI: components of the diffusion tensor
 
*# DTI: components of the diffusion tensor
 
*#* [[DTI-non-rigid|Example data]] (Sylvain)
 
*#* [[DTI-non-rigid|Example data]] (Sylvain)
 
== Hardware Platform Requirements and Use Cases ==
 
 
 
 
* Use-cases
 
* Use-cases
 
*# Intel Core2Duo
 
*# Intel Core2Duo
Line 192: Line 222:
 
January 5, 2008 - Note: "Opt" results are not using the OptLinearInterpolateImageFunction.
 
January 5, 2008 - Note: "Opt" results are not using the OptLinearInterpolateImageFunction.
  
*[http://www.na-mic.org/Wiki/images/f/fe/MattesGetValue.pdf MattesMI GetValue Results]
+
*[https://na-mic.org/w/images/f/fe/MattesGetValue.pdf MattesMI GetValue Results]
*[http://www.na-mic.org/Wiki/images/1/1b/MattesBSplineGetValue.pdf MattesMI, b-spline interpolation and transform, GetValue Results]
+
*[https://na-mic.org/w/images/1/1b/MattesBSplineGetValue.pdf MattesMI, b-spline interpolation and transform, GetValue Results]
*[http://www.na-mic.org/Wiki/images/1/16/MeanSquaresGetValue.pdf MeanSquares GetValue Results]
+
*[https://na-mic.org/w/images/1/16/MeanSquaresGetValue.pdf MeanSquares GetValue Results]
 
*[http://wiki.na-mic.org/Wiki/images/c/c5/MattesGetValueAndDerivative.pdf MattesMI GetValueAndDerivative Results]
 
*[http://wiki.na-mic.org/Wiki/images/c/c5/MattesGetValueAndDerivative.pdf MattesMI GetValueAndDerivative Results]
 
*[http://wiki.na-mic.org/Wiki/images/f/f6/MattesBSplineGetValueAndDerivative.pdf MattesMI, b-spline interpolation and transform, GetValueAndDerivative Results]
 
*[http://wiki.na-mic.org/Wiki/images/f/f6/MattesBSplineGetValueAndDerivative.pdf MattesMI, b-spline interpolation and transform, GetValueAndDerivative Results]
Line 211: Line 241:
 
*built from ITK Registration Documentation
 
*built from ITK Registration Documentation
 
* [[Non Rigid Registration]]
 
* [[Non Rigid Registration]]
* [http://www.slicer.org/slicerWiki/index.php/Slicer3:Performance_Analysis Slicer3:Performance_Analysis]
+
* [https://www.slicer.org/wiki/Slicer3:Performance_Analysis Slicer3:Performance_Analysis]
 
* [http://www.na-mic.org/Wiki/index.php/User:Barre/ITK_Registration_Optimization User:Barre/ITK Registration Optimization]
 
* [http://www.na-mic.org/Wiki/index.php/User:Barre/ITK_Registration_Optimization User:Barre/ITK Registration Optimization]
 
* [[ITK_Registration_Optimization/Testing_And_Backward_Forward_Compatibility | Testing and ITK Backward Forward Compatibility]]
 
* [[ITK_Registration_Optimization/Testing_And_Backward_Forward_Compatibility | Testing and ITK Backward Forward Compatibility]]

Latest revision as of 18:27, 10 July 2017

Home < Projects:RegistrationDocumentation:ReferenceManual

Back to ARRA main page

Back to Registration main page

Main Register Images Parameters

  • 'Parameter set: will become "Presets" menu
  • IO
    • Input Fixed Image:
    • Input Moving Image:
    • Input Mask/ROI: (optional) provide ROI or labelmap to focus registration only on a particular area of the image. Use the editor to create a labelmap or ROI tool to create an ROI box.
    • Input Transform: provide the Loaded Transform for the loaded phase of registration
    • Output Result Transform: results of the entire registration pipeline will be saved as Xform node here
    • Output Resampled Registered Image: result Xform applied to moving image and resampled, creates a new volume node
  • Initialization (only if no input Xform specified above):
    • None
    • Image Centers (shifts the images to align their centers)
    • Centers of Mass (shifts the images to align their centers of mass)
    • Second Moments (shifts and rotates the images to align the 1st and 2nd moments)
  • Registration DOF (for details on DOF see xxLinkToBasicsTutorial)
    • Rigid 6 DOF:computes a rigid transform with 6DOF: 3 Translations & 3 Rotations
    • Rigid 7 DOF:computes a rigid transform + a global scaling factor. Moving image will resize, but aspect ratio stays intact
    • Similarity 9 DOF:computes a similarity transform + 3 individual scaling factors. Moving image will resize and aspect ratio will change.
    • Affine 12 DOF: computes a full affine transform incl. local scaling and shearing.
    • BSpline: -> will become a separate submodule. computes a B-spline transform, which is a non-rigid and nonlinear transform. Image is allowed to deform locally. Also known as "image warping". The amount of regularization, i.e. how much local deformation is allowed is controlled via the grid-spacing.
  • Metric
    • Mutual Information metric. It is an multithreaded and optimized version of the Mattes MI method. For more details about how MI works see xxLinkToBasicsTutorial. For developers will find details in the code: Insight/Code/Review/itkOptMattesMutualInformationImageMetric.h/txx
    • NormCorr: Normalized Image Correlation. Image cross-correlation as surrogate for similarity. This works well for similar contrast and can give better accuracy than MI, albeit less robust to large misalignment. Current version is not parallelized, i.e. will not take advantage of multiple CPU threads and is therefore much slower than MI.
    • MeanSqrd: Mean-square intensity difference. As NormCorr, this works well for similar contrast and can give better accuracy than MI. Depends more on similar contrast than NormCorr.
    • Cost Function Scaling Factors: These control on how the optimization landscape is calibrated, i.e. how big translation steps should be relative to rotation etc. These parameters, although complex, are important tools to calibrate a registration to an individual challenge and can greatly improve the result is set correctly.
    • Expected Offset controls the offset scales in rigid and affine registration
    • Expected Rotation is roughly in terms of radians. It controls the rotation angles in rigid and affine registration
    • Expected Scale is for scaling during affine registration
    • Expected Skew is for skew for affine registration
  • Advanced Tab
    • Verbosity Level: Controls the level of detail in the reports in the log file
    • Sample from fixed/moving overlap: When the fixed image is much larger than the moving image, it is CRITICAL to set this flag and to pick a good initialization method. In that way, only the portion of the fixed image that is initially covered by the moving image will be used during registration. This prevents ITK from throwing an exception (error) stating that too many fixed-image samples miss (map outside of) the moving image.
    • Random Number Seed: To ensure consistent performance, you can set a seed - repeated runs should produce identical results.
    • Number of Threads: Number of multi-core/mult-processor threads to use during metric value computations.
    • Minimize Memory: Turns off caching of intermediate values during bspline registration
    • Interpolation: select interpolation type for resampling result image immediately
    • Max.iterations Number of iterations for one-plus-one and for FRPR registration
    • Sampling Ratio Portion of the image pixels to be used when computing the metric
    • Apply button: this launches the automated registration process. Other functions of Slicer are still accessible while the registration is running. The registration module itself is disabled (appears in gray) and the notice Running appears at the top.

Main Algorithm

  • For rigid and affine registrations, one-plus-one evoluation optimization is first applied for N iterations, and then FRPR gradient-line-search optimization is applied.
      • For more information, check the code: RegisterImagesModule/itkOptimizedImageToImageRegistrationmethod.h/txx
    • For BSpline registration, a hierarchical registration scheme is used. An image pyramid having 3 levels is used to resample the images and the control grids. Heuristics are used to control the various resampling parameters. At each level, registration is conducted using FRPR gradient-line-search optimization.
      • For more information, check the code: RegisterImagesModule/itkBSplineImageToImageRegistrationMethod.h/txx

Register Images Usage

  --processinformationaddress <std::string>
    Address of a structure to store process information (progress, abort,
    etc.). (default: 0)
  --xml
    Produce xml description of command line arguments (default: 0)
  --echo
    Echo the command line arguments (default: 0)
  --controlPointSpacing <int>
    Number of pixels between control points (default: 40)
  --bsplineSamplingRatio <float>
    Portion of the image to use in computing the metric during BSpline
    registration (default: 0.1)
  --bsplineMaxIterations <int>
    Maximum number of bspline optimization iterations (default: 20)
  --affineSamplingRatio <float>
    Portion of the image to use in computing the metric during affine
    registration (default: 0.02)
  --affineMaxIterations <int>
    Maximum number of affine optimization iterations (default: 50)
  --rigidSamplingRatio <float>
    Portion of the image to use in computing the metric during rigid
    registration (default: 0.01)
  --rigidMaxIterations <int>
    Maximum number of rigid optimization iterations (default: 100)
  --movingLandmarks <std::vector<std::vector<float> >>  (accepted multiple
     times)
    Ordered list of landmarks in the moving image
  --fixedLandmarks <std::vector<std::vector<float> >>  (accepted multiple
     times)
    Ordered list of landmarks in the fixed image
  --baselineResampledMovingImage <std::string>
    Result resampling the moving image to the space of the baseline image
  --baselineDifferenceImage <std::string>
    Result from subtracting the registered moving image from the baseline
    image
  --baselineRadiusTolerance <int>
    Maximum neighborhood that will be searched to find a matching pixel
    (default: 0)
  --baselineIntensityTolerance <double>
    Maximum intensity difference for pixels to be considered matching
    (default: 10)
  --baselineNumberOfFailedPixelsTolerance <int>
    Maximum number of pixels that can differ and the test pass (default:
    1000)
  --baselineImage <std::string>
    Image against which the resampled moving image will be compared
  --interpolation <NearestNeighbor|Linear|BSpline>
    Method for interpolation within the optimization process (default:
    Linear)
  --minimizeMemory
    Reduce the amount of memory required at the cost of increased
    computation time (default: 0)
  --numberOfThreads <int>
    Number of CPU threads to use (default: 0)
  --randomNumberSeed <int>
    Seed to generate a consistent random number sequence (default: 0)
  --fixedImageMask <std::string>
    Image which defines a mask for the fixed image
  --sampleFromOverlap
    Limit metric evaluation to the fixed image region overlapped by the
    moving image (default: 0)
  --verbosityLevel <Silent|Standard|Verbose>
    Level of detail of reporting progress (default: Standard)
  --expectedSkew <float>
    Expected misalignment after initialization (default: 0.01)
  --expectedScale <float>
    Expected misalignment after initialization (default: 0.05)
  --expectedRotation <float>
    Expected misalignment after initialization (default: 0.1)
  --expectedOffset <float>
    Expected misalignment after initialization (default: 10)
  --metric <MattesMI|NormCorr|MeanSqrd>
    Method to quantify image match (default: MattesMI)
  --registration <None|Initial|Rigid|Affine|BSpline|PipelineRigid
     |PipelineAffine|PipelineBSpline>
    Method for the registration process (default: PipelineAffine)
  --initialization <None|Landmarks|ImageCenters|CentersOfMass
     |SecondMoments>
    Method to prime the registration process (default: CentersOfMass)
  --saveTransform <std::string>
    Save the transform that results from registration
  --loadTransform <std::string>
    Load a transform that is immediately applied to the moving image
  --resampledImage <std::string>
    Registration results
  --,  --ignore_rest
    Ignores the rest of the labeled arguments following this flag.
  --version
    Displays version information and exits.
  -h,  --help
    Displays usage information and exits.
  <std::string>
    (required)  Image which defines the space into which the moving image
    is registered
  <std::string>
    (required)  The transform goes from the fixed image's space into the
    moving image's space


  Description: Provides rigid, affine, and BSpline registration methods
  via a simple GUI
  Author(s): Stephen R Aylward

Publications

  1. Aylward, Stephen; Jomier, Julien; Barre, Sebastien; Davis, Brad; Ibanez, Luis, "Optimizing ITK’s Registration Methods for Multi-processor, Shared-Memory Systems." MICCAI Open Source and Open Data Workshop, 2007 (Download PDF)
  2. BWH Neuroimaging Analysis Center (NAC), 2007-2008: Grid Enabled ITK
  3. IJ article on oriented images and registration in ITK

Algorithmic Requirements and Use Cases

  • Use-cases
    1. Intersubject mapping
    2. fMRI to hi-res brain morphology mapping
    3. DTI: components of the diffusion tensor
  • Use-cases
    1. Intel Core2Duo
    2. Intel quad-core Xeon processors, Visual Studio 8, Windows Vista (Kitware: redwall)
    3. 6 CPU Sun, Solaris 8 (SPL: vision)
    4. 12 CPU Sun, Solaris 8 (SPL: forest and ocean)
    5. 16 core Opteron (SPL: john, ringo, paul, george)
    6. 16 core, Sun Fire, AMDOpteron (UNC: Styner)

Historic Results

January 5, 2008 - Note: "Opt" results are not using the OptLinearInterpolateImageFunction.

Historic Events

Related Pages

Notes on Software Profiling Tools