ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkScaleVersor3DTransform.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkScaleVersor3DTransform_h
00019 #define __itkScaleVersor3DTransform_h
00020 
00021 #include "itkVersorRigid3DTransform.h"
00022 
00023 namespace itk
00024 {
00044 template <class TScalarType = double>
00045 // Data type for scalars:float or double
00046 class ITK_EXPORT ScaleVersor3DTransform : public VersorRigid3DTransform<TScalarType>
00047 {
00048 public:
00050   typedef ScaleVersor3DTransform              Self;
00051   typedef VersorRigid3DTransform<TScalarType> Superclass;
00052   typedef SmartPointer<Self>                  Pointer;
00053   typedef SmartPointer<const Self>            ConstPointer;
00054 
00056   itkNewMacro(Self);
00057 
00059   itkTypeMacro(ScaleVersor3DTransform, VersorRigid3DTransform);
00060 
00062   itkStaticConstMacro(InputSpaceDimension,  unsigned int,  3);
00063   itkStaticConstMacro(OutputSpaceDimension, unsigned int,  3);
00064   itkStaticConstMacro(ParametersDimension,  unsigned int,  9);
00066 
00068   typedef typename Superclass::ParametersType            ParametersType;
00069   typedef typename Superclass::JacobianType              JacobianType;
00070   typedef typename Superclass::ScalarType                ScalarType;
00071   typedef typename Superclass::InputPointType            InputPointType;
00072   typedef typename Superclass::OutputPointType           OutputPointType;
00073   typedef typename Superclass::InputVectorType           InputVectorType;
00074   typedef typename Superclass::OutputVectorType          OutputVectorType;
00075   typedef typename Superclass::InputVnlVectorType        InputVnlVectorType;
00076   typedef typename Superclass::OutputVnlVectorType       OutputVnlVectorType;
00077   typedef typename Superclass::InputCovariantVectorType  InputCovariantVectorType;
00078   typedef typename Superclass::OutputCovariantVectorType OutputCovariantVectorType;
00079   typedef typename Superclass::MatrixType                MatrixType;
00080   typedef typename Superclass::InverseMatrixType         InverseMatrixType;
00081   typedef typename Superclass::CenterType                CenterType;
00082   typedef typename Superclass::OffsetType                OffsetType;
00083   typedef typename Superclass::TranslationType           TranslationType;
00084 
00085   typedef typename Superclass::VersorType VersorType;
00086   typedef typename Superclass::AxisType   AxisType;
00087   typedef typename Superclass::AngleType  AngleType;
00088 
00090   typedef Vector<TScalarType, 3> ScaleVectorType;
00091 
00095   virtual void SetMatrix(const MatrixType & matrix);
00096 
00104   virtual void SetParameters(const ParametersType & parameters);
00105 
00106   virtual const ParametersType & GetParameters(void) const;
00107 
00110   void SetScale(const ScaleVectorType & scale);
00111 
00112   itkGetConstReferenceMacro(Scale, ScaleVectorType);
00113 
00116   void SetIdentity();
00117 
00122   virtual void ComputeJacobianWithRespectToParameters( const InputPointType  & p, JacobianType & jacobian) const;
00123 
00124 protected:
00125   ScaleVersor3DTransform();
00126   ScaleVersor3DTransform(const MatrixType & matrix, const OutputVectorType & offset);
00127   ScaleVersor3DTransform(unsigned int paramDims);
00128   ~ScaleVersor3DTransform();
00129 
00130   void PrintSelf(std::ostream & os, Indent indent) const;
00131 
00132   void SetVarScale(const ScaleVectorType & scale)
00133   {
00134     m_Scale = scale;
00135   }
00136 
00138   void ComputeMatrix(void);
00139 
00140   void ComputeMatrixParameters(void);
00141 
00142 private:
00143   ScaleVersor3DTransform(const Self &); // purposely not implemented
00144   void operator=(const Self &);         // purposely not implemented
00145 
00147   ScaleVectorType m_Scale;
00148 }; // class ScaleVersor3DTransform
00149 }  // namespace itk
00150 
00151 #ifndef ITK_MANUAL_INSTANTIATION
00152 #include "itkScaleVersor3DTransform.hxx"
00153 #endif
00154 
00155 #endif /* __ScaleVersor3DTransform_h */
00156