Go to the documentation of this file.
18 #ifndef __itkAdvancedImageToImageMetric_h
19 #define __itkAdvancedImageToImageMetric_h
21 #include "itkImageToImageMetric.h"
24 #include "itkGradientImageFilter.h"
25 #include "itkBSplineInterpolateImageFunction.h"
29 #include "itkFixedArray.h"
31 #include "vnl/vnl_sparse_matrix.h"
37 #include "itkMultiThreader.h"
78 template<
class TFixedImage,
class TMovingImage >
80 public ImageToImageMetric< TFixedImage, TMovingImage >
86 typedef ImageToImageMetric< TFixedImage, TMovingImage >
Superclass;
95 TMovingImage::ImageDimension );
97 TFixedImage::ImageDimension );
179 this->Superclass::SetTransform( arg );
205 itkGetConstMacro( UseImageSampler,
bool );
210 itkSetMacro( RequiredRatioOfValidSamples,
double );
211 itkGetConstMacro( RequiredRatioOfValidSamples,
double );
226 itkSetMacro( MovingLimitRangeRatio,
double );
227 itkGetConstMacro( MovingLimitRangeRatio,
double );
228 itkSetMacro( FixedLimitRangeRatio,
double );
229 itkGetConstMacro( FixedLimitRangeRatio,
double );
233 itkGetConstMacro( UseFixedImageLimiter,
bool );
234 itkGetConstMacro( UseMovingImageLimiter,
bool );
243 itkSetMacro( UseMovingImageDerivativeScales,
bool );
244 itkGetConstMacro( UseMovingImageDerivativeScales,
bool );
246 itkSetMacro( ScaleGradientWithRespectToMovingImageOrientation,
bool );
247 itkGetConstMacro( ScaleGradientWithRespectToMovingImageOrientation,
bool );
260 virtual void Initialize(
void )
throw ( ExceptionObject ) ITK_OVERRIDE;
271 itkSetMacro( UseMetricSingleThreaded,
bool );
272 itkGetConstReferenceMacro( UseMetricSingleThreaded,
bool );
273 itkBooleanMacro( UseMetricSingleThreaded );
277 itkSetMacro( UseMultiThread,
bool );
278 itkGetConstReferenceMacro( UseMultiThread,
bool );
279 itkBooleanMacro( UseMultiThread );
298 void PrintSelf( std::ostream & os, Indent indent )
const;
311 typedef BSplineInterpolateImageFunction<
314 typedef BSplineInterpolateImageFunction<
324 typedef GradientImageFilter<
433 PaddedGetValuePerThreadStruct );
435 AlignedGetValuePerThreadStruct );
446 itkPadStruct( ITK_CACHE_LINE_ALIGNMENT, GetValueAndDerivativePerThreadStruct,
447 PaddedGetValueAndDerivativePerThreadStruct );
449 AlignedGetValueAndDerivativePerThreadStruct );
465 itkSetMacro( UseImageSampler,
bool );
470 unsigned long wanted,
unsigned long found )
const;
555 itkSetMacro( UseFixedImageLimiter,
bool );
556 itkSetMacro( UseMovingImageLimiter,
bool );
579 #ifndef ITK_MANUAL_INSTANTIATION
580 #include "itkAdvancedImageToImageMetric.hxx"
583 #endif // end #ifndef __itkAdvancedImageToImageMetric_h
CentralDifferenceGradientFilterPointer m_CentralDifferenceGradientFilter
itkStaticConstMacro(FixedImageDimension, unsigned int, TFixedImage::ImageDimension)
SmartPointer< Self > Pointer
FixedImagePixelType m_FixedImageTrueMax
ReducedBSplineInterpolatorPointer m_ReducedBSplineInterpolator
Superclass::TransformParametersType TransformParametersType
DerivativeType::ValueType HessianValueType
bool m_UseFixedImageLimiter
virtual void AfterThreadedGetValue(MeasureType &value) const
AdvancedCombinationTransform< ScalarType, FixedImageDimension > CombinationTransformType
bool m_TransformIsAdvanced
virtual void CheckForBSplineInterpolator(void)
Superclass::FixedImageRegionType FixedImageRegionType
AdvancedImageToImageMetric Self
ImageSamplerType::Pointer ImageSamplerPointer
virtual void EvaluateTransformJacobianInnerProduct(const TransformJacobianType &jacobian, const MovingImageDerivativeType &movingImageDerivative, DerivativeType &imageJacobian) const
virtual void Initialize(void) ITK_OVERRIDE
Superclass::GradientImageType GradientImageType
AdvancedTransformType::Pointer m_AdvancedTransform
AdvancedBSplineDeformableTransform< ScalarType, FixedImageDimension, 1 > BSplineOrder1TransformType
AdvancedImageToImageMetric()
vnl_sparse_matrix< HessianValueType > HessianType
BSplineInterpolatorFloatType::Pointer BSplineInterpolatorFloatPointer
DerivativeType::ValueType DerivativeValueType
An extension of the ITK ImageToImageMetric. It is the intended base class for all elastix metrics.
virtual bool EvaluateTransformJacobian(const FixedImagePointType &fixedImagePoint, TransformJacobianType &jacobian, NonZeroJacobianIndicesType &nzji) const
AdvancedBSplineDeformableTransform< ScalarType, FixedImageDimension, 3 > BSplineOrder3TransformType
Superclass::DerivativeType DerivativeType
AdvancedTransformType::NumberOfParametersType NumberOfParametersType
virtual void ThreadedGetValue(ThreadIdType threadID)
Base class for all ITK limiter function objects.
virtual bool EvaluateMovingImageValueAndDerivative(const MovingImagePointType &mappedPoint, RealType &movingImageValue, MovingImageDerivativeType *gradient) const
ThreadIdType m_GetValueAndDerivativePerThreadVariablesSize
Superclass::OutputType OutputType
AlignedGetValuePerThreadStruct * m_GetValuePerThreadVariables
virtual void CheckForBSplineTransform(void) const
Evaluates the B-Spline interpolation of an image. Spline order may be from 0 to 5.
MovingImageLimiterPointer m_MovingImageLimiter
Superclass::CoordinateRepresentationType CoordinateRepresentationType
FixedImageLimiterType::Pointer FixedImageLimiterPointer
FixedImageLimiterOutputType m_FixedImageMaxLimit
FixedArray< double, Self::MovingImageDimension > MovingImageDerivativeScalesType
MovingImageLimiterType::OutputType MovingImageLimiterOutputType
BSplineInterpolatorType::CovariantVectorType MovingImageDerivativeType
virtual void ThreadedGetValueAndDerivative(ThreadIdType threadID)
virtual void CheckNumberOfSamples(unsigned long wanted, unsigned long found) const
CentralDifferenceGradientFilterType::Pointer CentralDifferenceGradientFilterPointer
Superclass::OutputPointType OutputPointType
Superclass::ParametersType ParametersType
LimiterFunctionBase< RealType, MovingImageDimension > MovingImageLimiterType
Superclass::GradientImageFilterType GradientImageFilterType
Linearly interpolate an image at specified positions.
Superclass::InterpolatorPointer InterpolatorPointer
virtual void ComputeMovingImageExtrema(const MovingImageType *image, const MovingImageRegionType ®ion)
virtual void InitializeImageSampler(void)
Superclass::GradientImagePointer GradientImagePointer
AdvancedBSplineDeformableTransform< ScalarType, FixedImageDimension, 2 > BSplineOrder2TransformType
ImageSamplerType::OutputVectorContainerType ImageSampleContainerType
itkStaticConstMacro(MovingImageDimension, unsigned int, TMovingImage::ImageDimension)
Superclass::InterpolatorType InterpolatorType
static ITK_THREAD_RETURN_TYPE GetValueAndDerivativeThreaderCallback(void *arg)
AdvancedImageToImageMetric(const Self &)
double m_RequiredRatioOfValidSamples
AdvancedTransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
Superclass::TransformJacobianType TransformJacobianType
AdvancedTransform< ScalarType, FixedImageDimension, MovingImageDimension > AdvancedTransformType
MovingImageDerivativeScalesType m_MovingImageDerivativeScales
double m_MovingLimitRangeRatio
Superclass::FixedImageMaskType FixedImageMaskType
FixedImageType::IndexType FixedImageIndexType
ReducedBSplineInterpolatorType::Pointer ReducedBSplineInterpolatorPointer
LinearInterpolatorType::Pointer LinearInterpolatorPointer
MovingImageType::RegionType MovingImageRegionType
AdvancedLinearInterpolateImageFunction< MovingImageType, CoordinateRepresentationType > LinearInterpolatorType
MovingImagePixelType m_MovingImageTrueMax
bool m_UseMovingImageDerivativeScales
FixedImageLimiterPointer m_FixedImageLimiter
virtual void InitializeLimiters(void)
LinearInterpolatorPointer m_LinearInterpolator
FixedImageType::Pointer FixedImagePointer
virtual void BeforeThreadedGetValueAndDerivative(const TransformParametersType ¶meters) const
Superclass::MovingImageMaskType MovingImageMaskType
static ITK_THREAD_RETURN_TYPE GetValueThreaderCallback(void *arg)
ReducedDimensionBSplineInterpolateImageFunction< MovingImageType, CoordinateRepresentationType, double > ReducedBSplineInterpolatorType
virtual void SetNumberOfThreads(ThreadIdType numberOfThreads)
Superclass::GradientImageFilterPointer GradientImageFilterPointer
Superclass::FixedImageType FixedImageType
itk::MultiThreader ThreaderType
MovingImageType::Pointer MovingImagePointer
AdvancedImageToImageMetric * st_Metric
Superclass::MovingImagePixelType MovingImagePixelType
TransformType::ScalarType ScalarType
virtual bool TransformPoint(const FixedImagePointType &fixedImagePoint, MovingImagePointType &mappedPoint) const
FixedImageType::PixelType FixedImagePixelType
virtual void ComputeFixedImageExtrema(const FixedImageType *image, const FixedImageRegionType ®ion)
ImageSamplerPointer m_ImageSampler
TransformType::InputPointType FixedImagePointType
FixedImageLimiterType::OutputType FixedImageLimiterOutputType
virtual bool IsInsideMovingMask(const MovingImagePointType &point) const
BSplineInterpolateImageFunction< MovingImageType, CoordinateRepresentationType, float > BSplineInterpolatorFloatType
SmartPointer< Self > Pointer
ImageToImageMetric< TFixedImage, TMovingImage > Superclass
itkAlignedTypedef(ITK_CACHE_LINE_ALIGNMENT, PaddedGetValueAndDerivativePerThreadStruct, AlignedGetValueAndDerivativePerThreadStruct)
SizeValueType st_NumberOfPixelsCounted
FixedImageLimiterOutputType m_FixedImageMinLimit
virtual void AfterThreadedGetValueAndDerivative(MeasureType &value, DerivativeType &derivative) const
ImageSamplerType::OutputVectorContainerPointer ImageSampleContainerPointer
LimiterFunctionBase< RealType, FixedImageDimension > FixedImageLimiterType
Superclass::RealType RealType
FixedImagePixelType m_FixedImageTrueMin
void LaunchGetValueThreaderCallback(void) const
bool m_UseMetricSingleThreaded
itkPadStruct(ITK_CACHE_LINE_ALIGNMENT, GetValueAndDerivativePerThreadStruct, PaddedGetValueAndDerivativePerThreadStruct)
MultiThreaderParameterType m_ThreaderMetricParameters
void LaunchGetValueAndDerivativeThreaderCallback(void) const
BSplineInterpolatorFloatPointer m_BSplineInterpolatorFloat
void operator=(const Self &)
InterpolatorType::ContinuousIndexType MovingImageContinuousIndexType
Superclass::MeasureType MeasureType
bool m_InterpolatorIsBSpline
double m_FixedLimitRangeRatio
Superclass::FixedImageMaskPointer FixedImageMaskPointer
TransformType::OutputPointType MovingImagePointType
BSplineOrder3TransformType::Pointer BSplineOrder3TransformPointer
virtual ImageSamplerType * GetImageSampler(void) const
BSplineOrder1TransformType::Pointer BSplineOrder1TransformPointer
Superclass::MovingImageMaskPointer MovingImageMaskPointer
virtual void CheckForAdvancedTransform(void)
DerivativeValueType * st_DerivativePointer
SmartPointer< Self > Pointer
MovingImageLimiterOutputType m_MovingImageMaxLimit
bool m_ScaleGradientWithRespectToMovingImageOrientation
virtual ~AdvancedImageToImageMetric()
itkAlignedTypedef(ITK_CACHE_LINE_ALIGNMENT, PaddedGetValuePerThreadStruct, AlignedGetValuePerThreadStruct)
SmartPointer< const Self > ConstPointer
itkPadStruct(ITK_CACHE_LINE_ALIGNMENT, GetValuePerThreadStruct, PaddedGetValuePerThreadStruct)
BSplineInterpolatorPointer m_BSplineInterpolator
Superclass::MovingImageType MovingImageType
bool m_InterpolatorIsReducedBSpline
bool m_TransformIsBSpline
virtual void GetSelfHessian(const TransformParametersType ¶meters, HessianType &H) const
This class is a base class for any image sampler.
BSplineInterpolateImageFunction< MovingImageType, CoordinateRepresentationType, double > BSplineInterpolatorType
BSplineInterpolatorType::Pointer BSplineInterpolatorPointer
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
bool m_InterpolatorIsBSplineFloat
Superclass::GradientPixelType GradientPixelType
AlignedGetValueAndDerivativePerThreadStruct * m_GetValueAndDerivativePerThreadVariables
GradientImageFilter< MovingImageType, RealType, RealType > CentralDifferenceGradientFilterType
DerivativeValueType st_NormalizationFactor
Superclass::TransformPointer TransformPointer
bool m_UseMovingImageLimiter
DerivativeType st_Derivative
bool m_InterpolatorIsLinear
Superclass::TransformType TransformType
MovingImageType::IndexType MovingImageIndexType
MovingImagePixelType m_MovingImageTrueMin
BSplineOrder2TransformType::Pointer BSplineOrder2TransformPointer
SizeValueType st_NumberOfPixelsCounted
void PrintSelf(std::ostream &os, Indent indent) const
FixedImageIndexType::IndexValueType FixedImageIndexValueType
MovingImageLimiterOutputType m_MovingImageMinLimit
ThreadIdType m_GetValuePerThreadVariablesSize
MovingImageLimiterType::Pointer MovingImageLimiterPointer
static ITK_THREAD_RETURN_TYPE AccumulateDerivativesThreaderCallback(void *arg)
Superclass::FixedImageConstPointer FixedImageConstPointer
Superclass::MovingImageConstPointer MovingImageConstPointer
Superclass::InputPointType InputPointType
ImageSamplerBase< FixedImageType > ImageSamplerType
virtual void SetTransform(AdvancedTransformType *arg)
const AdvancedTransformType * GetTransform(void) const ITK_OVERRIDE
virtual void InitializeThreadingParameters(void) const
ThreaderType::ThreadInfoStruct ThreadInfoType
Generated on OURCE_DATE_EPOCH for elastix by 1.8.18 |
|