Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkScaleTransform.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkScaleTransform.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/11/25 23:50:25 $ 00007 Version: $Revision: 1.21 $ 00008 00009 Copyright (c) Insight Software Consortium. All rights reserved. 00010 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00018 #ifndef __itkScaleTransform_h 00019 #define __itkScaleTransform_h 00020 00021 #include <iostream> 00022 #include "itkTransform.h" 00023 #include "itkExceptionObject.h" 00024 #include "itkMatrix.h" 00025 00026 namespace itk 00027 { 00028 00037 template < 00038 class TScalarType=float, // Type for cordinate representation type (float or double) 00039 unsigned int NDimensions=3 > // Number of dimensions 00040 class ITK_EXPORT ScaleTransform : public Transform< TScalarType, 00041 NDimensions, 00042 NDimensions > 00043 { 00044 public: 00046 typedef ScaleTransform Self; 00047 typedef Transform< TScalarType, NDimensions, NDimensions > Superclass; 00048 typedef SmartPointer<Self> Pointer; 00049 typedef SmartPointer<const Self> ConstPointer; 00050 00052 itkNewMacro( Self ); 00053 00055 itkTypeMacro( ScaleTransform, Transform ); 00056 00058 itkStaticConstMacro(SpaceDimension, unsigned int, NDimensions); 00059 itkStaticConstMacro(ParametersDimension, unsigned int, NDimensions); 00060 00062 typedef typename Superclass::ScalarType ScalarType; 00063 00065 typedef typename Superclass::ParametersType ParametersType; 00066 00068 typedef typename Superclass::JacobianType JacobianType; 00069 00071 typedef FixedArray<TScalarType, itkGetStaticConstMacro(SpaceDimension)> ScaleType; 00072 00074 typedef Vector<TScalarType, itkGetStaticConstMacro(SpaceDimension)> InputVectorType; 00075 typedef Vector<TScalarType, itkGetStaticConstMacro(SpaceDimension)> OutputVectorType; 00076 00078 typedef CovariantVector<TScalarType, itkGetStaticConstMacro(SpaceDimension)> InputCovariantVectorType; 00079 typedef CovariantVector<TScalarType, itkGetStaticConstMacro(SpaceDimension)> OutputCovariantVectorType; 00080 00082 typedef vnl_vector_fixed<TScalarType, itkGetStaticConstMacro(SpaceDimension)> InputVnlVectorType; 00083 typedef vnl_vector_fixed<TScalarType, itkGetStaticConstMacro(SpaceDimension)> OutputVnlVectorType; 00084 00086 typedef Point<TScalarType, itkGetStaticConstMacro(SpaceDimension)> InputPointType; 00087 typedef Point<TScalarType, itkGetStaticConstMacro(SpaceDimension)> OutputPointType; 00088 00093 void SetParameters(const ParametersType & parameters); 00094 00099 const ParametersType & GetParameters( void ) const; 00100 00102 const JacobianType & GetJacobian( const InputPointType & point ) const; 00103 00112 void SetScale( const ScaleType & scale ) 00113 { this->Modified(); m_Scale = scale; } 00114 00116 void Compose(const Self * other, bool pre=false); 00117 00121 void Scale(const ScaleType & scale, bool pre=false ); 00122 00127 OutputPointType TransformPoint(const InputPointType &point ) const; 00128 OutputVectorType TransformVector(const InputVectorType &vector) const; 00129 OutputVnlVectorType TransformVector(const InputVnlVectorType &vector) const; 00130 OutputCovariantVectorType TransformCovariantVector( 00131 const InputCovariantVectorType &vector) const; 00132 00137 inline InputPointType BackTransform(const OutputPointType &point ) const; 00138 inline InputVectorType BackTransform(const OutputVectorType &vector) const; 00139 inline InputVnlVectorType BackTransform(const OutputVnlVectorType &vector) const; 00140 inline InputCovariantVectorType BackTransform( 00141 const OutputCovariantVectorType &vector) const; 00142 00147 typename ScaleTransform::Pointer Inverse(void) const; 00148 00152 void SetIdentity( void ) 00153 { m_Scale.Fill( 1.0 ); } 00154 00155 00157 itkSetMacro( Center, InputPointType ); 00158 itkGetConstMacro( Center, InputPointType ); 00159 00160 00162 itkGetConstMacro( Scale, ScaleType ); 00163 00164 00165 protected: 00167 ScaleTransform(); 00168 00170 ~ScaleTransform(); 00171 00173 void PrintSelf(std::ostream &os, Indent indent) const; 00174 00175 00176 private: 00177 ScaleTransform(const Self & other); //purposely not implemented 00178 const Self & operator=( const Self & ); //purposely not implemented 00179 00180 ScaleType m_Scale; // Scales of the transformation 00181 00182 InputPointType m_Center; // Scaling center 00183 00184 }; //class ScaleTransform 00185 00186 } // namespace itk 00187 00188 00189 #ifndef ITK_MANUAL_INSTANTIATION 00190 #include "itkScaleTransform.txx" 00191 #endif 00192 00193 #endif /* __itkScaleTransform_h */

Generated at Sun Apr 1 02:43:05 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000