Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
itkAnisotropicSimilarityLandmarkBasedTransformInitializer.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkAnisotropicSimilarityLandmarkBasedTransformInitializer.h,v $
5  Language: C++
6  Date: $Date: 2008-06-26 13:50:49 $
7  Version: $Revision: 1.7 $
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 itkAnisotropicSimilarityLandmarkBasedTransformInitializer_h
19 #define itkAnisotropicSimilarityLandmarkBasedTransformInitializer_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 
57 template <class TTransform,
58  class TFixedImage,
59  class TMovingImage>
61  public Object
62 {
63 public:
66  typedef Object Superclass;
67  typedef SmartPointer<Self> Pointer;
68  typedef SmartPointer<const Self> ConstPointer;
69 
71  itkNewMacro( Self );
72 
75 
77  typedef TTransform TransformType;
78  typedef typename TransformType::Pointer TransformPointer;
79 
81  itkStaticConstMacro(InputSpaceDimension, unsigned int, TransformType::InputSpaceDimension);
82  itkStaticConstMacro(OutputSpaceDimension, unsigned int, TransformType::OutputSpaceDimension);
83 
85  itkSetObjectMacro( Transform, TransformType );
86 
88  typedef TFixedImage FixedImageType;
89  typedef TMovingImage MovingImageType;
90 
91  typedef typename FixedImageType::ConstPointer FixedImagePointer;
92  typedef typename MovingImageType::ConstPointer MovingImagePointer;
93 
100  void SetFixedImage( const FixedImageType * image )
101  {
102  this->m_FixedImage = image;
103  itkLegacyBodyMacro( SetFixedImage, 2.2 );
104  }
105 
112  void SetMovingImage( const MovingImageType * image )
113  {
114  this->m_MovingImage = image;
115  itkLegacyBodyMacro( SetMovingImage, 2.2 );
116  }
117 
119  itkStaticConstMacro(ImageDimension, unsigned int, FixedImageType::ImageDimension );
120 
122  typedef typename TransformType::InputPointType InputPointType;
123  typedef typename TransformType::OutputVectorType OutputVectorType;
124  typedef Point<double, itkGetStaticConstMacro(ImageDimension)> LandmarkPointType;
125  typedef std::vector<LandmarkPointType> LandmarkPointContainer;
126  typedef typename
127  LandmarkPointContainer::const_iterator PointsContainerConstIterator;
128  typedef typename TransformType::ParametersType ParametersType;
129  typedef typename ParametersType::ValueType ParameterValueType;
130 
132  void SetFixedLandmarks(const LandmarkPointContainer & fixedLandmarks)
133  {
134  this->m_FixedLandmarks = fixedLandmarks;
135  }
136 
138  void SetMovingLandmarks(const LandmarkPointContainer & movingLandmarks)
139  {
140  this->m_MovingLandmarks = movingLandmarks;
141  }
142 
146  typedef Rigid2DTransform<ParameterValueType> Rigid2DTransformType;
147 
149  virtual void InitializeTransform();
150 
151 protected:
154  {
155  }
156 
157  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
158 
159  // Supported Transform types
160  typedef enum
161  {
166 private:
167  AnisotropicSimilarityLandmarkBasedTransformInitializer(const Self &); // purposely not implemented
168  void operator=(const Self &); // purposely not implemented
169 
170  FixedImagePointer m_FixedImage;
171  MovingImagePointer m_MovingImage;
172 
173  LandmarkPointContainer m_FixedLandmarks;
174  LandmarkPointContainer m_MovingLandmarks;
175 
176  TransformPointer m_Transform;
177 
178 }; // class LandmarkBasedTransformInitializer
179 
180 } // namespace itk
181 
182 #ifndef ITK_MANUAL_INSTANTIATION
183 #include "itkAnisotropicSimilarityLandmarkBasedTransformInitializer.txx"
184 #endif
185 
186 #endif /* itkAnisotropicSimilarityLandmarkBasedTransformInitializer_h */
itkStaticConstMacro(InputSpaceDimension, unsigned int, TransformType::InputSpaceDimension)
void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
Simplified inverse ITK transforms.
AnisotropicSimilarity3DTransform of a vector space (e.g. space coordinates)
AnisotropicSimilarityLandmarkBasedTransformInitializer is a helper class intended to The class comput...
itkTypeMacro(AnisotropicSimilarityLandmarkBasedTransformInitializer, Object)