ITK  4.3.0
Insight Segmentation and Registration Toolkit
itkBSplineSyNImageRegistrationMethod.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 __itkBSplineSyNImageRegistrationMethod_h
19 #define __itkBSplineSyNImageRegistrationMethod_h
20 
22 
24 
25 namespace itk
26 {
27 //Forward-declare these because of module dependency conflict.
28 //They will soon be moved to a different module, at which
29 // time this can be removed.
30 template <unsigned int VDimension, class TDataHolder>
32 template <class TDataHolder>
34 
52 template<typename TFixedImage, typename TMovingImage, typename TOutputTransform =
53  BSplineSmoothingOnUpdateDisplacementFieldTransform<double, TFixedImage::ImageDimension> >
55 : public SyNImageRegistrationMethod<TFixedImage, TMovingImage, TOutputTransform>
56 {
57 public:
63 
65  itkNewMacro( Self );
66 
68  itkStaticConstMacro( ImageDimension, unsigned int, TFixedImage::ImageDimension );
69 
72 
74  typedef TFixedImage FixedImageType;
75  typedef typename FixedImageType::Pointer FixedImagePointer;
76  typedef typename Superclass::FixedImagesContainerType FixedImagesContainerType;
77  typedef TMovingImage MovingImageType;
78  typedef typename MovingImageType::Pointer MovingImagePointer;
79  typedef typename Superclass::MovingImagesContainerType MovingImagesContainerType;
80 
82  typedef typename Superclass::ImageMetricType ImageMetricType;
83  typedef typename ImageMetricType::Pointer ImageMetricPointer;
84  typedef typename ImageMetricType::VirtualImageType VirtualImageType;
85  typedef typename ImageMetricType::MeasureType MeasureType;
86  typedef typename Superclass::MultiMetricType MultiMetricType;
87 
88  typedef typename Superclass::NumberOfIterationsArrayType NumberOfIterationsArrayType;
89 
90  typedef TOutputTransform OutputTransformType;
91  typedef typename OutputTransformType::Pointer OutputTransformPointer;
92  typedef typename OutputTransformType::ScalarType RealType;
93  typedef typename OutputTransformType::DerivativeType DerivativeType;
94  typedef typename DerivativeType::ValueType DerivativeValueType;
95  typedef typename OutputTransformType::DisplacementFieldType DisplacementFieldType;
96  typedef typename DisplacementFieldType::Pointer DisplacementFieldPointer;
97  typedef typename DisplacementFieldType::PixelType DisplacementVectorType;
98 
102 
103  typedef typename Superclass::CompositeTransformType CompositeTransformType;
104  typedef typename CompositeTransformType::TransformType TransformBaseType;
105 
106  typedef typename Superclass::DecoratedOutputTransformType DecoratedOutputTransformType;
107  typedef typename DecoratedOutputTransformType::Pointer DecoratedOutputTransformPointer;
108 
109 protected:
112 
114  virtual void StartOptimization();
115 
116  virtual void InitializeRegistrationAtEachLevel( const SizeValueType );
117 
119  virtual DisplacementFieldPointer BSplineSmoothDisplacementField( const DisplacementFieldType *, const ArrayType & );
120 
121 private:
122  BSplineSyNImageRegistrationMethod( const Self & ); //purposely not implemented
123  void operator=( const Self & ); //purposely not implemented
124 };
125 } // end namespace itk
126 
127 #ifndef ITK_MANUAL_INSTANTIATION
128 #include "itkBSplineSyNImageRegistrationMethod.hxx"
129 #endif
130 
131 #endif
132