ITK  4.2.0
Insight Segmentation and Registration Toolkit
itkScaleVersor3DTransform.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 __itkScaleVersor3DTransform_h
19 #define __itkScaleVersor3DTransform_h
20 
22 
23 namespace itk
24 {
44 template <class TScalarType = double>
45 // Data type for scalars:float or double
46 class ITK_EXPORT ScaleVersor3DTransform : public VersorRigid3DTransform<TScalarType>
47 {
48 public:
54 
56  itkNewMacro(Self);
57 
60 
62  itkStaticConstMacro(InputSpaceDimension, unsigned int, 3);
63  itkStaticConstMacro(OutputSpaceDimension, unsigned int, 3);
64  itkStaticConstMacro(ParametersDimension, unsigned int, 9);
66 
68  typedef typename Superclass::ParametersType ParametersType;
69  typedef typename Superclass::JacobianType JacobianType;
70  typedef typename Superclass::ScalarType ScalarType;
71  typedef typename Superclass::InputPointType InputPointType;
72  typedef typename Superclass::OutputPointType OutputPointType;
73  typedef typename Superclass::InputVectorType InputVectorType;
74  typedef typename Superclass::OutputVectorType OutputVectorType;
75  typedef typename Superclass::InputVnlVectorType InputVnlVectorType;
76  typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType;
77  typedef typename Superclass::InputCovariantVectorType InputCovariantVectorType;
78  typedef typename Superclass::OutputCovariantVectorType OutputCovariantVectorType;
79  typedef typename Superclass::MatrixType MatrixType;
80  typedef typename Superclass::InverseMatrixType InverseMatrixType;
81  typedef typename Superclass::CenterType CenterType;
82  typedef typename Superclass::OffsetType OffsetType;
83  typedef typename Superclass::TranslationType TranslationType;
84 
85  typedef typename Superclass::VersorType VersorType;
86  typedef typename Superclass::AxisType AxisType;
87  typedef typename Superclass::AngleType AngleType;
88 
91 
95  virtual void SetMatrix(const MatrixType & matrix);
96 
104  virtual void SetParameters(const ParametersType & parameters);
105 
106  virtual const ParametersType & GetParameters(void) const;
107 
110  void SetScale(const ScaleVectorType & scale);
111 
112  itkGetConstReferenceMacro(Scale, ScaleVectorType);
113 
116  void SetIdentity();
117 
122  virtual void ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & jacobian) const;
123 
124 protected:
126  ScaleVersor3DTransform(const MatrixType & matrix, const OutputVectorType & offset);
127  ScaleVersor3DTransform(unsigned int paramDims);
129 
130  void PrintSelf(std::ostream & os, Indent indent) const;
131 
132  void SetVarScale(const ScaleVectorType & scale)
133  {
134  m_Scale = scale;
135  }
136 
138  void ComputeMatrix(void);
139 
140  void ComputeMatrixParameters(void);
141 
142 private:
143  ScaleVersor3DTransform(const Self &); // purposely not implemented
144  void operator=(const Self &); // purposely not implemented
145 
148 }; // class ScaleVersor3DTransform
149 } // namespace itk
150 
151 #ifndef ITK_MANUAL_INSTANTIATION
152 #include "itkScaleVersor3DTransform.hxx"
153 #endif
154 
155 #endif /* __ScaleVersor3DTransform_h */
156