18#ifndef itkImageToImageMetricv4_h 
   19#define itkImageToImageMetricv4_h 
  168template <
typename TFixedImage,
 
  169          typename TMovingImage,
 
  170          typename TVirtualImage = TFixedImage,
 
  171          typename TInternalComputationValueType = double,
 
  172          typename TMetricTraits =
 
  176                                TMovingImage::ImageDimension,
 
  178                                TInternalComputationValueType>
 
  186                                          TMovingImage::ImageDimension,
 
  188                                          TInternalComputationValueType>;
 
  367    if (image != 
nullptr)
 
  373      itkExceptionStringMacro(
"Incorrect object type.  Should be an image.");
 
 
  382    if (image != 
nullptr)
 
  388      itkExceptionStringMacro(
"Incorrect object type.  Should be an image.");
 
 
  418#ifndef ITK_FUTURE_LEGACY_REMOVE 
  422    const auto * 
const constArg = arg;
 
  432#ifndef ITK_FUTURE_LEGACY_REMOVE 
  436    const auto * 
const constArg = arg;
 
  448#ifndef ITK_FUTURE_LEGACY_REMOVE 
  452    const auto * 
const constArg = arg;
 
  467  itkSetMacro(UseSampledPointSet, 
bool);
 
  468  itkGetConstReferenceMacro(UseSampledPointSet, 
bool);
 
  469  itkBooleanMacro(UseSampledPointSet);
 
  474  itkSetMacro(UseVirtualSampledPointSet, 
bool);
 
  475  itkGetConstReferenceMacro(UseVirtualSampledPointSet, 
bool);
 
  476  itkBooleanMacro(UseVirtualSampledPointSet);
 
  478#if !defined(ITK_LEGACY_REMOVE) 
  482  itkLegacyMacro(
virtual void SetUseFixedSampledPointSet(
bool v))
 
  486  itkLegacyMacro(
virtual bool GetUseFixedSampledPointSet() 
const)
 
  488    return this->GetUseSampledPointSet();
 
  490  itkLegacyMacro(
virtual void UseFixedSampledPointSetOn())
 
  492    return this->UseSampledPointSetOn();
 
  494  itkLegacyMacro(
virtual void UseFixedSampledPointSetOff())
 
  496    return this->UseSampledPointSetOff();
 
  518  itkSetMacro(UseFixedImageGradientFilter, 
bool);
 
  519  itkGetConstReferenceMacro(UseFixedImageGradientFilter, 
bool);
 
  520  itkBooleanMacro(UseFixedImageGradientFilter);
 
  524  itkSetMacro(UseMovingImageGradientFilter, 
bool);
 
  525  itkGetConstReferenceMacro(UseMovingImageGradientFilter, 
bool);
 
  526  itkBooleanMacro(UseMovingImageGradientFilter);
 
  543#if !defined(ITK_LEGACY_REMOVE) 
  549  itkLegacyMacro(
virtual ThreadIdType GetNumberOfThreadsUsed() 
const)
 
  561  itkLegacyMacro(
virtual void SetMaximumNumberOfThreads(
const ThreadIdType count))
 
  563    this->SetMaximumNumberOfWorkUnits(count);
 
  565  itkLegacyMacro(
virtual ThreadIdType GetMaximumNumberOfThreads() 
const)
 
  567    return this->GetMaximumNumberOfWorkUnits();
 
  611  itkSetMacro(UseFloatingPointCorrection, 
bool);
 
  612  itkGetConstReferenceMacro(UseFloatingPointCorrection, 
bool);
 
  613  itkBooleanMacro(UseFloatingPointCorrection);
 
  651  itkGetConstReferenceMacro(NumberOfSkippedFixedSampledPoints, 
SizeValueType);
 
  659  using typename Superclass::MetricCategoryType;
 
  665    return MetricCategoryType::IMAGE_METRIC;
 
 
  757  itkGetConstMacro(ComputeDerivative, 
bool);
 
  837  template <
typename TVirtualPo
int>
 
  844    localVirtualPoint.
CastFrom(virtualPoint);
 
  846    mappedFixedPoint = this->
