15 #ifndef __itkAdvancedImageToImageMetric_h
16 #define __itkAdvancedImageToImageMetric_h
18 #include "itkImageToImageMetric.h"
21 #include "itkGradientImageFilter.h"
22 #include "itkBSplineInterpolateImageFunction.h"
25 #include "itkFixedArray.h"
27 #include "vnl/vnl_sparse_matrix.h"
68 template <
class TFixedImage,
class TMovingImage>
70 public ImageToImageMetric< TFixedImage, TMovingImage >
75 typedef ImageToImageMetric<
85 TMovingImage::ImageDimension );
87 TFixedImage::ImageDimension );
125 typedef FixedArray<
double,
160 this->Superclass::SetTransform( arg );
181 itkGetConstMacro( UseImageSampler,
bool );
186 itkSetMacro( RequiredRatioOfValidSamples,
double );
187 itkGetConstMacro( RequiredRatioOfValidSamples,
double );
202 itkSetMacro( MovingLimitRangeRatio,
double );
203 itkGetConstMacro( MovingLimitRangeRatio,
double );
204 itkSetMacro( FixedLimitRangeRatio,
double );
205 itkGetConstMacro( FixedLimitRangeRatio,
double );
209 itkGetConstMacro( UseFixedImageLimiter,
bool );
210 itkGetConstMacro( UseMovingImageLimiter,
bool );
218 itkSetMacro( UseMovingImageDerivativeScales,
bool );
219 itkGetConstMacro( UseMovingImageDerivativeScales,
bool );
231 virtual void Initialize(
void ) throw ( ExceptionObject );
243 virtual ~AdvancedImageToImageMetric() {};
246 void PrintSelf( std::ostream& os, Indent indent )
const;
266 typedef GradientImageFilter<
313 itkSetMacro( UseImageSampler,
bool );
318 unsigned long wanted,
unsigned long found ) const;
387 itkSetMacro( UseFixedImageLimiter,
bool );
388 itkSetMacro( UseMovingImageLimiter,
bool );
392 void operator=(const Self&);
408 #ifndef ITK_MANUAL_INSTANTIATION
409 #include "itkAdvancedImageToImageMetric.hxx"
412 #endif // end #ifndef __itkAdvancedImageToImageMetric_h
void PrintSelf(std::ostream &os, Indent indent) const
ImageToImageMetric< TFixedImage, TMovingImage > Superclass
virtual bool TransformPoint(const FixedImagePointType &fixedImagePoint, MovingImagePointType &mappedPoint) const
Superclass::MeasureType MeasureType
bool m_InterpolatorIsReducedBSpline
bool m_InterpolatorIsBSpline
ReducedDimensionBSplineInterpolateImageFunction< MovingImageType, CoordinateRepresentationType, double > ReducedBSplineInterpolatorType
const AdvancedTransformType * GetTransform(void) const
MovingImageDerivativeScalesType m_MovingImageDerivativeScales
AdvancedTransform< ScalarType, FixedImageDimension, MovingImageDimension > AdvancedTransformType
DerivativeType::ValueType HessianValueType
virtual void CheckForAdvancedTransform(void)
virtual bool IsInsideMovingMask(const MovingImagePointType &point) const
Superclass::InputPointType InputPointType
SmartPointer< Self > Pointer
Superclass::CoordinateRepresentationType CoordinateRepresentationType
Superclass::TransformParametersType TransformParametersType
Superclass::MovingImageType MovingImageType
Superclass::FixedImageMaskPointer FixedImageMaskPointer
Superclass::OutputPointType OutputPointType
An extension of the ITK ImageToImageMetric. It is the intended base class for all elastix metrics...
virtual void CheckForBSplineInterpolator(void)
virtual void ComputeFixedImageExtrema(const FixedImageType *image, const FixedImageRegionType ®ion)
virtual void InitializeLimiters(void)
ImageSamplerPointer m_ImageSampler
BSplineInterpolateImageFunction< MovingImageType, CoordinateRepresentationType, double > BSplineInterpolatorType
CentralDifferenceGradientFilterType::Pointer m_CentralDifferenceGradientFilter
Superclass::GradientPixelType GradientPixelType
double m_MovingLimitRangeRatio
FixedImageLimiterType::Pointer m_FixedImageLimiter
FixedImageLimiterOutputType m_FixedImageMinLimit
FixedImageLimiterType::OutputType FixedImageLimiterOutputType
FixedImageType::Pointer FixedImagePointer
Superclass::TransformType TransformType
FixedImagePixelType m_FixedImageTrueMax
Superclass::FixedImageRegionType FixedImageRegionType
AdvancedTransformType::Pointer m_AdvancedTransform
bool m_InterpolatorIsBSplineFloat
ImageSamplerType::OutputVectorContainerType ImageSampleContainerType
MovingImageType::IndexType MovingImageIndexType
double m_RequiredRatioOfValidSamples
MovingImageLimiterType::Pointer m_MovingImageLimiter
InterpolatorType::ContinuousIndexType MovingImageContinuousIndexType
BSplineInterpolatorType::Pointer m_BSplineInterpolator
TransformType::InputPointType FixedImagePointType
FixedImagePixelType m_FixedImageTrueMin
Superclass::ParametersType ParametersType
This class is a base class for any image sampler.
ImageSamplerBase< FixedImageType > ImageSamplerType
FixedImageLimiterOutputType m_FixedImageMaxLimit
AdvancedTransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
bool m_TransformIsAdvanced
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
bool m_UseMovingImageLimiter
MovingImageLimiterOutputType m_MovingImageMaxLimit
Superclass::InterpolatorPointer InterpolatorPointer
FixedImageType::IndexType FixedImageIndexType
MovingImagePixelType m_MovingImageTrueMin
MovingImagePixelType m_MovingImageTrueMax
SmartPointer< Self > Pointer
vnl_sparse_matrix< HessianValueType > HessianType
AdvancedImageToImageMetric Self
TransformType::ScalarType ScalarType
bool m_UseFixedImageLimiter
FixedArray< double, itkGetStaticConstMacro(MovingImageDimension) > MovingImageDerivativeScalesType
Superclass::OutputVectorContainerPointer OutputVectorContainerPointer
FixedImageIndexType::IndexValueType FixedImageIndexValueType
SmartPointer< Self > Pointer
double m_FixedLimitRangeRatio
TransformType::OutputPointType MovingImagePointType
Superclass::FixedImageType FixedImageType
LimiterFunctionBase< RealType, FixedImageDimension > FixedImageLimiterType
Superclass::MovingImageMaskType MovingImageMaskType
Superclass::GradientImageType GradientImageType
Evaluates the B-Spline interpolation of an image. Spline order may be from 0 to 5.
Superclass::TransformPointer TransformPointer
BSplineInterpolatorFloatType::Pointer m_BSplineInterpolatorFloat
SmartPointer< const Self > ConstPointer
BSplineInterpolateImageFunction< MovingImageType, CoordinateRepresentationType, float > BSplineInterpolatorFloatType
Superclass::GradientImageFilterType GradientImageFilterType
ImageSamplerType::Pointer ImageSamplerPointer
MovingImageType::RegionType MovingImageRegionType
MovingImageLimiterOutputType m_MovingImageMinLimit
Superclass::InterpolatorType InterpolatorType
Base class for all ITK limiter function objects.
Superclass::TransformJacobianType TransformJacobianType
virtual void CheckNumberOfSamples(unsigned long wanted, unsigned long found) const
MovingImageType::Pointer MovingImagePointer
virtual void ComputeMovingImageExtrema(const MovingImageType *image, const MovingImageRegionType ®ion)
GradientImageFilter< MovingImageType, RealType, RealType > CentralDifferenceGradientFilterType
Superclass::MovingImagePixelType MovingImagePixelType
SmartPointer< Self > Pointer
Superclass::RealType RealType
virtual bool EvaluateMovingImageValueAndDerivative(const MovingImagePointType &mappedPoint, RealType &movingImageValue, MovingImageDerivativeType *gradient) const
DerivativeType::ValueType DerivativeValueType
virtual void GetSelfHessian(const TransformParametersType ¶meters, HessianType &H) const
Superclass::MovingImageMaskPointer MovingImageMaskPointer
MovingImageLimiterType::OutputType MovingImageLimiterOutputType
virtual void Initialize(void)
LimiterFunctionBase< RealType, MovingImageDimension > MovingImageLimiterType
FixedImageType::PixelType FixedImagePixelType
ImageSamplerType::OutputVectorContainerPointer ImageSampleContainerPointer
Superclass::FixedImageMaskType FixedImageMaskType
bool m_UseMovingImageDerivativeScales
virtual ImageSamplerType * GetImageSampler(void) const
ReducedBSplineInterpolatorType::Pointer m_ReducedBSplineInterpolator
itkStaticConstMacro(MovingImageDimension, unsigned int, TMovingImage::ImageDimension)
BSplineInterpolatorType::CovariantVectorType MovingImageDerivativeType
Superclass::OutputType OutputType
Superclass::FixedImageConstPointer FixedImageConstPointer
Superclass::MovingImageConstPointer MovingImageConstPointer
virtual void InitializeImageSampler(void)
Superclass::DerivativeType DerivativeType
virtual void SetTransform(AdvancedTransformType *arg)
virtual bool EvaluateTransformJacobian(const FixedImagePointType &fixedImagePoint, TransformJacobianType &jacobian, NonZeroJacobianIndicesType &nzji) const
Superclass::GradientImageFilterPointer GradientImageFilterPointer
Superclass::GradientImagePointer GradientImagePointer