ITK  5.2.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  * http://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 
109 
111  using FixedImageType = TFixedImage;
112  using FixedImagePointer = typename FixedImageType::Pointer;
113  using MovingImageType = TMovingImage;
114  using MovingImagePointer = typename MovingImageType::Pointer;
115 
117 
119  using ImageMetricType = typename Superclass::ImageMetricType;
123  using MultiMetricType = typename Superclass::MultiMetricType;
124 
125  using OutputTransformType = TOutputTransform;
126  using OutputTransformPointer = typename OutputTransformType::Pointer;
127  using RealType = typename OutputTransformType::ScalarType;
128  using DerivativeType = typename OutputTransformType::DerivativeType;
129  using DerivativeValueType = typename DerivativeType::ValueType;
130  using TimeVaryingVelocityFieldType = typename OutputTransformType::TimeVaryingVelocityFieldType;
131  using TimeVaryingVelocityFieldPointer = typename TimeVaryingVelocityFieldType::Pointer;
132  using DisplacementFieldType = typename OutputTransformType::DisplacementFieldType;
133  using DisplacementFieldPointer = typename DisplacementFieldType::Pointer;
134  using DisplacementVectorType = typename TimeVaryingVelocityFieldType::PixelType;
135 
136  using CompositeTransformType = typename Superclass::CompositeTransformType;
137 
138  using DecoratedOutputTransformType = typename Superclass::DecoratedOutputTransformType;
140 
142 
144  itkSetMacro(LearningRate, RealType);
145  itkGetConstMacro(LearningRate, RealType);
147 
149  itkSetMacro(NumberOfIterationsPerLevel, NumberOfIterationsArrayType);
150  itkGetConstMacro(NumberOfIterationsPerLevel, NumberOfIterationsArrayType);
152 
154  itkSetMacro(ConvergenceThreshold, RealType);
155  itkGetConstMacro(ConvergenceThreshold, RealType);
157 
159  itkSetMacro(ConvergenceWindowSize, unsigned int);
160  itkGetConstMacro(ConvergenceWindowSize, unsigned int);
162 
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 
178  virtual void
179  StartOptimization();
180 
181 private:
183 
185  unsigned int m_ConvergenceWindowSize{ 10 };
186 
188 };
189 } // end namespace itk
190 
191 #ifndef ITK_MANUAL_INSTANTIATION
192 # include "itkTimeVaryingVelocityFieldImageRegistrationMethodv4.hxx"
193 #endif
194 
195 #endif
itk::ImageToImageMetricv4::MeasureType
typename Superclass::MeasureType MeasureType
Definition: itkImageToImageMetricv4.h:352
itk::ImageRegistrationMethodv4::MovingImageType
TMovingImage MovingImageType
Definition: itkImageRegistrationMethodv4.h:142
itkGaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform.h
itk::TimeVaryingVelocityFieldImageRegistrationMethodv4::TimeVaryingVelocityFieldType
typename OutputTransformType::TimeVaryingVelocityFieldType TimeVaryingVelocityFieldType
Definition: itkTimeVaryingVelocityFieldImageRegistrationMethodv4.h:130
itk::CompositeTransform
This class contains a list of transforms and concatenates them by composition.
Definition: itkCompositeTransform.h:87
itk::TimeVaryingVelocityFieldImageRegistrationMethodv4::m_NumberOfIterationsPerLevel
NumberOfIterationsArrayType m_NumberOfIterationsPerLevel
Definition: itkTimeVaryingVelocityFieldImageRegistrationMethodv4.h:187
itk::TimeVaryingVelocityFieldImageRegistrationMethodv4::ImageMetricPointer
typename ImageMetricType::Pointer ImageMetricPointer
Definition: itkTimeVaryingVelocityFieldImageRegistrationMethodv4.h:120
itk::TimeVaryingVelocityFieldImageRegistrationMethodv4::m_ConvergenceThreshold
RealType m_ConvergenceThreshold
Definition: itkTimeVaryingVelocityFieldImageRegistrationMethodv4.h:184
itk::ImageRegistrationMethodv4::FixedImagePointer
typename FixedImageType::Pointer FixedImagePointer
Definition: itkImageRegistrationMethodv4.h:139
itk::ObjectToObjectMultiMetricv4
This class takes one ore more ObjectToObject metrics and assigns weights to their derivatives to comp...
Definition: itkObjectToObjectMultiMetricv4.h:96
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::TimeVaryingVelocityFieldImageRegistrationMethodv4::m_LearningRate
RealType m_LearningRate
Definition: itkTimeVaryingVelocityFieldImageRegistrationMethodv4.h:182
itk::DataObjectDecorator
Decorates any subclass of itkObject with a DataObject API.
Definition: itkDataObjectDecorator.h:66
itk::ImageRegistrationMethodv4::RealType
typename OutputTransformType::ScalarType RealType
Definition: itkImageRegistrationMethodv4.h:154
itk::ThreadIdType
unsigned int ThreadIdType
Definition: itkIntTypes.h:99
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
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::ImageToImageMetricv4
Definition: itkImageToImageMetricv4.h:174
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