m_FixedTransform->TransformPoint(localVirtualPoint);
 
 
  849  template <
typename TFixedImagePo
int>
 
  852                      TFixedImagePoint &                                   mappedFixedPoint)
 const 
  855    localMappedFixedPoint.
CastFrom(mappedFixedPoint);
 
  856    localMappedFixedPoint = this->
m_FixedTransform->TransformPoint(virtualPoint);
 
  857    mappedFixedPoint.CastFrom(localMappedFixedPoint);
 
 
  860  template <
typename TVirtualPo
int, 
typename TFixedImagePo
int>
 
  867    localVirtualPoint.
CastFrom(virtualPoint);
 
  868    localMappedFixedPoint.
CastFrom(mappedFixedPoint);
 
  870    localMappedFixedPoint = this->
m_FixedTransform->TransformPoint(localVirtualPoint);
 
  871    mappedFixedPoint.CastFrom(localMappedFixedPoint);
 
 
 
  902#ifndef ITK_MANUAL_INSTANTIATION 
  903#  include "itkImageToImageMetricv4.hxx" 
TInternalComputationValueType ValueType
 
OptimizerParameters< TInternalComputationValueType > ParametersType
 
TInternalComputationValueType ParametersValueType
 
A templated class holding a n-Dimensional covariant vector.
 
A simple structure holding type information for ImageToImageMetricv4 classes.
 
Provides threading for ImageToImageMetricv4::GetValueAndDerivative.
 
Provides threading for ImageToImageMetricv4::GetValueAndDerivative.
 
SpatialObject< Self::FixedImageDimension > FixedImageMaskType
 
void LocalTransformPoint(const TVirtualPoint &virtualPoint, TFixedImagePoint &mappedFixedPoint) const
 
bool m_UseVirtualSampledPointSet
 
MovingImageGradientCalculatorPointer m_MovingImageGradientCalculator
 
typename DerivativeType::ValueType DerivativeValueType
 
MetricTraits m_MetricTraits
 
static constexpr DimensionType FixedImageDimension
 
typename MetricTraits::DefaultFixedImageGradientCalculator DefaultFixedImageGradientCalculator
 
FixedImageConstPointer m_FixedImage
 
bool m_UseFixedImageGradientFilter
 
virtual void ComputeFixedImageGradientAtPoint(const FixedImagePointType &mappedPoint, FixedImageGradientType &gradient) const
 
~ImageToImageMetricv4() override=default
 
virtual void InitializeDefaultFixedImageGradientFilter()
 
virtual void ComputeMovingImageGradientFilterImage() const
 
typename MovingImageType::ConstPointer MovingImageConstPointer
 
typename PixelTraits< FixedImagePixelType >::ValueType FixedImagePixelValueType
 
typename MetricTraits::MovingImageGradientFilterType MovingImageGradientFilterType
 
static constexpr DimensionType MovingImageDimension
 
TMovingImage MovingImageType
 
DefaultMovingImageGradientFilter::Pointer m_DefaultMovingImageGradientFilter
 
typename MetricTraits::MovingImageGradientImageType MovingImageGradientImageType
 
typename MovingImageType::PointType MovingImagePointType
 
ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< VirtualImageDimension >, Self >::Pointer m_DenseGetValueAndDerivativeThreader
 
SmartPointer< const Self > ConstPointer
 
typename Superclass::VirtualImageType VirtualImageType
 
SizeValueType m_NumberOfSkippedFixedSampledPoints
 
typename MetricTraits::DefaultFixedImageGradientFilter DefaultFixedImageGradientFilter
 
MovingImageGradientFilterPointer m_MovingImageGradientFilter
 
virtual void InitializeForIteration() const
 
typename MovingImageType::Pointer MovingImagePointer
 
TInternalComputationValueType InternalComputationValueType
 
typename FixedImageGradientImageType::Pointer FixedImageGradientImagePointer
 
typename PixelTraits< MovingImagePixelType >::ValueType MovingImagePixelValueType
 
typename FixedImageMaskType::Pointer FixedImageMaskPointer
 
