14 #ifndef __itkNormalizedGradientCorrelationImageToImageMetric_h
15 #define __itkNormalizedGradientCorrelationImageToImageMetric_h
18 #include "itkSobelOperator.h"
19 #include "itkNeighborhoodOperatorImageFilter.h"
21 #include "itkCastImageFilter.h"
22 #include "itkResampleImageFilter.h"
23 #include "itkOptimizer.h"
39 template <
class TFixedImage,
class TMovingImage >
59 #if defined(_MSC_VER) && (_MSC_VER == 1300)
62 typedef typename Superclass::RealType
RealType;
87 itkStaticConstMacro( FixedImageDimension,
unsigned int, TFixedImage::ImageDimension );
95 typedef itk::Image<
unsigned char,
98 typedef itk::ResampleImageFilter<
114 itkStaticConstMacro( MovedImageDimension,
unsigned int, MovingImageType::ImageDimension );
136 virtual void Initialize(
void ) throw ( ExceptionObject );
139 void WriteGradientImagesToFiles(
void ) const;
143 itkGetConstReferenceMacro( Scales, ScalesType );
148 itkSetMacro( DerivativeDelta,
double );
149 itkGetConstReferenceMacro( DerivativeDelta,
double );
156 virtual ~NormalizedGradientCorrelationImageToImageMetric() {};
157 virtual void PrintSelf( std::ostream& os, Indent indent )
const;
160 void ComputeMeanMovedGradient(
void )
const;
161 void ComputeMeanFixedGradient(
void )
const;
164 MeasureType ComputeMeasure(
const TransformParametersType & parameters )
const;
165 typedef NeighborhoodOperatorImageFilter<
167 typedef NeighborhoodOperatorImageFilter<
172 void operator=(
const Self&);
191 itkGetStaticConstMacro(FixedImageDimension) >
192 m_FixedSobelOperators[FixedImageDimension];
194 typename FixedSobelFilter::Pointer m_FixedSobelFilters
195 [itkGetStaticConstMacro( FixedImageDimension )];
203 itkGetStaticConstMacro(MovedImageDimension) >
204 m_MovedSobelOperators[MovedImageDimension];
206 typename MovedSobelFilter::Pointer m_MovedSobelFilters[
207 itkGetStaticConstMacro( MovedImageDimension ) ];
214 #ifndef ITK_MANUAL_INSTANTIATION
215 #include "itkNormalizedGradientCorrelationImageToImageMetric.hxx"