#ifndef __itkMaxPhaseCorrelationOptimizer_h #define __itkMaxPhaseCorrelationOptimizer_h #include "itkPhaseCorrelationOptimizer.h" #include "itkMinimumMaximumImageCalculator.h" namespace itk { /** \class MaxPhaseCorrelationOptimizer * \brief Implements basic shift estimation from position of maximum peak. * * This class is templated over the type of registration method in which it has * to be plugged in. * * Operates on real correlation surface, so when set to the registration method, * it should be get back by * PhaseCorrelationImageRegistrationMethod::GetRealOptimizer() method. * * The optimizer finds the maximum peak by MinimumMaximumImageCalculator and * estimates the shift with pixel-level precision. * * \author Jakub Bican, jakub.bican@matfyz.cz, Department of Image Processing, Institute of Information Theory and Automation, Academy of Sciences of the Czech Republic. * */ template < typename TRegistrationMethod > class ITK_EXPORT MaxPhaseCorrelationOptimizer : public PhaseCorrelationOptimizer { public: typedef MaxPhaseCorrelationOptimizer Self; typedef PhaseCorrelationOptimizer< typename TRegistrationMethod::RealImageType> Superclass; typedef SmartPointer Pointer; typedef SmartPointer ConstPointer; /** Method for creation through the object factory. */ itkNewMacro(Self); /** Run-time type information (and related methods). */ itkTypeMacro(MaxPhaseCorrelationOptimizer, PhaseCorrelationOptimizer); /** Type of the input image. */ typedef typename TRegistrationMethod::RealImageType ImageType; typedef typename ImageType::ConstPointer ImageConstPointer; /** Dimensionality of input and output data. */ itkStaticConstMacro(ImageDimension, unsigned int, GetImageDimension::ImageDimension ); /** Type for the output parameters. * It defines a position in the optimization search space. */ typedef typename Superclass::OffsetType OffsetType; typedef typename Superclass::OffsetScalarType OffsetScalarType; /** Method to return the latest modified time of this object or * any of its cached ivars */ unsigned long GetMTime() const; protected: MaxPhaseCorrelationOptimizer(); virtual ~MaxPhaseCorrelationOptimizer() {}; void PrintSelf(std::ostream& os, Indent indent) const; /** This method is executed by superclass to execute the computation. */ virtual void ComputeOffset(); typedef MinimumMaximumImageCalculator< ImageType > MaxCalculatorType; private: MaxPhaseCorrelationOptimizer(const Self&); //purposely not implemented void operator=(const Self&); //purposely not implemented typename MaxCalculatorType::Pointer m_MaxCalculator; }; } // end namespace itk #ifndef ITK_MANUAL_INSTANTIATION #include "itkMaxPhaseCorrelationOptimizer.txx" #endif #endif