# Make Kernel Base Templated

Hans Johnson
2011-11-29
ENH: Made the KernelFunction base class templated It is currently hard-coded to type double, but in some cases it makes sense to use single precision for these kernel operations. This was identified in the itkMattesMutualInformationImageToImageMetric where the kernel is repeated computed in double precision, but then typecast the input and the outputs to be double from the more naturual single precision.

ISSUE: ITK-2848
typedef itk::KernelFunction KernelFunctionType;
typedef itk::KernelFunctionBase<double> KernelFunctionType;
I8f39b7aa3e7fec9641eabd0849d599ea80e6401f
Modules/Core/Common/include/itkBSplineDerivativeKernelFunction.h Modules/Core/Common/include/itkBSplineKernelFunction.h Modules/Core/Common/include/itkGaussianKernelFunction.h Modules/Core/Common/include/itkKernelFunctionBase.h Modules/Core/Common/src/CMakeLists.txt Modules/Core/Common/src/itkGaussianKernelFunction.cxx Modules/Core/Common/src/itkKernelFunction.cxx Modules/Filtering/ImageGrid/include/itkCoxDeBoorBSplineKernelFunction.h Modules/Filtering/ImageGrid/include/itkCoxDeBoorBSplineKernelFunction.hxx Modules/Filtering/ImageSource/CMakeLists.txt Modules/Filtering/ImageSource/include/itkGaborImageSource.hxx Modules/Filtering/ImageSource/include/itkGaborKernelFunction.h Modules/Filtering/ImageSource/include/itkGridImageSource.h Modules/Filtering/ImageSource/include/itkGridImageSource.hxx Modules/Filtering/ImageSource/src/CMakeLists.txt Modules/Filtering/ImageSource/src/itkGaborKernelFunction.cxx Modules/Filtering/ImageSource/test/itkGaborImageSourceTest.cxx Modules/Nonunit/IntegratedTest/test/itkCommonPrintTest.cxx Modules/Registration/Common/include/itkMutualInformationImageToImageMetric.h Modules/Registration/Common/include/itkMutualInformationImageToImageMetric.hxx Modules/Registration/Common/test/itkMutualInformationMetricTest.cxx Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunction.h Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunction.hxx