Difference between revisions of "ITK Registration Optimization/Testing And Backward Forward Compatibility"
Line 30: | Line 30: | ||
These component were mixed in their optimized and non-optimized (standard) versions, in order to create regression tests comparing the result of the non-optimized versions with the results of the optimized versions. | These component were mixed in their optimized and non-optimized (standard) versions, in order to create regression tests comparing the result of the non-optimized versions with the results of the optimized versions. | ||
+ | |||
+ | Since this is a combinatorial problem, the source code of the tests was generated using CMake macros, that combines the components in different ways and prepares their corresponding initializations. | ||
+ | |||
+ | The choice of optimizers was '''mostly''' driven by the Transform, according to the following table: | ||
+ | |||
+ | {| border="1" | ||
+ | |- bgcolor="#abcdef" | ||
+ | ! Transform !! Optimizer | ||
+ | |- | ||
+ | | Translation || RegularStepGradientDescent | ||
+ | |- | ||
+ | | Rigid2D || RegularStepGradientDescent | ||
+ | |- | ||
+ | | Rigid3D || VersorRigid3DTransform | ||
+ | |- | ||
+ | | Affine || RegularStepGradientDescent | ||
+ | |- | ||
+ | | BSplineDeformable || LBFGSB | ||
+ | |} | ||
+ | |||
+ | However, inconsistencies in the '''current''' API of some metrics and some optimizers induced the following variations | ||
+ | |||
+ | {| border="1" | ||
+ | |- bgcolor="#abcdef" | ||
+ | ! !! MeanSquares !! MutualInformation !! MattesMutualInformation | ||
+ | |- | ||
+ | | Translation || RegularStepGradientDescent || RegularStepGradientDescent || RegularStepGradientDescent | ||
+ | |- | ||
+ | | Rigid2D || RegularStepGradientDescent || RegularStepGradientDescent || RegularStepGradientDescent | ||
+ | |- | ||
+ | | Rigid3D || VersorRigid3DTransform || VersorRigid3DTransform || VersorRigid3DTransform | ||
+ | |- | ||
+ | | Affine || RegularStepGradientDescent || RegularStepGradientDescent || RegularStepGradientDescent | ||
+ | |- | ||
+ | | BSplineDeformable || LBFGSB || RegularStepGradientDescent || LBFGSB | ||
+ | |} |
Revision as of 23:54, 30 July 2007
Home < ITK Registration Optimization < Testing And Backward Forward CompatibilityBackward Forward Compatibility
This page describes the testing framework used for verifying the backward/forward compatibility of the optimized classes developed in this project with the standard classes currently in ITK.
Compatibility
- Backward Compatibility
- A modified class is backward compatible with a given version "V", when applications that used the version "V" of the class, can adopt the new modified version of the class without having to change their source code to compile it, and by arriving to identical results when using the class at run-time.
- Forward Compatibility
- A modified class is forward compatible with a given version "V", when interactions based on the old API of the class are safely translated to the new API of the class.
Testing
The ONLY way to tell for sure if a class is backward/forward compatible is to have a test for it.
In order to verify the backward/forward compatibility of the optimized classes a testing framework was put in place. This framework generates tests based on combinations of the following components
- Transforms
- Translation
- Rigid (2D/3D)
- Affine
- BSplineDeformable
- Metrics
- MeanSquares
- MutualInformation
- MattesMutualInformation
- Interpolators
- NearestNeighbor
- Linear
- BSpline
These component were mixed in their optimized and non-optimized (standard) versions, in order to create regression tests comparing the result of the non-optimized versions with the results of the optimized versions.
Since this is a combinatorial problem, the source code of the tests was generated using CMake macros, that combines the components in different ways and prepares their corresponding initializations.
The choice of optimizers was mostly driven by the Transform, according to the following table:
Transform | Optimizer |
---|---|
Translation | RegularStepGradientDescent |
Rigid2D | RegularStepGradientDescent |
Rigid3D | VersorRigid3DTransform |
Affine | RegularStepGradientDescent |
BSplineDeformable | LBFGSB |
However, inconsistencies in the current API of some metrics and some optimizers induced the following variations
MeanSquares | MutualInformation | MattesMutualInformation | |
---|---|---|---|
Translation | RegularStepGradientDescent | RegularStepGradientDescent | RegularStepGradientDescent |
Rigid2D | RegularStepGradientDescent | RegularStepGradientDescent | RegularStepGradientDescent |
Rigid3D | VersorRigid3DTransform | VersorRigid3DTransform | VersorRigid3DTransform |
Affine | RegularStepGradientDescent | RegularStepGradientDescent | RegularStepGradientDescent |
BSplineDeformable | LBFGSB | RegularStepGradientDescent | LBFGSB |