ITK  4.6.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 
26 
27 namespace itk
28 {
29 
86 template<typename TFixedImage, typename TMovingImage, typename TOutputTransform =
87  TimeVaryingBSplineVelocityFieldTransform<double, TFixedImage::ImageDimension> >
89 : public ImageRegistrationMethodv4<TFixedImage, TMovingImage, TOutputTransform>
90 {
91 public:
97 
99  itkNewMacro( Self );
100 
102  itkStaticConstMacro( ImageDimension, unsigned int, TFixedImage::ImageDimension );
103 
105  itkTypeMacro( TimeVaryingBSplineVelocityFieldImageRegistrationMethod, SimpleImageRegistrationMethod );
106 
108  typedef TFixedImage FixedImageType;
109  typedef typename FixedImageType::Pointer FixedImagePointer;
110  typedef TMovingImage MovingImageType;
111  typedef typename MovingImageType::Pointer MovingImagePointer;
112 
115  typedef typename ImageMetricType::Pointer ImageMetricPointer;
116  typedef typename ImageMetricType::VirtualImageType VirtualImageType;
117  typedef typename ImageMetricType::MeasureType MeasureType;
119  typedef typename ImageMetricType::FixedImageMaskType FixedImageMaskType;
120  typedef typename ImageMetricType::MovingImageMaskType MovingImageMaskType;
123 
124  typedef TOutputTransform OutputTransformType;
125  typedef typename OutputTransformType::Pointer OutputTransformPointer;
126  typedef typename OutputTransformType::ScalarType RealType;
127  typedef typename OutputTransformType::DerivativeType DerivativeType;
128  typedef typename DerivativeType::ValueType DerivativeValueType;
129  typedef typename OutputTransformType::DisplacementFieldType DisplacementFieldType;
130  typedef typename OutputTransformType::TimeVaryingVelocityFieldControlPointLatticeType TimeVaryingVelocityFieldControlPointLatticeType;
131  typedef typename OutputTransformType::TimeVaryingVelocityFieldControlPointLatticePointer TimeVaryingVelocityFieldControlPointLatticePointer;
132  typedef typename OutputTransformType::TimeVaryingVelocityFieldControlPointLatticeType TimeVaryingVelocityFieldType;
133  typedef typename OutputTransformType::TimeVaryingVelocityFieldControlPointLatticePointer TimeVaryingVelocityFieldPointer;
134  typedef typename TimeVaryingVelocityFieldControlPointLatticeType::PixelType DisplacementVectorType;
135 
137 
139  typedef typename DecoratedOutputTransformType::Pointer DecoratedOutputTransformPointer;
140 
142 
149 
151  itkSetMacro( LearningRate, RealType );
152  itkGetConstMacro( LearningRate, RealType );
154 
156  itkSetMacro( NumberOfIterationsPerLevel, NumberOfIterationsArrayType );
157  itkGetConstMacro( NumberOfIterationsPerLevel, NumberOfIterationsArrayType );
159 
161  itkSetMacro( ConvergenceThreshold, RealType );
162  itkGetConstMacro( ConvergenceThreshold, RealType );
164 
166  itkSetMacro( ConvergenceWindowSize, unsigned int );
167  itkGetConstMacro( ConvergenceWindowSize, unsigned int );
169 
171  itkSetMacro( NumberOfTimePointSamples, SizeValueType );
172  itkGetConstMacro( NumberOfTimePointSamples, SizeValueType );
174 
175 protected:
178  virtual void PrintSelf( std::ostream & os, Indent indent ) const;
179 
181  virtual void GenerateData();
182 
184  virtual void StartOptimization();
185 
186 private:
188  // implemented
189  void operator=( const Self & ); //purposely not
190 
192 
195 
197 
199 };
200 } // end namespace itk
201 
202 #ifndef ITK_MANUAL_INSTANTIATION
203 #include "itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.hxx"
204 #endif
205 
206 #endif
Implementation of an image mask as spatial object.
Light weight base class for most itk classes.
OutputTransformType::TimeVaryingVelocityFieldControlPointLatticeType TimeVaryingVelocityFieldControlPointLatticeType
OutputTransformType::TimeVaryingVelocityFieldControlPointLatticePointer TimeVaryingVelocityFieldControlPointLatticePointer
unsigned long SizeValueType
Definition: itkIntTypes.h:143
ImageToImageMetricv4< FixedImageType, MovingImageType, VirtualImageType, RealType > ImageMetricType
Interface method for the current registration framework using the time varying velocity field transfo...
OutputTransformType::TimeVaryingVelocityFieldControlPointLatticePointer TimeVaryingVelocityFieldPointer
A superclass of the N-dimensional mesh structure; supports point (geometric coordinate and attribute)...
Definition: itkPointSet.h:84
BSplineScatteredDataPointSetToImageFilter< PointSetType, TimeVaryingVelocityFieldType > BSplineFilterType
Image filter which provides a B-spline output approximation.
ObjectToObjectMultiMetricv4< ImageDimension, ImageDimension, VirtualImageType, RealType > MultiMetricType
Define a front-end to the STL &quot;vector&quot; container that conforms to the IndexedContainerInterface.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
virtual void PrintSelf(std::ostream &os, Indent indent) const
OutputTransformType::TimeVaryingVelocityFieldControlPointLatticeType TimeVaryingVelocityFieldType
Interface method for the current registration framework.
ImageRegistrationMethodv4< TFixedImage, TMovingImage, TOutputTransform > Superclass
Templated n-dimensional image class.
Definition: itkImage.h:75