# Replace Difference Image Filter With Test Image Compare

Hans Johnson
2011-07-30
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.
#include "itkDifferenceImageFilter.h" typedef itk::DifferenceImageFilter<InputType,OutputType> ComparisonImagesFilterType;
#include "itkTestingComparisonImageFilter.h" typedef itk::Testing::ComparisonImageFilter<InputType,OutputType> ComparisonImagesFilterType;
Ie5722bc98ffdd65b600bb84701523139b73afd19
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
itk::DifferenceImageFilter
itk::Testing::ComparisonImageFilter
itkDifferenceImageFilter.h
itkTestingComparisonImageFilter.h