Orfeo Toolbox  4.0
itkLandmarkBasedTransformInitializer.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 __itkLandmarkBasedTransformInitializer_h
19 #define __itkLandmarkBasedTransformInitializer_h
20 
21 #include "itkObject.h"
22 #include "itkObjectFactory.h"
24 #include "itkRigid2DTransform.h"
25 #include "itkAffineTransform.h"
26 #include <vector>
27 #include <iostream>
28 
29 namespace itk
30 {
67 template< typename TTransform,
68  typename TFixedImage,
69  typename TMovingImage >
71  public Object
72 {
73 public:
76  typedef Object Superclass;
79 
81  itkNewMacro(Self);
82 
85 
87  typedef TTransform TransformType;
88  typedef typename TransformType::Pointer TransformPointer;
89 
91  itkStaticConstMacro(InputSpaceDimension, unsigned int, TransformType::InputSpaceDimension);
92  itkStaticConstMacro(OutputSpaceDimension, unsigned int, TransformType::OutputSpaceDimension);
93 
95  itkSetObjectMacro(Transform, TransformType);
96 
98  typedef TFixedImage FixedImageType;
99  typedef TMovingImage MovingImageType;
100 
101 
102  typedef typename FixedImageType::ConstPointer FixedImagePointer;
103  typedef typename MovingImageType::ConstPointer MovingImagePointer;
104 
106  itkStaticConstMacro(ImageDimension, unsigned int, FixedImageType::ImageDimension);
107 
109  typedef typename TransformType::InputPointType InputPointType;
110  typedef typename TransformType::OutputVectorType OutputVectorType;
112  typedef std::vector< LandmarkPointType > LandmarkPointContainer;
113  typedef typename LandmarkPointContainer::const_iterator PointsContainerConstIterator;
114  typedef typename TransformType::ParametersType ParametersType;
115  typedef typename ParametersType::ValueType ParameterValueType;
116  typedef std::vector< double > LandmarkWeightType;
117  typedef LandmarkWeightType::const_iterator LandmarkWeightConstIterator;
118 
120  void SetFixedLandmarks(const LandmarkPointContainer & fixedLandmarks)
121  {
122  this->m_FixedLandmarks = fixedLandmarks;
123  }
124 
126  void SetMovingLandmarks(const LandmarkPointContainer & movingLandmarks)
127  {
128  this->m_MovingLandmarks = movingLandmarks;
129  }
130 
134  void SetLandmarkWeight(LandmarkWeightType & landmarkWeight)
135  {
136  this->m_LandmarkWeight= landmarkWeight;
137  }
138 
144  virtual void InitializeTransform();
145 
146 protected:
149 
150  void PrintSelf(std::ostream & os, Indent indent) const;
151 
152  // Supported Transform types
153  typedef enum {
158 
159 private:
160  LandmarkBasedTransformInitializer(const Self &); //purposely not implemented
161  void operator=(const Self &); //purposely not implemented
162 
163 
165  template <typename TTransform2>
166  void InternalInitializeTransform(TTransform *);
173 
176 
179 
183 
184 }; //class LandmarkBasedTransformInitializer
185 } // namespace itk
186 
187 #ifndef ITK_MANUAL_INSTANTIATION
189 #endif
190 
191 #endif /* __itkLandmarkBasedTransformInitializer_h */

Generated at Sat Mar 8 2014 15:06:21 for Orfeo Toolbox with doxygen 1.8.3.1