go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkAdvancedVersorTransform.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkAdvancedVersorTransform.h,v $
5  Language: C++
6  Date: $Date: 2006-08-09 04:35:32 $
7  Version: $Revision: 1.17 $
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 __itkAdvancedVersorTransform_h
19 #define __itkAdvancedVersorTransform_h
20 
21 #include <iostream>
23 #include "vnl/vnl_quaternion.h"
24 #include "itkVersor.h"
25 
26 namespace itk
27 {
28 
50 template < class TScalarType=double >//Data type for scalars (float or double)
51 class ITK_EXPORT AdvancedVersorTransform : public AdvancedRigid3DTransform< TScalarType >
52 {
53 public:
54 
58  typedef SmartPointer<Self> Pointer;
59  typedef SmartPointer<const Self> ConstPointer;
60 
63 
65  itkNewMacro( Self );
66 
68  itkStaticConstMacro(SpaceDimension, unsigned int, 3);
69  itkStaticConstMacro(InputSpaceDimension, unsigned int, 3);
70  itkStaticConstMacro(OutputSpaceDimension, unsigned int, 3);
71  itkStaticConstMacro(ParametersDimension, unsigned int, 3);
72 
91 
92  typedef typename Superclass
95  typedef typename Superclass
98  typedef typename Superclass
101 
103  typedef vnl_quaternion<TScalarType> VnlQuaternionType;
104 
106  typedef Versor<TScalarType> VersorType;
107  typedef typename VersorType::VectorType AxisType;
108  typedef typename VersorType::ValueType AngleType;
109 
118  void SetParameters( const ParametersType & parameters );
119 
121  const ParametersType& GetParameters(void) const;
122 
124  void SetRotation( const VersorType & versor );
125  void SetRotation( const AxisType & axis, AngleType angle );
126  itkGetConstReferenceMacro(Versor, VersorType);
127 
129  virtual void SetIdentity(void);
130 
132  virtual void GetJacobian(
133  const InputPointType &,
134  JacobianType &,
135  NonZeroJacobianIndicesType & ) const;
136 
137 protected:
138 
140  AdvancedVersorTransform(const MatrixType &matrix,
141  const OutputVectorType &offset);
142  AdvancedVersorTransform(unsigned int outputDims,
143  unsigned int paramDims);
145 
148 
151  virtual void SetRotationMatrix(const MatrixType & matrix)
152  { this->Superclass::SetRotationMatrix( matrix ); }
153 
154  void SetVarVersor(const VersorType & newVersor)
155  { m_Versor = newVersor; }
156 
158  void PrintSelf(std::ostream &os, Indent indent) const;
159 
162  void ComputeMatrix(void);
163  void ComputeMatrixParameters(void);
164 
165 private:
167  AdvancedVersorTransform(const Self & other); // Not implemented
168 
170  const Self & operator=( const Self & ); // Not implemented
171 
174 
175 }; //class AdvancedVersorTransform
176 
177 
178 } // namespace itk
179 
180 // Define instantiation macro for this template.
181 #define ITK_TEMPLATE_AdvancedVersorTransform(_, EXPORT, x, y) namespace itk { \
182  _(1(class EXPORT AdvancedVersorTransform< ITK_TEMPLATE_1 x >)) \
183  namespace Templates { typedef AdvancedVersorTransform< ITK_TEMPLATE_1 x > AdvancedVersorTransform##y; } \
184  }
185 
186 #if ITK_TEMPLATE_EXPLICIT
187 # include "Templates/itkAdvancedVersorTransform+-.h"
188 #endif
189 
190 #if ITK_TEMPLATE_TXX
191 # include "itkAdvancedVersorTransform.txx"
192 #endif
193 
194 #endif /* __itkAdvancedVersorTransform_h */


Generated on 27-06-2013 for elastix by doxygen 1.8.3.1 elastix logo