<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Change SYSTEM "http://itk.org/migrationv4/ITKMigration.dtd">

<!--**
**
** FixCentralDifferenceImageFunction.xml
**
** >>>>>>>>>>>>>>>>>>>>>>>>>>>>
** THIS FILE HAS BEEN AUTOMATICALLY GENERATED. EDIT IT BEFORE COMMITING
** <<<<<<<<<<<<<<<<<<<<<<<<<<<
**
** Please, make sure this file validates the following w3c test before committing it: http://validator.w3.org
**-->
<Change>
    <!--**
    ** Title for the online migration page
    **-->
    <Title>
      Fix CentralDifferenceImageFunction for non-integer Point and ContinuousIndex
    </Title>

    <!--**
    ** The author of the change
    **-->
    <Author>
      Michael Stauffer
    </Author>

    <!--**
    ** Date of creation for the XML document
    **-->
    <Date>
      2011-11-30
    </Date>

    <!--**
    ** Plain text description of the change
    ** Extracted from git commit messages
    **-->
    <Description>
      <![CDATA[
      Fix CentralDifferenceImageFunction non-integer behavior.
      The methods Evaluate and EvaluateAtContinuousIndex in
      CentralDifferenceImageFunction were rounding the input point
      and continuous-index, respectively, to integer index values.
      This commit changes that behavior to evaluate them at continuous
      points and indecies, respectively.

      The API has not changed. The purpose of this migration guide entry is to
      alert the user that regression tests may fail.

      Image::TransformPhysicalPointToLocalPoint was added to compliment
      Image::TransformLocalPointToPhysicalPoint, for use in
      CentralDifferenceImageFunction::Evaluate when the flag m_UseImageDirection
      is false.

      Image::m_InverseDirection was added, with automatic calculation in
      Image::SetDirection, for use in Image::TransformPhysicalPointToLocalPoint.

      The baseline images for these tests have been updated to reflect
      the output of the modified methods:

      ImageRegistration4Test2
      ImageRegistration2Test
      DeformableRegistration12Test2
      DeformableRegistration12Test1
      DeformableRegistration12Test4
      DeformableRegistration12Test3
      DeformableRegistration13Test2
      DeformableRegistration13Test1
      DeformableRegistration13Test4
      DeformableRegistration13Test3

      This table below shows that by a cross-correlation measure with the
      fixed image, this change provides slightly better registration preformance
      than before.

      CC image similarity of previous baseline and new output with fixed image:

      Baseline	New output	Test
      0.397664	0.400048	ImageRegistration4Test2
      0.393323	0.394073	ImageRegistration2Test
      0.845327	0.848734	DeformableRegistration12Test1
      0.845327	0.848227	DeformableRegistration12Test2
      0.845327	0.848649	DeformableRegistration12Test3
      0.845327	0.848126	DeformableRegistration12Test4
      0.845006	0.848648	DeformableRegistration13Test1
      0.845006	0.848648	DeformableRegistration13Test2
      0.845006	0.848648	DeformableRegistration13Test3
      0.845006	0.848648	DeformableRegistration13Test4

      Profiling test:

      The new method is just slightly slower than the old method, probably
      within measurement error.
      Mac OSX 10.6, MacBook Pro Core 2 Duo @ 2.4 GHz
      Release build.
      Run using Example/Registration/ImageRegistration2, consisting of
      200 iterations of GradientDescentOptimizer with
      MutualInformationImageToImageMetric.
      Profiled via unix &apos;time&apos; command on complete registration example.
      &apos;user&apos; + &apos;sys&apos; time in seconds, average of 3 runs:
      Old: 22.45
      New: 22.54

      ]]>
    </Description>


    <!--**
    ** The change-ids for all commits in the topic branch
    **-->
    <Gerrit-ChangeId>
      I772a657451645222c69cdc9e1d87fa2e4acd0f19
    </Gerrit-ChangeId>

    <!--**
    ** List of all changed files from the topic branch
    **-->
    <FileList>
      Examples/Registration/test/Baseline/DeformableRegistration12Test.png.md5
      Examples/Registration/test/Baseline/DeformableRegistration13Test.png.md5
      Examples/Registration/test/CMakeLists.txt
      Modules/Core/Common/include/itkImageBase.h
      Modules/Core/Common/include/itkImageBase.hxx
      Modules/Core/Common/include/itkPhasedArray3DSpecialCoordinatesImage.h
      Modules/Core/Common/test/itkImageTest.cxx
      Modules/Core/ImageAdaptors/include/itkImageAdaptor.h
      Modules/Core/ImageFunction/include/itkCentralDifferenceImageFunction.h
      Modules/Core/ImageFunction/include/itkCentralDifferenceImageFunction.hxx
      Modules/Core/ImageFunction/test/itkCentralDifferenceImageFunctionTest.cxx
      Modules/Registration/Common/test/CMakeLists.txt
      Modules/Registration/Common/test/itkImageRegistrationMethodTest_14.cxx
      Testing/Data/Baseline/Registration/ImageRegistration2Test.png.md5
      Testing/Data/Baseline/Registration/ImageRegistration4Test.png.md5
    </FileList>

    <!--**
    ** If the migration can be accomplished by a simple string
    ** substitution, then use the following construct to define
    ** the substitution rule.
    **
    ** <MigrationFix-Automatic>
    **   <Old>
    **     <![CDATA[MipsleledName]]>
    **   </Old>
    **   <New>
    **     <![CDATA[MisspelledName]]>
    **   </New>
    ** </MigrationFix-Automatic>
    **-->

    <!--**
    ** If the migration can NOT be accomplished by a simple string
    ** substitution, but potential problem spots can be identified,
    ** use the following construct to define a migration flag rule.
    **
    ** <MigrationFix-Manual>
    **   OldFunctionName
    ** </MigrationFix-Manual>
    **-->

</Change>
