# Verify Inputs for ImageToImageFilter base class

Brad Lowekamp
2011-07-22
In nearly all ImageFilters derived from ImageToImage filter there was an implied condition that all the input image occupied the same physical space. This change provides a virutal function with a default behavior of requiring all input images to have the same physical space representation.

Added ProcessObject::VerifyInputs, which is executed before the the GenerateOutputInformation is propagated to the inputs. It is intended to verify that the required inputs are set, and that the parameters of the filter are valid.

Added VerifyInputInformation, which is executed after all inputs have generated their meta-data information. It is intended to verify that the metadata ( size and location ) are consistent and valid for the execution of the filter. The default behavior is to throw and exception and list the differences in physcial space definition.

/* VerifyInputInformation did not exists */
/* In class that derives from ImageToImageFilter, but does not * require that all inputs occupy the same physical space. * For example HistogramMatching filters do not require * that the images have the same physical dimensions */

/** Override VeriyInputInformation() since this filter does not expect * the input images to occupy the same physical space. * * \sa ProcessObject::VerifyInputInformation */ virtual void VerifyInputInformation() {}
I814be9223466af484239bf36671cb779576047f1
Modules/Core/Common/include/itkImageToImageFilter.h Modules/Core/Common/include/itkImageToImageFilter.txx Modules/Core/Common/include/itkProcessObject.h Modules/Core/Common/src/itkDataObject.cxx Modules/Core/Common/src/itkProcessObject.cxx Modules/Filtering/AnisotropicSmoothing/test/itkGradientAnisotropicDiffusionImageFilterTest2.cxx Modules/Filtering/ImageGrid/include/itkChangeInformationImageFilter.h Modules/Filtering/ImageGrid/include/itkChangeInformationImageFilter.txx Modules/Filtering/ImageGrid/include/itkInterpolateImagePointsFilter.h Modules/Filtering/ImageGrid/include/itkInterpolateImagePointsFilter.txx Modules/Filtering/ImageGrid/include/itkTileImageFilter.h Modules/Filtering/ImageGrid/include/itkTileImageFilter.txx Modules/Filtering/ImageGrid/include/itkWarpImageFilter.h Modules/Filtering/ImageGrid/include/itkWarpImageFilter.txx Modules/Filtering/ImageIntensity/test/CMakeLists.txt Modules/Filtering/ImageIntensity/test/itkAddImageFilterFrameTest.cxx Modules/IO/Base/test/CMakeLists.txt Modules/Nonunit/Review/include/itkConvolutionImageFilter.h Modules/Nonunit/Review/include/itkConvolutionImageFilter.txx Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFilter.h Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFilter.txx Modules/Registration/PDEDeformable/include/itkMultiResolutionPDEDeformableRegistration.h Modules/Registration/PDEDeformable/include/itkMultiResolutionPDEDeformableRegistration.txx