ObjectToObjectMetric< TFixedImage::ImageDimension, TMovingImage::ImageDimension, TVirtualImage, TInternalComputationValueType > Superclass
 
typename FixedImageType::PixelType FixedImagePixelType
 
MovingImageGradientInterpolatorType::Pointer m_MovingImageGradientInterpolator
 
void Initialize() override
 
DerivativeValueType m_FloatingPointCorrectionResolution
 
virtual void SetUseSampledPointSet(bool _arg)
 
bool m_HaveMadeGetValueWarning
 
CovariantVector< typename MovingImageGradientType::ValueType, MovingImageDimension > MovingImageComponentGradientType
 
MovingImagePixelType MovingPixelType
 
virtual void SetMovingImageMask(const MovingImageMaskType *_arg)
 
FixedImagePixelType FixedPixelType
 
void MapFixedSampledPointSetToVirtual()
 
typename Superclass::VirtualSizeType VirtualRadiusType
 
typename MetricTraits::DefaultMovingImageGradientCalculator DefaultMovingImageGradientCalculator
 
typename MovingImageGradientCalculatorType::Pointer MovingImageGradientCalculatorPointer
 
virtual void SetFixedImageMask(const FixedImageMaskType *_arg)
 
bool TransformAndEvaluateFixedPoint(const VirtualPointType &virtualPoint, FixedImagePointType &mappedFixedPoint, FixedImagePixelType &mappedFixedPixelValue) const
 
void SetFixedObject(const ObjectType *object) override
 
MetricCategoryType GetMetricCategory() const override
 
TMetricTraits MetricTraits
 
DerivativeType * m_DerivativeResult
 
MeasureType GetValue() const override
 
typename NumericTraits< MovingRealType >::ScalarRealType MovingScalarRealType
 
void GetDerivative(DerivativeType &) const override
 
CovariantVector< typename FixedImageGradientType::ValueType, FixedImageDimension > FixedImageComponentGradientType
 
typename MetricTraits::FixedImageGradientImageType FixedImageGradientImageType
 
MovingImageConstPointer m_MovingImage
 
typename MovingImageGradientImageType::Pointer MovingImageGradientImagePointer
 
SpatialObject< Self::MovingImageDimension > MovingImageMaskType
 
virtual void SetMaximumNumberOfWorkUnits(const ThreadIdType number)
 
FixedImageGradientCalculatorPointer m_FixedImageGradientCalculator
 
typename FixedImageGradientCalculatorType::Pointer FixedImageGradientCalculatorPointer
 
void GetValueAndDerivative(MeasureType &value, DerivativeType &derivative) const override
 
DefaultMovingImageGradientCalculator::Pointer m_DefaultMovingImageGradientCalculator
 
LinearInterpolateImageFunction< FixedImageGradientImageType, CoordinateRepresentationType > FixedImageGradientInterpolatorType
 
typename FixedImageMaskType::ConstPointer FixedImageMaskConstPointer
 
SizeValueType GetNumberOfDomainPoints() const
 
TFixedImage FixedImageType
 
virtual void ComputeFixedImageGradientFilterImage()
 
virtual void GetValueAndDerivativeExecute() const
 
typename MetricTraits::DefaultMovingImageGradientFilter DefaultMovingImageGradientFilter
 
typename FixedImageType::PointType FixedImagePointType
 
typename MovingImageType::RegionType MovingImageRegionType
 
typename MetricTraits::VirtualImageGradientType VirtualImageGradientType
 
typename MetricTraits::FixedGradientPixelType FixedGradientPixelType
 
virtual void SetFixedImage(const FixedImageType *_arg)
 
typename MovingInterpolatorType::Pointer MovingInterpolatorPointer
 
bool TransformAndEvaluateMovingPoint(const VirtualPointType &virtualPoint, MovingImagePointType &mappedMovingPoint, MovingImagePixelType &mappedMovingPixelValue) const
 
typename MetricTraits::MovingImageGradientCalculatorType MovingImageGradientCalculatorType
 
typename MetricTraits::MovingRealType MovingRealType
 
