15 #ifndef itkImageToImageMetricWithConstraint_h
16 #define itkImageToImageMetricWithConstraint_h
18 #include <itkImageToImageMetric.h>
48 template <
typename TFixedImage,
typename TMovingImage >
50 public ImageToImageMetric< TFixedImage, TMovingImage>
56 typedef ImageToImageMetric<TFixedImage, TMovingImage >
Superclass;
81 itkSetObjectMacro(
Constraint, ConstraintType );
82 itkGetObjectMacro(
Constraint, ConstraintType );
85 itkSetMacro( WeightingFactor,
double );
86 itkGetMacro( WeightingFactor,
double );
89 itkSetMacro( UseConstraintGradient,
bool );
90 itkGetConstMacro( UseConstraintGradient,
bool );
93 itkSetMacro( PrintOutMetricEvaluation,
bool );
94 itkGetMacro( PrintOutMetricEvaluation,
bool );
98 virtual MeasureType GetValue(
const TransformParametersType & parameters )
const;
104 virtual void GetConstraintDerivative(
const TransformParametersType & parameters, DerivativeType & derivative )
const;
116 virtual void GetDerivative(
const TransformParametersType & parameters, DerivativeType & derivative )
const;
119 virtual void GetValueAndDerivative(
const TransformParametersType & parameters, MeasureType& Value, DerivativeType& derivative )
const;
125 void PrintSelf(std::ostream& os, Indent indent)
const;
128 virtual MeasureType GetSimilarity(
const TransformParametersType & parameters )
const = 0;
131 virtual void GetCostFunctionDerivative(
const TransformParametersType & parameters, DerivativeType & derivative )
const = 0;
161 #ifndef ITK_MANUAL_INSTANTIATION
162 #include "itkImageToImageMetricWithConstraint.txx"
Abstract base class to provide functionality for adding arbitrary constraints, and also arbitrary way...
Definition: itkImageToImageMetricWithConstraint.h:49
SmartPointer< Self > Pointer
Definition: itkMetricDerivativeBridge.h:42
Superclass::DerivativeType DerivativeType
Definition: itkImageToImageMetricWithConstraint.h:70
bool m_UseConstraintGradient
Definition: itkImageToImageMetricWithConstraint.h:152
Definition: niftkITKAffineResampleImage.cxx:74
SmartPointer< Self > Pointer
Definition: itkConstraint.h:49
MetricDerivativeBridge< TFixedImage, TMovingImage > MetricDerivativeBridgeType
Definition: itkImageToImageMetricWithConstraint.h:65
Abstract Base class for constraints, which are objects that return a single double value...
Definition: itkConstraint.h:42
MetricDerivativePointer m_DerivativeBridge
Definition: itkImageToImageMetricWithConstraint.h:137
Definition: itkMetricDerivativeBridge.h:34
ImageToImageMetric< TFixedImage, TMovingImage > Superclass
Definition: itkImageToImageMetricWithConstraint.h:56
double m_WeightingFactor
Definition: itkImageToImageMetricWithConstraint.h:149
ConstraintPointer m_Constraint
Definition: itkImageToImageMetricWithConstraint.h:143
SmartPointer< const Self > ConstPointer
Definition: itkImageToImageMetricWithConstraint.h:58
ImageToImageMetricWithConstraint Self
Definition: itkImageToImageMetricWithConstraint.h:55
SmartPointer< Self > Pointer
Definition: itkImageToImageMetricWithConstraint.h:57
Superclass::ParametersType TransformParametersType
Definition: itkImageToImageMetricWithConstraint.h:71
AbstractBase class, implementing Bridge [2] to provide an interface for anything that calculates deri...
Definition: itkMetricDerivativeBridge.h:24
itk::Constraint ConstraintType
Definition: itkImageToImageMetricWithConstraint.h:61
Superclass::MeasureType MeasureType
Definition: itkImageToImageMetricWithConstraint.h:69
ConstraintType::Pointer ConstraintPointer
Definition: itkImageToImageMetricWithConstraint.h:62
bool m_PrintOutMetricEvaluation
Definition: itkImageToImageMetricWithConstraint.h:155
MetricDerivativeBridgeType::Pointer MetricDerivativePointer
Definition: itkImageToImageMetricWithConstraint.h:66
virtual ~ImageToImageMetricWithConstraint()
Definition: itkImageToImageMetricWithConstraint.h:124