OTB  10.0.0
Orfeo Toolbox
otbNCCRegistrationFilter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2024 Centre National d'Etudes Spatiales (CNES)
3  *
4  * This file is part of Orfeo Toolbox
5  *
6  * https://www.orfeo-toolbox.org/
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 
21 #ifndef otbNCCRegistrationFilter_h
22 #define otbNCCRegistrationFilter_h
23 
24 #include "itkPDEDeformableRegistrationFilter.h"
26 
27 namespace otb
28 {
29 
71 template <class TFixedImage, class TMovingImage, class TDisplacementField>
72 class ITK_EXPORT NCCRegistrationFilter : public itk::PDEDeformableRegistrationFilter<TFixedImage, TMovingImage, TDisplacementField>
73 {
74 public:
77  typedef itk::PDEDeformableRegistrationFilter<TFixedImage, TMovingImage, TDisplacementField> Superclass;
78  typedef itk::SmartPointer<Self> Pointer;
79  typedef itk::SmartPointer<const Self> ConstPointer;
80 
82  itkNewMacro(Self);
83 
85  itkTypeMacro(NCCRegistrationFilter, itk::PDEDeformableRegistrationFilter);
86 
88  typedef typename Superclass::TimeStepType TimeStepType;
89 
91  typedef typename Superclass::FixedImageType FixedImageType;
92  typedef typename Superclass::FixedImagePointer FixedImagePointer;
93 
95  typedef typename Superclass::MovingImageType MovingImageType;
96  typedef typename Superclass::MovingImagePointer MovingImagePointer;
97 
99  typedef typename Superclass::DisplacementFieldType DisplacementFieldType;
100  typedef typename Superclass::DisplacementFieldPointer DisplacementFieldPointer;
101 
103  typedef typename Superclass::FiniteDifferenceFunctionType FiniteDifferenceFunctionType;
104 
107 
109 
116  virtual double GetMetric() const;
117 
122  virtual void SetNCCRadius(RadiusType radius);
123 
128  virtual RadiusType GetNCCRadius() const;
129 
130 protected:
133  {
134  }
135  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
136 
138  void InitializeIteration() override;
139 
141  using Superclass::ApplyUpdate;
142  virtual void ApplyUpdate(TimeStepType dt);
143 
145  void GenerateInputRequestedRegion() override;
146 
147 private:
148  NCCRegistrationFilter(const Self&) = delete;
149  void operator=(const Self&) = delete;
150 };
151 
152 } // end namespace otb
153 
154 #ifndef OTB_MANUAL_INSTANTIATION
156 #endif
157 
158 #endif
Deformably register two images using the PDEs and NCC.
NCCRegistrationFunctionType::RadiusType RadiusType
NCCRegistrationFilter(const Self &)=delete
itk::PDEDeformableRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField > Superclass
Superclass::DisplacementFieldPointer DisplacementFieldPointer
void operator=(const Self &)=delete
itk::SmartPointer< const Self > ConstPointer
itk::SmartPointer< Self > Pointer
Superclass::TimeStepType TimeStepType
Superclass::MovingImageType MovingImageType
Superclass::FiniteDifferenceFunctionType FiniteDifferenceFunctionType
Superclass::MovingImagePointer MovingImagePointer
Superclass::FixedImagePointer FixedImagePointer
Superclass::FixedImageType FixedImageType
Superclass::DisplacementFieldType DisplacementFieldType
NCCRegistrationFunction< FixedImageType, MovingImageType, DisplacementFieldType > NCCRegistrationFunctionType
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.