Difference between revisions of "Proposals:Decoupling ImageMetric from BSplineDeformableTransform"

From KitwarePublic
Jump to navigationJump to search
(New page: __TOC__ = The Problem == * The ImageToImageMetric knows too much ** It is aware of the *** BSplineDeformableTransform *** BSplineIntepolateImageFunction ** It performs dynamic_casting ...)
 
 
Line 1: Line 1:
__TOC__
__TOC__


= The Problem ==
= The Problem =


* The ImageToImageMetric knows too much
* The ImageToImageMetric knows too much

Latest revision as of 18:33, 28 December 2007

The Problem

  • The ImageToImageMetric knows too much
    • It is aware of the
      • BSplineDeformableTransform
      • BSplineIntepolateImageFunction
    • It performs dynamic_casting to discover the type of the Transform and Interpolator
    • It caches several arrays for the BSplineDeformableTransform
      • The caching has the following problems
        • It is not optional (can't be turned off)
        • It is memory consuming (about 3 Gigabytes)
        • It break class encapsulation

The Proposed Solution

  • Add a TransformCacher class
    • A default cacher will not do anything
    • A cacher for the BSplineDeformableTransform will take over the code that is currently in the ImageToImageMetric
    • More sophisticated cachers could be added
  • The Transform class will use the default cacher
  • The Metric will
    • request the Transform for its cacher (at run time)
    • use the cacher for passing a list of points to be mapped, and then map one by one using an index