![]() |
Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages |
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkElasticBodyReciprocalSplineKernelTransform2.h,v $ 00005 Language: C++ 00006 Date: $Date: 2006/04/17 01:50:19 $ 00007 Version: $Revision: 1.8 $ 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 #ifndef __itkElasticBodyReciprocalSplineKernelTransform2_h 00018 #define __itkElasticBodyReciprocalSplineKernelTransform2_h 00019 00020 #include "itkKernelTransform2.h" 00021 00022 00023 namespace itk 00024 { 00025 00038 template <class TScalarType = double, // Data type for scalars (float or double) 00039 unsigned int NDimensions = 3> // Number of dimensions 00040 class ITK_EXPORT ElasticBodyReciprocalSplineKernelTransform2 : 00041 public KernelTransform2< TScalarType, NDimensions> 00042 { 00043 public: 00045 typedef ElasticBodyReciprocalSplineKernelTransform2 Self; 00046 typedef KernelTransform2< TScalarType, 00047 NDimensions> Superclass; 00048 00049 typedef SmartPointer<Self> Pointer; 00050 typedef SmartPointer<const Self> ConstPointer; 00051 00053 itkTypeMacro( ElasticBodyReciprocalSplineKernelTransform2, KernelTransform2 ); 00054 00056 itkNewMacro( Self ); 00057 00059 typedef typename Superclass::ScalarType ScalarType; 00060 00062 typedef typename Superclass::ParametersType ParametersType; 00063 00065 typedef typename Superclass::JacobianType JacobianType; 00066 00068 itkStaticConstMacro(SpaceDimension, unsigned int,Superclass::SpaceDimension); 00069 00073 //itkSetMacro( Alpha, TScalarType ); Cant use the macro because the matrices must be recomputed 00074 virtual void SetAlpha(TScalarType Alpha) { 00075 this->m_Alpha=Alpha; 00076 this->m_LMatrixComputed=false; 00077 this->m_LInverseComputed=false; 00078 this->m_WMatrixComputed=false; 00079 } 00080 00082 itkGetConstMacro( Alpha, TScalarType ); 00083 00085 virtual void SetPoissonRatio( const TScalarType Nu ) 00086 { 00087 if ( Nu > -1.0 && Nu < 0.5 ) 00088 { 00089 this->SetAlpha( 8.0 * ( 1.0 - Nu ) - 1.0 ); 00090 } 00091 } 00092 00093 virtual const TScalarType GetPoissonRatio( void ) const 00094 { 00095 return 1.0 - ( this->m_Alpha + 1.0 ) / 8.0; 00096 } 00097 00100 typedef typename Superclass::InputPointType InputPointType; 00101 typedef typename Superclass::OutputPointType OutputPointType; 00102 typedef typename Superclass::InputVectorType InputVectorType; 00103 typedef typename Superclass::OutputVectorType OutputVectorType; 00104 typedef typename Superclass::InputCovariantVectorType InputCovariantVectorType; 00105 typedef typename Superclass::OutputCovariantVectorType OutputCovariantVectorType; 00106 00107 00108 protected: 00109 ElasticBodyReciprocalSplineKernelTransform2(); 00110 virtual ~ElasticBodyReciprocalSplineKernelTransform2() {}; 00111 void PrintSelf(std::ostream& os, Indent indent) const; 00112 00115 typedef typename Superclass::GMatrixType GMatrixType; 00116 00125 void ComputeG(const InputVectorType& x, GMatrixType & GMatrix) const; 00126 00128 TScalarType m_Alpha; 00129 00130 private: 00131 ElasticBodyReciprocalSplineKernelTransform2(const Self&); //purposely not implemented 00132 void operator=(const Self&); //purposely not implemented 00133 00134 }; 00135 00136 } // namespace itk 00137 00138 #ifndef ITK_MANUAL_INSTANTIATION 00139 #include "itkElasticBodyReciprocalSplineKernelTransform2.txx" 00140 #endif 00141 00142 #endif // __itkElasticBodyReciprocalSplineKernelTransform2_h
Generated on 11-05-2012 for elastix by ![]() |
![]() |