ITK  6.0.0
Insight Toolkit
itkTimeVaryingVelocityFieldImageRegistrationMethodv4.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * https://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkTimeVaryingVelocityFieldImageRegistrationMethodv4_h
19 #define itkTimeVaryingVelocityFieldImageRegistrationMethodv4_h
20 
22 
24 
25 namespace itk
26 {
27 
83 template <typename TFixedImage,
84  typename TMovingImage,
85  typename TOutputTransform =
86  GaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform<double, TFixedImage::ImageDimension>,
87  typename TVirtualImage = TFixedImage,
88  typename TPointSet = PointSet<unsigned int, TFixedImage::ImageDimension>>
90  : public ImageRegistrationMethodv4<TFixedImage, TMovingImage, TOutputTransform, TVirtualImage, TPointSet>
91 {
92 public:
93  ITK_DISALLOW_COPY_AND_MOVE(TimeVaryingVelocityFieldImageRegistrationMethodv4);
94 
100 
102  itkNewMacro(Self);
103 
105  static constexpr unsigned int ImageDimension = TFixedImage::ImageDimension;
106 
108  itkOverrideGetNameOfClassMacro(TimeVaryingVelocityFieldImageRegistrationMethodv4);
109 
111  using FixedImageType = TFixedImage;
113  using MovingImageType = TMovingImage;
115 
117 
119  using typename Superclass::ImageMetricType;
123  using typename Superclass::MultiMetricType;
124 
125  using OutputTransformType = TOutputTransform;
127  using RealType = typename OutputTransformType::ScalarType;
128  using DerivativeType = typename OutputTransformType::DerivativeType;
129  using DerivativeValueType = typename DerivativeType::ValueType;
130  using TimeVaryingVelocityFieldType = typename OutputTransformType::TimeVaryingVelocityFieldType;
132  using DisplacementFieldType = typename OutputTransformType::DisplacementFieldType;
134  using DisplacementVectorType = typename TimeVaryingVelocityFieldType::PixelType;
135 
136  using typename Superclass::CompositeTransformType;
137 
138  using typename Superclass::DecoratedOutputTransformType;
140 
142 
144  itkSetMacro(LearningRate, RealType);
145  itkGetConstMacro(LearningRate, RealType);
149  itkSetMacro(NumberOfIterationsPerLevel, NumberOfIterationsArrayType);
150  itkGetConstMacro(NumberOfIterationsPerLevel, NumberOfIterationsArrayType);
154  itkSetMacro(ConvergenceThreshold, RealType);
155  itkGetConstMacro(ConvergenceThreshold, RealType);
159  itkSetMacro(ConvergenceWindowSize, unsigned int);
160  itkGetConstMacro(ConvergenceWindowSize, unsigned int);
163 protected:
166  void
167  PrintSelf(std::ostream & os, Indent indent) const override;
168 
170  void
171  GenerateData() override;
172 
174  void
175  ThreadedGenerateData(const RegionType &, ThreadIdType);
176 
181  virtual void
182  StartOptimization();
183 
184 private:
185  RealType m_LearningRate{};
186 
187  RealType m_ConvergenceThreshold{};
188  unsigned int m_ConvergenceWindowSize{ 10 };
189 
190  NumberOfIterationsArrayType m_NumberOfIterationsPerLevel{};
191 };
192 } // end namespace itk
193 
194 #ifndef ITK_MANUAL_INSTANTIATION
195 # include "itkTimeVaryingVelocityFieldImageRegistrationMethodv4.hxx"
196 #endif
197 
198 #endif
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:93
itk::ImageRegistrationMethodv4::MovingImageType
TMovingImage MovingImageType
Definition: itkImageRegistrationMethodv4.h:142
itkGaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform.h
itk::TimeVaryingVelocityFieldImageRegistrationMethodv4::TimeVaryingVelocityFieldType
typename OutputTransformType::TimeVaryingVelocityFieldType TimeVaryingVelocityFieldType
Definition: itkTimeVaryingVelocityFieldImageRegistrationMethodv4.h:130
itk::TimeVaryingVelocityFieldImageRegistrationMethodv4::ImageMetricPointer
typename ImageMetricType::Pointer ImageMetricPointer
Definition: itkTimeVaryingVelocityFieldImageRegistrationMethodv4.h:120
itk::ImageRegistrationMethodv4::FixedImagePointer
typename FixedImageType::Pointer FixedImagePointer
Definition: itkImageRegistrationMethodv4.h:139
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::TimeVaryingVelocityFieldImageRegistrationMethodv4::MeasureType
typename ImageMetricType::MeasureType MeasureType
Definition: itkTimeVaryingVelocityFieldImageRegistrationMethodv4.h:122
itkImageRegistrationMethodv4.h
itk::ImageRegistrationMethodv4::RealType
typename OutputTransformType::ScalarType RealType
Definition: itkImageRegistrationMethodv4.h:154
itk::SingleValuedCostFunctionv4Template::MeasureType
TInternalComputationValueType MeasureType
Definition: itkSingleValuedCostFunctionv4.h:67
itk::ThreadIdType
unsigned int ThreadIdType
Definition: itkIntTypes.h:102
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itk::ImageRegistrationMethodv4::FixedImageType
TFixedImage FixedImageType
Definition: itkImageRegistrationMethodv4.h:138
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::TimeVaryingVelocityFieldImageRegistrationMethodv4
Interface method for the current registration framework using the time varying velocity field transfo...
Definition: itkTimeVaryingVelocityFieldImageRegistrationMethodv4.h:89
itk::ImageRegistrationMethodv4::MovingImagePointer
typename MovingImageType::Pointer MovingImagePointer
Definition: itkImageRegistrationMethodv4.h:143
itk::TimeVaryingVelocityFieldImageRegistrationMethodv4::DisplacementVectorType
typename TimeVaryingVelocityFieldType::PixelType DisplacementVectorType
Definition: itkTimeVaryingVelocityFieldImageRegistrationMethodv4.h:134
itk::TimeVaryingVelocityFieldImageRegistrationMethodv4::RegionType
typename MovingImageType::RegionType RegionType
Definition: itkTimeVaryingVelocityFieldImageRegistrationMethodv4.h:116
itk::TimeVaryingVelocityFieldImageRegistrationMethodv4::TimeVaryingVelocityFieldPointer
typename TimeVaryingVelocityFieldType::Pointer TimeVaryingVelocityFieldPointer
Definition: itkTimeVaryingVelocityFieldImageRegistrationMethodv4.h:131
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::TimeVaryingVelocityFieldImageRegistrationMethodv4::DisplacementFieldPointer
typename DisplacementFieldType::Pointer DisplacementFieldPointer
Definition: itkTimeVaryingVelocityFieldImageRegistrationMethodv4.h:133
itk::ImageRegistrationMethodv4
Interface method for the current registration framework.
Definition: itkImageRegistrationMethodv4.h:117
itk::ImageRegistrationMethodv4::OutputTransformPointer
typename OutputTransformType::Pointer OutputTransformPointer
Definition: itkImageRegistrationMethodv4.h:153
itk::Array< SizeValueType >
itk::ImageRegistrationMethodv4::VirtualImageType
TVirtualImage VirtualImageType
Definition: itkImageRegistrationMethodv4.h:169
itk::TimeVaryingVelocityFieldImageRegistrationMethodv4::DisplacementFieldType
typename OutputTransformType::DisplacementFieldType DisplacementFieldType
Definition: itkTimeVaryingVelocityFieldImageRegistrationMethodv4.h:132
itk::ImageRegistrationMethodv4::DecoratedOutputTransformPointer
typename DecoratedOutputTransformType::Pointer DecoratedOutputTransformPointer
Definition: itkImageRegistrationMethodv4.h:190
itk::ImageRegistrationMethodv4::OutputTransformType
TOutputTransform OutputTransformType
Definition: itkImageRegistrationMethodv4.h:152
itk::ImageRegistrationMethodv4::DerivativeValueType
typename DerivativeType::ValueType DerivativeValueType
Definition: itkImageRegistrationMethodv4.h:156
itk::ImageToImageMetricv4::VirtualImageType
typename Superclass::VirtualImageType VirtualImageType
Definition: itkImageToImageMetricv4.h:251
itk::ImageRegistrationMethodv4::DerivativeType
typename OutputTransformType::DerivativeType DerivativeType
Definition: itkImageRegistrationMethodv4.h:155