ITK  4.13.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:
93  typedef ImageRegistrationMethodv4<TFixedImage, TMovingImage, TOutputTransform,
94  TVirtualImage, TPointSet> Superclass;
97 
99  itkNewMacro( Self );
100 
102  itkStaticConstMacro( ImageDimension, unsigned int, TFixedImage::ImageDimension );
103 
106 
108  typedef TFixedImage FixedImageType;
109  typedef typename FixedImageType::Pointer FixedImagePointer;
110  typedef TMovingImage MovingImageType;
111  typedef typename MovingImageType::Pointer MovingImagePointer;
112 
113  typedef typename MovingImageType::RegionType RegionType;
114 
116  typedef typename Superclass::ImageMetricType ImageMetricType;
120  typedef typename Superclass::MultiMetricType MultiMetricType;
121 
122  typedef TOutputTransform OutputTransformType;
123  typedef typename OutputTransformType::Pointer OutputTransformPointer;
124  typedef typename OutputTransformType::ScalarType RealType;
125  typedef typename OutputTransformType::DerivativeType DerivativeType;
126  typedef typename DerivativeType::ValueType DerivativeValueType;
127  typedef typename OutputTransformType::TimeVaryingVelocityFieldType TimeVaryingVelocityFieldType;
128  typedef typename TimeVaryingVelocityFieldType::Pointer TimeVaryingVelocityFieldPointer;
129  typedef typename OutputTransformType::DisplacementFieldType DisplacementFieldType;
130  typedef typename DisplacementFieldType::Pointer DisplacementFieldPointer;
131  typedef typename TimeVaryingVelocityFieldType::PixelType DisplacementVectorType;
132 
133  typedef typename Superclass::CompositeTransformType CompositeTransformType;
134 
135  typedef typename Superclass::DecoratedOutputTransformType DecoratedOutputTransformType;
137 
139 
141  itkSetMacro( LearningRate, RealType );
142  itkGetConstMacro( LearningRate, RealType );
144 
146  itkSetMacro( NumberOfIterationsPerLevel, NumberOfIterationsArrayType );
147  itkGetConstMacro( NumberOfIterationsPerLevel, NumberOfIterationsArrayType );
149 
151  itkSetMacro( ConvergenceThreshold, RealType );
152  itkGetConstMacro( ConvergenceThreshold, RealType );
154 
156  itkSetMacro( ConvergenceWindowSize, unsigned int );
157  itkGetConstMacro( ConvergenceWindowSize, unsigned int );
159 
160 protected:
163  virtual void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE;
164 
166  virtual void GenerateData() ITK_OVERRIDE;
167 
169  void ThreadedGenerateData( const RegionType &, ThreadIdType );
170 
172  virtual void StartOptimization();
173 
174 private:
176 
177  RealType m_LearningRate;
178 
179  RealType m_ConvergenceThreshold;
180  unsigned int m_ConvergenceWindowSize;
181 
182  NumberOfIterationsArrayType m_NumberOfIterationsPerLevel;
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.
Superclass::MeasureType MeasureType
ImageRegistrationMethodv4< TFixedImage, TMovingImage, TOutputTransform, TVirtualImage, TPointSet > Superclass
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Interface method for the current registration framework.
OutputTransformType::ScalarType RealType
Superclass::VirtualImageType VirtualImageType
Interface method for the current registration framework using the time varying velocity field transfo...