typename FixedImageType::Pointer FixedImagePointer
 
LinearInterpolateImageFunction< MovingImageGradientImageType, CoordinateRepresentationType > MovingImageGradientInterpolatorType
 
typename FixedSampledPointSetType::ConstPointer FixedSampledPointSetConstPointer
 
MovingImageGradientImagePointer m_MovingImageGradientImage
 
DefaultFixedImageGradientCalculator::Pointer m_DefaultFixedImageGradientCalculator
 
void LocalTransformPoint(const typename FixedTransformType::OutputPointType &virtualPoint, typename FixedTransformType::OutputPointType &mappedFixedPoint) const
 
void LocalTransformPoint(const TVirtualPoint &virtualPoint, typename FixedTransformType::OutputPointType &mappedFixedPoint) const
 
bool m_UseSampledPointSet
 
ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, Self >::Pointer m_SparseGetValueAndDerivativeThreader
 
virtual ThreadIdType GetMaximumNumberOfWorkUnits() const
 
FixedImageGradientImagePointer m_FixedImageGradientImage
 
typename MetricTraits::FixedImageGradientCalculatorType FixedImageGradientCalculatorType
 
FixedImageGradientFilterPointer m_FixedImageGradientFilter
 
CovariantVector< typename VirtualImageGradientType::ValueType, VirtualImageDimension > VirtualImageComponentGradientType
 
typename MetricTraits::MovingImageGradientType MovingImageGradientType
 
FixedImageGradientInterpolatorType::Pointer m_FixedImageGradientInterpolator
 
ImageToImageMetricv4 Self
 
virtual void SetMovingImage(const MovingImageType *_arg)
 
typename MetricTraits::FixedImageGradientFilterType FixedImageGradientFilterType
 
void LocalTransformPoint(const typename FixedTransformType::OutputPointType &virtualPoint, TFixedImagePoint &mappedFixedPoint) const
 
typename MovingImageType::IndexType MovingImageIndexType
 
typename MovingImageType::PixelType MovingImagePixelType
 
void PrintSelf(std::ostream &os, Indent indent) const override
 
PointSet< typename FixedImageType::PixelType, Self::FixedImageDimension > FixedSampledPointSetType
 
void SetMovingObject(const ObjectType *object) override
 
InterpolateImageFunction< FixedImageType, CoordinateRepresentationType > FixedInterpolatorType
 
bool SupportsArbitraryVirtualDomainSamples() const override
 
static constexpr DimensionType VirtualImageDimension
 
FixedInterpolatorPointer m_FixedInterpolator
 
typename FixedImageGradientFilterType::Pointer FixedImageGradientFilterPointer
 
virtual void FinalizeThread(const ThreadIdType)
 
FixedSampledPointSetConstPointer m_FixedSampledPointSet
 
SmartPointer< Self > Pointer
 
MovingImageMaskConstPointer m_MovingImageMask
 
bool m_UseMovingImageGradientFilter
 
MovingInterpolatorPointer m_MovingInterpolator
 
typename Superclass::VirtualPointType VirtualOriginType
 
typename MetricTraits::MovingGradientPixelType MovingGradientPixelType
 
typename Superclass::DimensionType ImageDimensionType
 
bool m_UseFloatingPointCorrection
 
InterpolateImageFunction< MovingImageType, CoordinateRepresentationType > MovingInterpolatorType
 
typename FixedInterpolatorType::Pointer FixedInterpolatorPointer
 
typename MovingImageMaskType::ConstPointer MovingImageMaskConstPointer
 
typename Superclass::ObjectType ObjectType
 
typename MetricTraits::FixedRealType FixedRealType
 
typename FixedSampledPointSetType::Pointer FixedSampledPointSetPointer
 
virtual ThreadIdType GetNumberOfWorkUnitsUsed() const
 
typename NumericTraits< FixedRealType >::ScalarRealType FixedScalarRealType
 
DefaultFixedImageGradientFilter::Pointer m_DefaultFixedImageGradientFilter
 
typename FixedImageType::ConstPointer FixedImageConstPointer
 
