Orfeo Toolbox  3.16
itkLandmarkBasedTransformInitializer.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkLandmarkBasedTransformInitializer.h,v $
5  Language: C++
6  Date: $Date: 2009-02-05 19:05:00 $
7  Version: $Revision: 1.8 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
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 <vector>
26 #include <iostream>
27 
28 namespace itk
29 {
30 
58 template < class TTransform,
59  class TFixedImage,
60  class TMovingImage >
62  public Object
63 {
64 public:
67  typedef Object Superclass;
70 
72  itkNewMacro( Self );
73 
76 
78  typedef TTransform TransformType;
79  typedef typename TransformType::Pointer TransformPointer;
80 
82  itkStaticConstMacro(InputSpaceDimension, unsigned int, TransformType::InputSpaceDimension);
83  itkStaticConstMacro(OutputSpaceDimension, unsigned int, TransformType::OutputSpaceDimension);
84 
86  itkSetObjectMacro( Transform, TransformType );
87 
89  typedef TFixedImage FixedImageType;
90  typedef TMovingImage MovingImageType;
91 
92  typedef typename FixedImageType::ConstPointer FixedImagePointer;
93  typedef typename MovingImageType::ConstPointer MovingImagePointer;
94 
95 
102  void SetFixedImage( const FixedImageType * image )
103  {
104  this->m_FixedImage = image;
105  itkLegacyBodyMacro( SetFixedImage, 2.2 );
106  }
107 
108 
115  void SetMovingImage( const MovingImageType * image )
116  {
117  this->m_MovingImage = image;
118  itkLegacyBodyMacro( SetMovingImage, 2.2 );
119  }
120 
121 
123  itkStaticConstMacro(ImageDimension, unsigned int, FixedImageType::ImageDimension );
124 
126  typedef typename TransformType::InputPointType InputPointType;
127  typedef typename TransformType::OutputVectorType OutputVectorType;
129  typedef std::vector< LandmarkPointType > LandmarkPointContainer;
130  typedef typename
131  LandmarkPointContainer::const_iterator PointsContainerConstIterator;
132  typedef typename TransformType::ParametersType ParametersType;
133  typedef typename ParametersType::ValueType ParameterValueType;
134 
135 
136 
138  void SetFixedLandmarks(const LandmarkPointContainer & fixedLandmarks)
139  {
140  this->m_FixedLandmarks = fixedLandmarks;
141  }
142 
144  void SetMovingLandmarks(const LandmarkPointContainer & movingLandmarks)
145  {
146  this->m_MovingLandmarks = movingLandmarks;
147  }
148 
149 
154 
156  virtual void InitializeTransform();
157 
158 
159 protected:
162 
163  void PrintSelf(std::ostream &os, Indent indent) const;
164 
165  // Supported Transform types
166  typedef enum{
167  VersorRigid3Dtransform=1,
169  Else
170  }InputTransformType;
171 
172 private:
173  LandmarkBasedTransformInitializer(const Self&); //purposely not implemented
174  void operator=(const Self&); //purposely not implemented
175 
178 
181 
183 
184 }; //class LandmarkBasedTransformInitializer
185 
186 
187 } // namespace itk
188 
189 
190 #ifndef ITK_MANUAL_INSTANTIATION
192 #endif
193 
194 #endif /* __itkLandmarkBasedTransformInitializer_h */

Generated at Sat Feb 2 2013 23:50:40 for Orfeo Toolbox with doxygen 1.8.1.1