18 #ifndef __itkFEMFiniteDifferenceFunctionLoad_h
19 #define __itkFEMFiniteDifferenceFunctionLoad_h
34 #include "vnl/vnl_math.h"
66 template <
class TMoving,
class TFixed>
78 itkSimpleNewMacro(
Self);
86 virtual::itk::LightObject::Pointer CreateAnother(
void)
const;
99 itkStaticConstMacro(ImageDimension,
unsigned int,
100 MovingImageType::ImageDimension);
167 drfp->SetFixedImage(m_FixedImage);
168 drfp->SetMovingImage(m_MovingImage);
169 drfp->SetRadius(m_MetricRadius);
170 drfp->SetDisplacementField(m_DisplacementField);
171 drfp->InitializeIteration();
172 this->m_DifferenceFunction = drfp;
177 this->SetDifferenceFunction( static_cast<FiniteDifferenceFunctionType *>(
180 m_FixedSize = m_DisplacementField->GetLargestPossibleRegion().GetSize();
187 m_MovingSize = m_MovingImage->GetLargestPossibleRegion().GetSize();
188 if( this->m_DifferenceFunction )
190 this->m_DifferenceFunction->SetMovingImage(m_MovingImage);
199 m_FixedSize = T->GetLargestPossibleRegion().GetSize();
200 if( this->m_DifferenceFunction )
202 this->m_DifferenceFunction->SetFixedImage(m_MovingImage);
209 return m_MovingImage;
226 return m_MetricRadius;
233 void SetNumberOfIntegrationPoints(
unsigned int i)
235 m_NumberOfIntegrationPoints = i;
238 unsigned int GetNumberOfIntegrationPoints()
240 return m_NumberOfIntegrationPoints;
246 void SetDescentDirectionMinimize( )
251 void SetDescentDirectionMaximize()
273 Float GetSolution(
unsigned int i,
unsigned int which = 0)
278 Float EvaluateMetricGivenSolution( ElementContainerType *el, Float step = 1.0);
284 FEMVectorType Fe(FEMVectorType);
289 m_DisplacementField = df;
295 return m_DisplacementField;
298 void InitializeIteration();
300 void InitializeMetric();
302 void PrintCurrentEnergy();
304 double GetCurrentEnergy();
306 void SetCurrentEnergy(
double e = 0.0);
337 #ifndef ITK_MANUAL_INSTANTIATION
338 #include "itkFEMFiniteDifferenceFunctionLoad.hxx"