21 #ifndef otbFineRegistrationImageFilter_h
22 #define otbFineRegistrationImageFilter_h
24 #include "itkImageToImageFilter.h"
25 #include "itkInterpolateImageFunction.h"
26 #include "itkContinuousIndex.h"
28 #include "itkTranslationTransform.h"
29 #include "itkImageToImageMetric.h"
73 template <
class TInputImage,
class T0utputCorrelation,
class TOutputDisplacementField>
79 typedef itk::ImageToImageFilter<TInputImage, T0utputCorrelation>
Superclass;
94 typedef typename TInputImage::SizeType
SizeType;
102 typedef itk::ImageToImageMetric<TInputImage, TInputImage>
MetricType;
120 void SetFixedInput(
const TInputImage* image);
123 void SetMovingInput(
const TInputImage* image);
126 const TInputImage* GetFixedInput();
127 const TInputImage* GetMovingInput();
131 TOutputDisplacementField* GetOutputDisplacementField();
139 itkSetMacro(SearchRadius,
SizeType);
140 itkGetMacro(SearchRadius,
SizeType);
144 itkSetMacro(ConvergenceAccuracy,
double);
145 itkGetMacro(ConvergenceAccuracy,
double);
149 itkSetMacro(SubPixelAccuracy,
double);
150 itkGetMacro(SubPixelAccuracy,
double);
154 itkSetMacro(MaxIter,
int);
155 itkGetMacro(MaxIter,
int);
159 itkSetMacro(Minimize,
bool);
160 itkBooleanMacro(Minimize);
164 itkSetMacro(UseSpacing,
bool);
165 itkBooleanMacro(UseSpacing);
170 itkGetConstReferenceMacro(InitialOffset,
SpacingType);
175 itkGetConstReferenceMacro(GridStep,
OffsetType);
181 m_Radius.Fill(radius);
187 m_SearchRadius.Fill(radius);
193 m_GridStep.Fill(step);
197 itkSetObjectMacro(
Transform, TransformType);
198 itkGetConstObjectMacro(
Transform, TransformType);
209 void GenerateData()
override;
212 void GenerateInputRequestedRegion(
void)
override;
215 void GenerateOutputInformation(
void)
override;
219 void operator=(
const Self&) =
delete;
221 inline double callMetric(
double val1,
double val2,
double& oldRes,
bool& flag);
222 inline void updateOptParams(
double potBestVal,
double parx,
double pary,
223 double& bestVal,
typename TranslationType::ParametersType& optParams);
224 inline void updatePoints(
double& gn,
double& in1,
double& in2,
double& in3,
225 double& out1,
double& out2,
double& out3,
double& out4);
226 inline void updateMinimize(
double& a,
double& b);
268 #ifndef OTB_MANUAL_INSTANTIATION