VirtualPointSetPointer m_VirtualSampledPointSet
 
typename FixedImageType::IndexType FixedImageIndexType
 
typename MovingImageMaskType::Pointer MovingImageMaskPointer
 
FixedImageMaskConstPointer m_FixedImageMask
 
virtual void SetFixedSampledPointSet(const FixedSampledPointSetType *_arg)
 
virtual void ComputeMovingImageGradientAtPoint(const MovingImagePointType &mappedPoint, MovingImageGradientType &gradient) const
 
typename MovingImageGradientFilterType::Pointer MovingImageGradientFilterPointer
 
virtual void InitializeDefaultMovingImageGradientFilter()
 
typename MetricTraits::FixedImageGradientType FixedImageGradientType
 
Control indentation during Print() invocation.
 
Base class for all image interpolators.
 
SmartPointer< Self > Pointer
 
Linearly interpolate an image at specified positions.
 
SmartPointer< Self > Pointer
 
Array< TInternalComputationValueType > DerivativeType
 
TInternalComputationValueType MeasureType
 
FixedTransformPointer m_FixedTransform
 
typename VirtualRegionType::SizeType VirtualSizeType
 
static constexpr DimensionType MovingDimension
 
typename MovingTransformType::OutputPointType MovingOutputPointType
 
typename VirtualImageType::DirectionType VirtualDirectionType
 
TInternalComputationValueType CoordinateRepresentationType
 
typename VirtualImageType::IndexType VirtualIndexType
 
static constexpr DimensionType FixedDimension
 
typename FixedTransformType::JacobianType JacobianType
 
typename MovingTransformType::ParametersType MovingTransformParametersType
 
typename Superclass::Object ObjectType
 
typename MovingTransformType::Pointer MovingTransformPointer
 
typename MovingTransformType::JacobianType MovingTransformJacobianType
 
SizeValueType DimensionType
 
typename FixedTransformType::OutputPointType FixedOutputPointType
 
itk::ObjectToObjectMetricBaseTemplateEnums::GradientSource GradientSourceEnum
 
typename VirtualImageType::PixelType VirtualPixelType
 
typename FixedTransformType::ParametersType FixedTransformParametersType
 
Transform< TInternalComputationValueType, TVirtualImage::ImageDimension, TMovingDimension > MovingTransformType
 
typename MovingTransformType::InputPointType MovingInputPointType
 
typename VirtualImageType::Pointer VirtualImagePointer
 
PointSet< VirtualPixelType, Self::VirtualDimension > VirtualPointSetType
 
typename VirtualPointSetType::Pointer VirtualPointSetPointer
 
typename FixedTransformType::InputPointType FixedInputPointType
 
typename VirtualImageType::PointType VirtualPointType
 
typename FixedTransformType::Pointer FixedTransformPointer
 
Transform< TInternalComputationValueType, TVirtualImage::ImageDimension, TFixedDimension > FixedTransformType
 
typename VirtualImageType::RegionType VirtualRegionType
 
typename VirtualImageType::SpacingType VirtualSpacingType
 
static constexpr DimensionType VirtualDimension
 
typename FixedTransformType::JacobianType FixedTransformJacobianType
 
TVirtualImage VirtualImageType
 
unsigned int NumberOfParametersType
 
typename TPixelType::ValueType ValueType
 
A superclass of the N-dimensional mesh structure; supports point (geometric coordinate and attribute)...
 
SmartPointer< Self > Pointer
 
SmartPointer< const Self > ConstPointer
 
void CastFrom(const Point< TCoordinateB, VPointDimension > &pa)
 
Array< TInternalComputationValueType > DerivativeType
 
TInternalComputationValueType MeasureType
 
Implements transparent reference counting.
 
Implementation of the composite pattern.
 
SmartPointer< const Self > ConstPointer
 
SmartPointer< Self > Pointer
 
Class for partitioning of an ImageRegion.
 
Partitions an indexed container.
 
#define itkConceptMacro(name, concept)
 
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
 
unsigned int ThreadIdType
 
unsigned long SizeValueType