ITK  4.2.0
Insight Segmentation and Registration Toolkit
itkFixedCenterOfRotationAffineTransform.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 __itkFixedCenterOfRotationAffineTransform_h
19 #define __itkFixedCenterOfRotationAffineTransform_h
20 
22 
23 namespace itk
24 {
33 template<
34  class TScalarType = double, // Data type for scalars (e.g. float or double)
35  unsigned int NDimensions = 3 >
36 // Number of dimensions in the input space
38  public ScalableAffineTransform< TScalarType, NDimensions >
39 {
40 public:
46 
49 
51  itkNewMacro(Self);
52 
54  itkStaticConstMacro(InputSpaceDimension, unsigned int, NDimensions);
55  itkStaticConstMacro(OutputSpaceDimension, unsigned int, NDimensions);
56  itkStaticConstMacro(SpaceDimension, unsigned int, NDimensions);
57  itkStaticConstMacro( ParametersDimension, unsigned int,
58  NDimensions * ( NDimensions + 2 ) );
60 
62  typedef typename Superclass::ParametersType ParametersType;
63  typedef typename Superclass::JacobianType JacobianType;
64  typedef typename Superclass::ScalarType ScalarType;
65  typedef typename Superclass::InputVectorType InputVectorType;
66  typedef typename Superclass::OutputVectorType OutputVectorType;
67  typedef typename Superclass::InputCovariantVectorType InputCovariantVectorType;
68  typedef typename Superclass::OutputCovariantVectorType OutputCovariantVectorType;
69  typedef typename Superclass::InputVnlVectorType InputVnlVectorType;
70  typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType;
71  typedef typename Superclass::InputPointType InputPointType;
72  typedef typename Superclass::OutputPointType OutputPointType;
73  typedef typename Superclass::MatrixType MatrixType;
74  typedef typename Superclass::InverseMatrixType InverseMatrixType;
75  typedef typename Superclass::CenterType CenterType;
76  typedef typename Superclass::TranslationType TranslationType;
77  typedef typename Superclass::OffsetType OffsetType;
78 
80  void SetCenterOfRotationComponent(const InputPointType & cor)
81  { this->SetCenter(cor); }
82  InputPointType GetCenterOfRotationComponent(void) const
83  { return this->GetCenter(); }
85 
88  void SetMatrixComponent(const MatrixType & matrix)
89  { this->SetMatrix(matrix); }
90 
92  const MatrixType & GetMatrixComponent() const
93  { return this->GetMatrix(); }
94 
96  void SetOffsetComponent(const OffsetType & offset)
97  { this->SetTranslation(offset); }
98 
100  const OffsetType & GetOffsetComponent(void) const
101  { return this->GetTranslation(); }
102 protected:
103 
105  FixedCenterOfRotationAffineTransform(const MatrixType & matrix,
106  const OutputVectorType & offset);
107  FixedCenterOfRotationAffineTransform(unsigned int outputSpaceDimension,
108  unsigned int parametersDimension);
111 
114 private:
115  FixedCenterOfRotationAffineTransform(const Self & other);
116  const Self & operator=(const Self &);
117 }; //class FixedCenterOfRotationAffineTransform
118 } // namespace itk
120 
121 // Define instantiation macro for this template.
122 #define ITK_TEMPLATE_FixedCenterOfRotationAffineTransform(_, EXPORT, TypeX, TypeY) \
123  namespace itk \
124  { \
125  _( 2 ( class EXPORT FixedCenterOfRotationAffineTransform< ITK_TEMPLATE_2 TypeX > ) ) \
126  namespace Templates \
127  { \
128  typedef FixedCenterOfRotationAffineTransform< ITK_TEMPLATE_2 TypeX > \
129  FixedCenterOfRotationAffineTransform##TypeY; \
130  } \
131  }
132 
133 #if ITK_TEMPLATE_EXPLICIT
134 #include "Templates/itkFixedCenterOfRotationAffineTransform+-.h"
135 #endif
136 
137 #if ITK_TEMPLATE_TXX
138 #include "itkFixedCenterOfRotationAffineTransform.hxx"
139 #endif
140 
141 #endif /* __itkFixedCenterOfRotationAffineTransform_h */
142