17 #ifndef __itkFEMFiniteDifferenceFunctionLoad_h
18 #define __itkFEMFiniteDifferenceFunctionLoad_h
32 #include "vnl/vnl_math.h"
63 template<
class TMoving,
class TFixed>
80 itkStaticConstMacro(ImageDimension,
unsigned int,
81 MovingImageType::ImageDimension);
108 typedef
Image< PixelType, itkGetStaticConstMacro(ImageDimension) >
110 typedef itk::
Vector<
float,itkGetStaticConstMacro(ImageDimension)>
148 void SetDifferenceFunction( FiniteDifferenceFunctionTypePointer drfp)
151 drfp->SetMovingImage(m_MovingImage);
152 drfp->SetRadius(m_MetricRadius);
153 drfp->SetDeformationField(m_DeformationField);
154 drfp->InitializeIteration();
155 this->m_DifferenceFunction=drfp;
160 this->SetDifferenceFunction( static_cast<FiniteDifferenceFunctionType *>(
163 m_FixedSize=m_DeformationField->GetLargestPossibleRegion().GetSize();
170 m_MovingSize=m_MovingImage->GetLargestPossibleRegion().GetSize();
171 if (this->m_DifferenceFunction) this->m_DifferenceFunction->SetMovingImage(m_MovingImage);
179 m_FixedSize=T->GetLargestPossibleRegion().GetSize();
180 if (this->m_DifferenceFunction)
182 this->m_DifferenceFunction->SetFixedImage(m_MovingImage);
188 return m_MovingImage;
204 return m_MetricRadius;
211 void SetNumberOfIntegrationPoints(
unsigned int i)
213 m_NumberOfIntegrationPoints=i;
215 unsigned int GetNumberOfIntegrationPoints()
217 return m_NumberOfIntegrationPoints;
251 Float GetSolution(
unsigned int i,
unsigned int which=0)
263 FEMVectorType Fe(FEMVectorType,FEMVectorType);
271 { m_DeformationField=df;}
275 void InitializeIteration();
276 void InitializeMetric();
278 void PrintCurrentEnergy();
279 double GetCurrentEnergy();
280 void SetCurrentEnergy(
double e = 0.0);
313 #ifndef ITK_MANUAL_INSTANTIATION