ITK  4.3.0
Insight Segmentation and Registration Toolkit
itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.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 __itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod_h
19 #define __itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod_h
20 
22 
25 
26 namespace itk
27 {
28 //Forward-declare these because of module dependency conflict.
29 //They will soon be moved to a different module, at which
30 // time this can be removed.
31 template <unsigned int VDimension, class TDataHolder>
33 template <class TDataHolder>
35 
91 template<typename TFixedImage, typename TMovingImage, typename TOutputTransform =
92  TimeVaryingBSplineVelocityFieldTransform<double, TFixedImage::ImageDimension> >
94 : public ImageRegistrationMethodv4<TFixedImage, TMovingImage, TOutputTransform>
95 {
96 public:
102 
104  itkNewMacro( Self );
105 
107  itkStaticConstMacro( ImageDimension, unsigned int, TFixedImage::ImageDimension );
108 
110  itkTypeMacro( TimeVaryingBSplineVelocityFieldImageRegistrationMethod, SimpleImageRegistrationMethod );
111 
113  typedef TFixedImage FixedImageType;
114  typedef typename FixedImageType::Pointer FixedImagePointer;
115  typedef TMovingImage MovingImageType;
116  typedef typename MovingImageType::Pointer MovingImagePointer;
117 
119  typedef typename Superclass::ImageMetricType ImageMetricType;
123  typedef typename Superclass::MultiMetricType MultiMetricType;
124 
125  typedef TOutputTransform OutputTransformType;
126  typedef typename OutputTransformType::Pointer OutputTransformPointer;
127  typedef typename OutputTransformType::ScalarType RealType;
128  typedef typename OutputTransformType::DerivativeType DerivativeType;
129  typedef typename DerivativeType::ValueType DerivativeValueType;
130  typedef typename OutputTransformType::DisplacementFieldType DisplacementFieldType;
131  typedef typename OutputTransformType::TimeVaryingVelocityFieldControlPointLatticeType TimeVaryingVelocityFieldControlPointLatticeType;
132  typedef typename OutputTransformType::TimeVaryingVelocityFieldControlPointLatticePointer TimeVaryingVelocityFieldControlPointLatticePointer;
133  typedef typename OutputTransformType::TimeVaryingVelocityFieldControlPointLatticeType TimeVaryingVelocityFieldType;
134  typedef typename OutputTransformType::TimeVaryingVelocityFieldControlPointLatticePointer TimeVaryingVelocityFieldPointer;
135  typedef typename TimeVaryingVelocityFieldControlPointLatticeType::PixelType DisplacementVectorType;
136 
137  typedef typename Superclass::CompositeTransformType CompositeTransformType;
138 
139  typedef typename Superclass::DecoratedOutputTransformType DecoratedOutputTransformType;
141 
143 
145  itkSetMacro( LearningRate, RealType );
146  itkGetConstMacro( LearningRate, RealType );
148 
150  itkSetMacro( NumberOfIterationsPerLevel, NumberOfIterationsArrayType );
151  itkGetConstMacro( NumberOfIterationsPerLevel, NumberOfIterationsArrayType );
153 
155  itkSetMacro( ConvergenceThreshold, RealType );
156  itkGetConstMacro( ConvergenceThreshold, RealType );
158 
160  itkSetMacro( ConvergenceWindowSize, unsigned int );
161  itkGetConstMacro( ConvergenceWindowSize, unsigned int );
163 
165  itkSetMacro( NumberOfTimePointSamples, SizeValueType );
166  itkGetConstMacro( NumberOfTimePointSamples, SizeValueType );
168 
169 protected:
172  virtual void PrintSelf( std::ostream & os, Indent indent ) const;
173 
175  virtual void GenerateData();
176 
178  virtual void StartOptimization();
179 
180 private:
182  // implemented
183  void operator=( const Self & ); //purposely not
184 
186 
189 
191 
193 };
194 } // end namespace itk
195 
196 #ifndef ITK_MANUAL_INSTANTIATION
197 #include "itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.hxx"
198 #endif
199 
200 #endif
201