ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkTimeVaryingVelocityFieldImageRegistrationMethodv4.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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, typename TMovingImage, typename TOutputTransform =
84  GaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform<double, TFixedImage::ImageDimension>,
85  typename TVirtualImage = TFixedImage,
86  typename TPointSet = PointSet<unsigned int, TFixedImage::ImageDimension> >
88 : public ImageRegistrationMethodv4<TFixedImage, TMovingImage, TOutputTransform, TVirtualImage, TPointSet>
89 {
90 public:
91  ITK_DISALLOW_COPY_AND_ASSIGN(TimeVaryingVelocityFieldImageRegistrationMethodv4);
92 
95  using Superclass = ImageRegistrationMethodv4<TFixedImage, TMovingImage, TOutputTransform,
96  TVirtualImage, TPointSet>;
99 
101  itkNewMacro( Self );
102 
104  static constexpr unsigned int ImageDimension = TFixedImage::ImageDimension;
105 
108 
110  using FixedImageType = TFixedImage;
111  using FixedImagePointer = typename FixedImageType::Pointer;
112  using MovingImageType = TMovingImage;
113  using MovingImagePointer = typename MovingImageType::Pointer;
114 
116 
118  using ImageMetricType = typename Superclass::ImageMetricType;
122  using MultiMetricType = typename Superclass::MultiMetricType;
123 
124  using OutputTransformType = TOutputTransform;
125  using OutputTransformPointer = typename OutputTransformType::Pointer;
126  using RealType = typename OutputTransformType::ScalarType;
127  using DerivativeType = typename OutputTransformType::DerivativeType;
128  using DerivativeValueType = typename DerivativeType::ValueType;
129  using TimeVaryingVelocityFieldType = typename OutputTransformType::TimeVaryingVelocityFieldType;
130  using TimeVaryingVelocityFieldPointer = typename TimeVaryingVelocityFieldType::Pointer;
131  using DisplacementFieldType = typename OutputTransformType::DisplacementFieldType;
132  using DisplacementFieldPointer = typename DisplacementFieldType::Pointer;
133  using DisplacementVectorType = typename TimeVaryingVelocityFieldType::PixelType;
134 
135  using CompositeTransformType = typename Superclass::CompositeTransformType;
136 
137  using DecoratedOutputTransformType = typename Superclass::DecoratedOutputTransformType;
139 
141 
143  itkSetMacro( LearningRate, RealType );
144  itkGetConstMacro( LearningRate, RealType );
146 
148  itkSetMacro( NumberOfIterationsPerLevel, NumberOfIterationsArrayType );
149  itkGetConstMacro( NumberOfIterationsPerLevel, NumberOfIterationsArrayType );
151 
153  itkSetMacro( ConvergenceThreshold, RealType );
154  itkGetConstMacro( ConvergenceThreshold, RealType );
156 
158  itkSetMacro( ConvergenceWindowSize, unsigned int );
159  itkGetConstMacro( ConvergenceWindowSize, unsigned int );
161 
162 protected:
165  void PrintSelf( std::ostream & os, Indent indent ) const override;
166 
168  void GenerateData() override;
169 
171  void ThreadedGenerateData( const RegionType &, ThreadIdType );
172 
174  virtual void StartOptimization();
175 
176 private:
178 
180  unsigned int m_ConvergenceWindowSize{ 10 };
181 
183 };
184 } // end namespace itk
185 
186 #ifndef ITK_MANUAL_INSTANTIATION
187 #include "itkTimeVaryingVelocityFieldImageRegistrationMethodv4.hxx"
188 #endif
189 
190 #endif
Light weight base class for most itk classes.
typename OutputTransformType::DerivativeType DerivativeType
This class takes one ore more ObjectToObject metrics and assigns weights to their derivatives to comp...
typename Superclass::VirtualImageType VirtualImageType
typename MovingImageType::Pointer MovingImagePointer
typename Superclass::MeasureType MeasureType
This class contains a list of transforms and concatenates them by composition.
Decorates any subclass of itkObject with a DataObject API.
typename DerivativeType::ValueType DerivativeValueType
typename DecoratedOutputTransformType::Pointer DecoratedOutputTransformPointer
unsigned int ThreadIdType
Definition: itkIntTypes.h:99
typename FixedImageType::Pointer FixedImagePointer
typename OutputTransformType::TimeVaryingVelocityFieldType TimeVaryingVelocityFieldType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename OutputTransformType::ScalarType RealType
Interface method for the current registration framework.
typename OutputTransformType::Pointer OutputTransformPointer
Interface method for the current registration framework using the time varying velocity field transfo...