/*========================================================================= Program: Insight Segmentation & Registration Toolkit Module: $RCSfile: itkElasticBodySplineKernelTransform2.txx,v $ Language: C++ Date: $Date: 2004/12/12 22:05:02 $ Version: $Revision: 1.20 $ Copyright (c) Insight Software Consortium. All rights reserved. See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #ifndef _itkElasticBodySplineKernelTransform2_txx #define _itkElasticBodySplineKernelTransform2_txx #include "itkElasticBodySplineKernelTransform2.h" namespace itk { template ElasticBodySplineKernelTransform2:: ElasticBodySplineKernelTransform2() { // Alpha = 12 ( 1 - \nu ) - 1 m_Alpha = 12.0 * ( 1.0 - .25 ) - 1; } template ElasticBodySplineKernelTransform2:: ~ElasticBodySplineKernelTransform2() { } template const typename ElasticBodySplineKernelTransform2::GMatrixType & ElasticBodySplineKernelTransform2 ::ComputeG(const InputVectorType & x) const { const TScalarType r = x.GetNorm(); const TScalarType factor = -3.0 * r; const TScalarType radial = m_Alpha * ( r * r ) * r; for(unsigned int i=0; im_GMatrix[i][j] = value; this->m_GMatrix[j][i] = value; } this->m_GMatrix[i][i] = radial + xi * x[i]; } return this->m_GMatrix; } template void ElasticBodySplineKernelTransform2 ::PrintSelf(std::ostream& os, Indent indent) const { Superclass::PrintSelf(os,indent); os << indent << "m_Alpha: " << m_Alpha << std::endl; } } // namespace itk #endif