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

<!--**
**
** ReplaceDifferenceImageFilterWithTestImageCompare.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>
      Replace Difference Image Filter With Test Image Compare
    </Title>

    <!--**
    ** The author of the change
    **-->
    <Author>
      Hans Johnson
    </Author>

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

    <!--**
    ** Plain text description of the change
    ** Extracted from git commit messages
    **-->
    <Description>
      <![CDATA[
      STYLE: Completely duplicated code removed.
      The itkDifferenceImageFilter was duplicated
      to a more appropriate name for testing
      as the itkTestingComparisonImageFilter.

      In order to avoid duplicate code, the itkDifferenceImageFilter
      bug fix was place in itkTestingComparisonImageFilter, and
      now itkDifferenceImageFilter is a very thin wrapper that
      delegates all operations to the itkTestingComparisonImageFilter.
      ]]>
    </Description>

    <!--**
    ** Sample code snippets
    ** Extracted from git diff of changed files in Examples and Testing
    **-->
    <SampleCode>
      <Old>
        <![CDATA[
#include "itkDifferenceImageFilter.h"
typedef itk::DifferenceImageFilter<InputType,OutputType> ComparisonImagesFilterType;
        ]]>
      </Old>

      <New>
        <![CDATA[
#include "itkTestingComparisonImageFilter.h"
typedef itk::Testing::ComparisonImageFilter<InputType,OutputType> ComparisonImagesFilterType;
        ]]>
      </New>

    </SampleCode>

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

    <!--**
    ** List of all changed files from the topic branch
    **-->
    <FileList>
      Modules/Core/Common/test/itkImageRandomIteratorTest2.cxx
      Modules/Core/TestKernel/include/itkDifferenceImageFilter.h
      Modules/Core/TestKernel/include/itkDifferenceImageFilter.hxx
      Modules/Core/TestKernel/include/itkTestingComparisonImageFilter.hxx
      Modules/Filtering/AnisotropicSmoothing/test/itkGradientAnisotropicDiffusionImageFilterTest2.cxx
      Modules/Filtering/DistanceMap/test/itkIsoContourDistanceImageFilterTest.cxx
      Modules/Filtering/ImageCompare/test/CMakeLists.txt
      Modules/Filtering/ImageCompare/test/Input/itkTestingComparisonImageFilterTest.png.md5
      Modules/Filtering/ImageCompare/test/itkDifferenceImageFilterTest.cxx
      Modules/Filtering/ImageCompare/test/itkImageCompareHeaderTest.cxx
      Modules/Filtering/ImageCompare/test/itkTestingComparisonImageFilterTest.cxx
      Modules/IO/Base/test/itkImageFileReaderStreamingTest2.cxx
      Modules/IO/Base/test/itkImageFileWriterPastingTest2.cxx
      Modules/IO/Base/test/itkImageFileWriterPastingTest3.cxx
      Modules/IO/Base/test/itkImageFileWriterStreamingPastingCompressingTest1.cxx
      Modules/IO/Base/test/itkImageFileWriterStreamingTest2.cxx
      Modules/Nonunit/Deprecated/test/ImageCompare.cxx
      Modules/Nonunit/Deprecated/test/ImageCompareCommand.cxx
      Modules/Segmentation/LevelSets/test/itkExtensionVelocitiesImageFilterTest.cxx
      Modules/Segmentation/LevelSets/test/itkReinitializeLevelSetImageFilterTest.cxx
    </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[itk::DifferenceImageFilter]]>
      </Old>
      <New>
        <![CDATA[itk::Testing::ComparisonImageFilter]]>
      </New>
    </MigrationFix-Automatic>
    <MigrationFix-Automatic>
      <Old>
        <![CDATA[itkDifferenceImageFilter.h]]>
      </Old>
      <New>
        <![CDATA[itkTestingComparisonImageFilter.h]]>
      </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>
