18 #ifndef __itkFEMImageMetricLoad_h
19 #define __itkFEMImageMetricLoad_h
33 #include "vnl/vnl_math.h"
68 template <
typename TMoving,
typename TFixed>
80 itkSimpleNewMacro(
Self);
87 virtual::itk::LightObject::Pointer
CreateAnother(
void) const ITK_OVERRIDE;
101 MovingType::ImageDimension);
166 typedef
Image<GradientPixelType,
195 m_RefSize = R->GetLargestPossibleRegion().GetSize();
202 m_TarSize = T->GetLargestPossibleRegion().GetSize();
209 m_TarSize = T->GetLargestPossibleRegion().GetSize();
230 return m_MetricRadius;
332 std::cout <<
" energy " <<
m_Energy << std::endl;
347 virtual void PrintSelf(std::ostream& os,
Indent indent)
const ITK_OVERRIDE;
377 #ifndef ITK_MANUAL_INSTANTIATION
378 #include "itkFEMImageMetricLoad.hxx"
MovingType::ConstPointer MovingConstPointer
virtual Solution::ConstPointer GetSolution() ITK_OVERRIDE
virtual ::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE
Light weight base class for most itk classes.
VectorType GetPolynomialFitToMetric(VectorType PositionInElement, VectorType SolutionAtPosition)
void SetMetricGradientImage(GradientImageType *g)
MetricBaseTypePointer m_Metric
unsigned int m_NumberOfIntegrationPoints
virtual void ApplyLoad(Element::ConstPointer element, Element::VectorType &Fe) ITK_OVERRIDE
GradientImageType * m_MetricGradientImage
void SetMovingImage(MovingType *R)
vnl_vector< Float > VectorType
SmartPointer< const Self > ConstPointer
unsigned int m_SolutionIndex
void SetNumberOfIntegrationPoints(unsigned int i)
void SetMetricFixedImage(FixedType *T)
MovingPointer GetMovingImage()
unsigned int GetNumberOfIntegrationPoints()
void SetMetricMovingImage(MovingType *R)
void SetCurrentEnergy(double e)
MovingType::PixelType RefPixelType
MovingNeighborhoodIteratorType::IndexType MovingNeighborhoodIndexType
SmartPointer< Self > Pointer
Computes the gradient of an image by convolution with the first derivative of a Gaussian.
VectorType MetricFiniteDiff(VectorType PositionInElement, VectorType SolutionAtPosition)
static const double e
The base of the natural logarithm or Euler's number
virtual void SetSolution(Solution::ConstPointer ptr) ITK_OVERRIDE
FixedPointer GetFixedImage()
General image pair load that uses the itkImageToImageMetrics.
void SetMetric(MetricBaseTypePointer MP)
FixedType::SizeType m_TarSize
double GetCurrentEnergy()
Provides functions to access the values of the solution vector.
void SetFixedImage(FixedType *T)
Computes similarity between two images to be registered.
Float GetSolution(unsigned int i, unsigned int which=0)
double CoordinateRepresentationType
A multi-dimensional iterator templated over image type that walks pixels within a region and is speci...
MovingNeighborhoodIteratorType::RadiusType MovingRadiusType
vnl_vector< Float > VectorType
TransformBaseType::Pointer m_Transform
static const unsigned int ImageDimension
Float GetMetric(VectorType InVec)
unsigned long ElementIdentifier
Virtual element load base class.
FixedNeighborhoodIteratorType::RadiusType FixedRadiusType
virtual void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
DefaultTransformType::ParametersType ParametersType
DefaultTransformType::JacobianType JacobianType
Linearly interpolate an image at specified positions.
VectorType Fe(VectorType, VectorType)
Float EvaluateMetricGivenSolution(Element::ArrayType *el, Float step=1.0)
static Baseclass * NewImageMetricLoad(void)
FixedType::ConstPointer FixedConstPointer
Abstract base element class.
GradientImageType * GetMetricGradientImage()
Float EvaluateMetricGivenSolution1(Element::ArrayType *el, Float step=1.0)
MovingType * MovingPointer
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
void InitializeMetric(void)
Control indentation during Print() invocation.
unsigned int m_SolutionIndex2
MovingRadiusType GetMetricRadius()
FixedType::PixelType TarPixelType
Computes similarity between regions of two images.
MovingType::SizeType m_RefSize
A templated class holding a n-Dimensional covariant vector.
virtual Float GetSolutionValue(unsigned int i, unsigned int solutionIndex=0) const =0
FixedNeighborhoodIteratorType::IndexType FixedNeighborhoodIndexType
Solution::ConstPointer m_Solution
Defines iteration of a local N-dimensional neighborhood of pixels across an itk::Image.
Templated n-dimensional image class.
void PrintCurrentEnergy()
void SetMetricRadius(MovingRadiusType T)
InterpolatorType::Pointer m_Interpolator