ITK  4.4.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 
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 
53 template<typename TFixedImage, typename TMovingImage, typename TOutputTransform =
56 : public SyNImageRegistrationMethod<TFixedImage, TMovingImage, TOutputTransform>
57 {
58 public:
64 
66  itkNewMacro( Self );
67 
69  itkStaticConstMacro( ImageDimension, unsigned int, TFixedImage::ImageDimension );
70 
73 
75  typedef TFixedImage FixedImageType;
76  typedef typename FixedImageType::Pointer FixedImagePointer;
77  typedef typename Superclass::FixedImagesContainerType FixedImagesContainerType;
78  typedef TMovingImage MovingImageType;
79  typedef typename MovingImageType::Pointer MovingImagePointer;
80  typedef typename Superclass::MovingImagesContainerType MovingImagesContainerType;
81 
83  typedef typename Superclass::ImageMetricType ImageMetricType;
84  typedef typename ImageMetricType::Pointer ImageMetricPointer;
85  typedef typename ImageMetricType::VirtualImageType VirtualImageType;
86  typedef typename ImageMetricType::MeasureType MeasureType;
87  typedef typename Superclass::MultiMetricType MultiMetricType;
88  typedef typename ImageMetricType::FixedImageMaskType FixedImageMaskType;
89  typedef typename ImageMetricType::MovingImageMaskType MovingImageMaskType;
90 
91  typedef typename Superclass::NumberOfIterationsArrayType NumberOfIterationsArrayType;
92 
93  typedef TOutputTransform OutputTransformType;
94  typedef typename OutputTransformType::Pointer OutputTransformPointer;
95  typedef typename OutputTransformType::ScalarType RealType;
96  typedef typename OutputTransformType::DerivativeType DerivativeType;
97  typedef typename DerivativeType::ValueType DerivativeValueType;
98  typedef typename OutputTransformType::DisplacementFieldType DisplacementFieldType;
99  typedef typename DisplacementFieldType::Pointer DisplacementFieldPointer;
100  typedef typename DisplacementFieldType::PixelType DisplacementVectorType;
101 
106 
109 
110  typedef typename Superclass::CompositeTransformType CompositeTransformType;
111  typedef typename CompositeTransformType::TransformType TransformBaseType;
112 
113  typedef typename Superclass::DecoratedOutputTransformType DecoratedOutputTransformType;
114  typedef typename DecoratedOutputTransformType::Pointer DecoratedOutputTransformPointer;
115 
116 protected:
119 
121  virtual void StartOptimization();
122 
123  virtual void InitializeRegistrationAtEachLevel( const SizeValueType );
124 
125  virtual DisplacementFieldPointer ComputeUpdateField( const FixedImagesContainerType, const TransformBaseType *,
127  virtual DisplacementFieldPointer BSplineSmoothDisplacementField( const DisplacementFieldType *, const ArrayType &, const WeightedMaskImageType * );
128 
129 private:
130  BSplineSyNImageRegistrationMethod( const Self & ); //purposely not implemented
131  void operator=( const Self & ); //purposely not implemented
132 };
133 } // end namespace itk
134 
135 #ifndef ITK_MANUAL_INSTANTIATION
136 #include "itkBSplineSyNImageRegistrationMethod.hxx"
137 #endif
138 
139 #endif
140