18 #ifndef __itkImageToImageMetricv4_h
19 #define __itkImageToImageMetricv4_h
167 template<
typename TFixedImage,
typename TMovingImage,
typename TVirtualImage = TFixedImage,
168 typename TInternalComputationValueType = double,
169 typename TMetricTraits = DefaultImageToImageMetricTraitsv4< TFixedImage, TMovingImage, TVirtualImage, TInternalComputationValueType >
172 :
public ObjectToObjectMetric<TFixedImage::ImageDimension, TMovingImage::ImageDimension, TVirtualImage, TInternalComputationValueType>
324 typedef typename FixedImageGradientFilterType::Pointer
326 typedef typename MovingImageGradientFilterType::Pointer
336 typedef typename MetricTraits::FixedImageGradientCalculatorType
338 typedef typename MetricTraits::MovingImageGradientCalculatorType
341 typedef typename FixedImageGradientCalculatorType::Pointer
343 typedef typename MovingImageGradientCalculatorType::Pointer
403 itkSetMacro(UseFixedSampledPointSet,
bool);
404 itkGetConstReferenceMacro(UseFixedSampledPointSet,
bool);
405 itkBooleanMacro(UseFixedSampledPointSet);
427 itkSetMacro(UseFixedImageGradientFilter,
bool);
428 itkGetConstReferenceMacro(UseFixedImageGradientFilter,
bool);
429 itkBooleanMacro(UseFixedImageGradientFilter);
433 itkSetMacro(UseMovingImageGradientFilter,
bool);
434 itkGetConstReferenceMacro(UseMovingImageGradientFilter,
bool);
435 itkBooleanMacro(UseMovingImageGradientFilter);
478 itkSetMacro(UseFloatingPointCorrection,
bool);
479 itkGetConstReferenceMacro(UseFloatingPointCorrection,
bool);
480 itkBooleanMacro(UseFloatingPointCorrection);
515 itkGetConstReferenceMacro(NumberOfSkippedFixedSampledPoints,
SizeValueType);
600 itkGetConstMacro( ComputeDerivative,
bool );
622 typename DefaultFixedImageGradientFilter::Pointer
624 typename DefaultMovingImageGradientFilter::Pointer
629 typename DefaultFixedImageGradientCalculator::Pointer
631 typename DefaultMovingImageGradientCalculator::Pointer
672 typename FixedTransformType::OutputPointType &mappedFixedPoint)
const
677 template <
typename TVirtualPo
int>
679 typename FixedTransformType::OutputPointType &mappedFixedPoint)
const
681 typename FixedTransformType::OutputPointType localVirtualPoint;
684 localVirtualPoint.CastFrom(virtualPoint);
686 mappedFixedPoint = this->
m_FixedTransform->TransformPoint( localVirtualPoint );
689 template <
typename TFixedImagePo
int>
691 TFixedImagePoint &mappedFixedPoint)
const
693 typename FixedTransformType::OutputPointType localMappedFixedPoint;
694 localMappedFixedPoint.CastFrom(mappedFixedPoint);
695 localMappedFixedPoint = this->
m_FixedTransform->TransformPoint( virtualPoint );
696 mappedFixedPoint.CastFrom(localMappedFixedPoint);
699 template <
typename TVirtualPo
int,
typename TFixedImagePo
int>
701 TFixedImagePoint &mappedFixedPoint)
const
703 typename FixedTransformType::OutputPointType localVirtualPoint;
704 typename FixedTransformType::OutputPointType localMappedFixedPoint;
706 localVirtualPoint.CastFrom(virtualPoint);
707 localMappedFixedPoint.CastFrom(mappedFixedPoint);
709 localMappedFixedPoint = this->
m_FixedTransform->TransformPoint( localVirtualPoint );
710 mappedFixedPoint.CastFrom(localMappedFixedPoint);
735 #ifdef ITK_USE_CONCEPT_CHECKING
740 #endif // ITK_USE_CONCEPT_CHECKING
746 #ifndef ITK_MANUAL_INSTANTIATION
747 #include "itkImageToImageMetricv4.hxx"
FixedImageMaskConstPointer m_FixedImageMask
MovingImagePixelType MovingPixelType
Superclass::CoordinateRepresentationType CoordinateRepresentationType
void LocalTransformPoint(const typename FixedTransformType::OutputPointType &virtualPoint, typename FixedTransformType::OutputPointType &mappedFixedPoint) const
void LocalTransformPoint(const TVirtualPoint &virtualPoint, typename FixedTransformType::OutputPointType &mappedFixedPoint) const
MetricTraits::DefaultMovingImageGradientCalculator DefaultMovingImageGradientCalculator
Superclass::VirtualSpacingType VirtualSpacingType
virtual void ComputeMovingImageGradientFilterImage() const
Superclass::VirtualRegionType VirtualRegionType
SizeValueType GetNumberOfDomainPoints() const
SpatialObject< itkGetStaticConstMacro(MovingImageDimension) > MovingImageMaskType
MetricTraits::MovingRealType MovingRealType
virtual ThreadIdType GetMaximumNumberOfThreads() const
Superclass::VirtualPointSetType VirtualPointSetType
virtual void ComputeMovingImageGradientAtPoint(const MovingImagePointType &mappedPoint, MovingImageGradientType &gradient) const
ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, Self >::Pointer m_SparseGetValueAndDerivativeThreader
Superclass::DimensionType DimensionType
Superclass::MeasureType MeasureType
virtual void InitializeDefaultMovingImageGradientFilter(void)
FixedTransformType::ParametersType FixedTransformParametersType
Light weight base class for most itk classes.
void MapFixedSampledPointSetToVirtual(void)
Superclass::MovingTransformJacobianType MovingTransformJacobianType
PointSet< typename FixedImageType::PixelType, itkGetStaticConstMacro(FixedImageDimension)> FixedSampledPointSetType
bool TransformAndEvaluateFixedPoint(const VirtualPointType &virtualPoint, FixedImagePointType &mappedFixedPoint, FixedImagePixelType &mappedFixedPixelValue) const
Superclass::VirtualPointType VirtualOriginType
Superclass::JacobianType JacobianType
Superclass::NumberOfParametersType NumberOfParametersType
Superclass::MeasureType MeasureType
VirtualImageType::SpacingType VirtualSpacingType
TPixelType::ValueType ValueType
LinearInterpolateImageFunction< FixedImageGradientImageType, CoordinateRepresentationType > FixedImageGradientInterpolatorType
FixedImagePixelType FixedPixelType
bool m_UseFixedSampledPointSet
Superclass::VirtualIndexType VirtualIndexType
Superclass::FixedTransformPointer FixedTransformPointer
Transform< TInternalComputationValueType, TVirtualImage::ImageDimension, TFixedDimension > FixedTransformType
virtual void GetDerivative(DerivativeType &) const
MovingImageGradientFilterType::Pointer MovingImageGradientFilterPointer
virtual void ComputeFixedImageGradientFilterImage()
VirtualRegionType::SizeType VirtualSizeType
MetricTraits::MovingGradientPixelType MovingGradientPixelType
virtual void SetMaximumNumberOfThreads(const ThreadIdType threads)
Provides threading for ImageToImageMetricv4::GetValueAndDerivative.
Superclass::ParametersValueType ParametersValueType
TVirtualImage VirtualImageType
Superclass::FixedTransformType FixedTransformType
virtual bool SupportsArbitraryVirtualDomainSamples(void) const
DefaultFixedImageGradientCalculator::Pointer m_DefaultFixedImageGradientCalculator
Superclass::MovingTransformType MovingTransformType
Superclass::VirtualPixelType VirtualPixelType
MetricTraits::FixedGradientPixelType FixedGradientPixelType
SmartPointer< const Self > ConstPointer
TMovingImage MovingImageType
void operator=(const Self &)
MetricTraits::DefaultFixedImageGradientFilter DefaultFixedImageGradientFilter
DefaultMovingImageGradientFilter::Pointer m_DefaultMovingImageGradientFilter
FixedImageMaskType::ConstPointer FixedImageMaskConstPointer
Superclass::VirtualImagePointer VirtualImagePointer
Class for partitioning of an ImageRegion.
bool m_UseFloatingPointCorrection
FixedImageGradientCalculatorPointer m_FixedImageGradientCalculator
TInternalComputationValueType ParametersValueType
SizeValueType m_NumberOfSkippedFixedSampledPoints
CovariantVector< typename VirtualImageGradientType::ValueType, VirtualImageDimension > VirtualImageComponentGradientType
MovingInterpolatorType::Pointer MovingInterpolatorPointer
void PrintSelf(std::ostream &os, Indent indent) const
void LocalTransformPoint(const TVirtualPoint &virtualPoint, TFixedImagePoint &mappedFixedPoint) const
PixelTraits< FixedImagePixelType >::ValueType FixedImagePixelValueType
Superclass::DimensionType ImageDimensionType
DefaultFixedImageGradientFilter::Pointer m_DefaultFixedImageGradientFilter
bool m_HaveMadeGetValueWarning
MovingImageGradientFilterPointer m_MovingImageGradientFilter
Computes similarity between regions of two objects.
ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< VirtualImageDimension >, Self >::Pointer m_DenseGetValueAndDerivativeThreader
Superclass::NumberOfParametersType NumberOfParametersType
MetricTraits::FixedImageGradientType FixedImageGradientType
MovingImageType::ConstPointer MovingImageConstPointer
Superclass::VirtualDirectionType VirtualDirectionType
MetricTraits::FixedImageGradientFilterType FixedImageGradientFilterType
virtual void InitializeDefaultFixedImageGradientFilter(void)
void LocalTransformPoint(const typename FixedTransformType::OutputPointType &virtualPoint, TFixedImagePoint &mappedFixedPoint) const
Superclass::MovingOutputPointType MovingOutputPointType
unsigned long SizeValueType
FixedTransformType::OutputPointType FixedOutputPointType
DerivativeType::ValueType DerivativeValueType
Superclass::ParametersType ParametersType
LinearInterpolateImageFunction< MovingImageGradientImageType, CoordinateRepresentationType > MovingImageGradientInterpolatorType
TInternalComputationValueType CoordinateRepresentationType
MetricTraits::FixedRealType FixedRealType
Superclass::MovingTransformParametersType MovingTransformParametersType
DerivativeType * m_DerivativeResult
MetricTraits::DefaultMovingImageGradientFilter DefaultMovingImageGradientFilter
Superclass::MeasureType MeasureType
FixedImageGradientFilterType::Pointer FixedImageGradientFilterPointer
FixedImageType::PixelType FixedImagePixelType
MetricTraits::FixedImageGradientImageType FixedImageGradientImageType
SpatialObject< itkGetStaticConstMacro(FixedImageDimension) > FixedImageMaskType
Superclass::ParametersType ParametersType
FixedImageType::IndexType FixedImageIndexType
CovariantVector< typename MovingImageGradientType::ValueType, MovingImageDimension > MovingImageComponentGradientType
PixelTraits< MovingImagePixelType >::ValueType MovingImagePixelValueType
FixedTransformType::JacobianType JacobianType
Superclass::DerivativeType DerivativeType
MetricTraits m_MetricTraits
MovingImageMaskType::ConstPointer MovingImageMaskConstPointer
bool m_UseFixedImageGradientFilter
Superclass::VirtualPointType VirtualPointType
NumericTraits< MovingRealType >::ScalarRealType MovingScalarRealType
FixedImageGradientImageType::Pointer FixedImageGradientImagePointer
virtual ~ImageToImageMetricv4()
FixedImageGradientImagePointer m_FixedImageGradientImage
FixedTransformType::InputPointType FixedInputPointType
Superclass::VirtualPointSetPointer VirtualPointSetPointer
FixedInterpolatorPointer m_FixedInterpolator
VirtualImageType::IndexType VirtualIndexType
FixedImageGradientCalculatorType::Pointer FixedImageGradientCalculatorPointer
VirtualPointSetPointer m_VirtualSampledPointSet
VirtualImageType::PixelType VirtualPixelType
MovingImageGradientImagePointer m_MovingImageGradientImage
Transform< TInternalComputationValueType, TVirtualImage::ImageDimension, TMovingDimension > MovingTransformType
VirtualImageType::Pointer VirtualImagePointer
bool TransformAndEvaluateMovingPoint(const VirtualPointType &virtualPoint, MovingImagePointType &mappedMovingPoint, MovingImagePixelType &mappedMovingPixelValue) const
FixedImageMaskType::Pointer FixedImageMaskPointer
virtual void GetValueAndDerivative(MeasureType &value, DerivativeType &derivative) const
MovingImageGradientCalculatorType::Pointer MovingImageGradientCalculatorPointer
Superclass::DerivativeType DerivativeType
TInternalComputationValueType InternalComputationValueType
Implementation of the composite pattern.
MetricTraits::MovingImageGradientFilterType MovingImageGradientFilterType
Superclass::FixedTransformJacobianType FixedTransformJacobianType
MovingTransformType::OutputPointType MovingOutputPointType
MovingImageGradientInterpolatorType::Pointer m_MovingImageGradientInterpolator
A superclass of the N-dimensional mesh structure; supports point (geometric coordinate and attribute)...
SizeValueType DimensionType
FixedSampledPointSetConstPointer m_FixedSampledPointSet
static const DimensionType MovingImageDimension
MovingImageMaskConstPointer m_MovingImageMask
Standard exception handling object.
virtual void InitializeForIteration() const
static const DimensionType MovingDimension
FixedImageType::Pointer FixedImagePointer
VirtualImageType::PointType VirtualPointType
Superclass::FixedTransformParametersType FixedTransformParametersType
MovingInterpolatorPointer m_MovingInterpolator
ObjectToObjectMetric< TFixedImage::ImageDimension, TMovingImage::ImageDimension, TVirtualImage, TInternalComputationValueType > Superclass
VirtualImageType::DirectionType VirtualDirectionType
MetricTraits::MovingImageGradientCalculatorType MovingImageGradientCalculatorType
Superclass::MovingTransformPointer MovingTransformPointer
Partitions an indexed container.
NumericTraits< FixedRealType >::ScalarRealType FixedScalarRealType
Superclass::GradientSourceType GradientSourceType
InterpolateImageFunction< MovingImageType, CoordinateRepresentationType > MovingInterpolatorType
TInternalComputationValueType CoordinateRepresentationType
DerivativeType::ValueType DerivativeValueType
FixedImageConstPointer m_FixedImage
Linearly interpolate an image at specified positions.
MovingImageType::IndexType MovingImageIndexType
MovingImageType::PixelType MovingImagePixelType
Superclass::MovingInputPointType MovingInputPointType
FixedTransformPointer m_FixedTransform
virtual void ComputeFixedImageGradientAtPoint(const FixedImagePointType &mappedPoint, FixedImageGradientType &gradient) const
InterpolateImageFunction< FixedImageType, CoordinateRepresentationType > FixedInterpolatorType
Base class for all image interpolaters.
bool m_UseMovingImageGradientFilter
SmartPointer< Self > Pointer
FixedTransformType::JacobianType FixedTransformJacobianType
MovingTransformType::Pointer MovingTransformPointer
MovingImageType::PointType MovingImagePointType
MovingTransformType::InputPointType MovingInputPointType
VirtualPointSetType::Pointer VirtualPointSetPointer
MetricTraits::VirtualImageGradientType VirtualImageGradientType
Provides threading for ImageToImageMetricv4::GetValueAndDerivative.
MovingImageMaskType::Pointer MovingImageMaskPointer
FixedTransformType::Pointer FixedTransformPointer
Superclass::FixedOutputPointType FixedOutputPointType
FixedInterpolatorType::Pointer FixedInterpolatorPointer
DerivativeValueType m_FloatingPointCorrectionResolution
static const DimensionType VirtualDimension
MetricTraits::MovingImageGradientType MovingImageGradientType
PointSet< VirtualPixelType, itkGetStaticConstMacro(VirtualDimension)> VirtualPointSetType
virtual void Initialize(void)
FixedSampledPointSetType::Pointer FixedSampledPointSetPointer
Control indentation during Print() invocation.
MovingImageConstPointer m_MovingImage
virtual MeasureType GetValue() const
CovariantVector< typename FixedImageGradientType::ValueType, FixedImageDimension > FixedImageComponentGradientType
FixedImageType::ConstPointer FixedImageConstPointer
MovingImageType::Pointer MovingImagePointer
FixedImageGradientInterpolatorType::Pointer m_FixedImageGradientInterpolator
MovingImageType::RegionType MovingImageRegionType
MovingTransformType::ParametersType MovingTransformParametersType
ImageToImageMetricv4 Self
static const DimensionType FixedImageDimension
VirtualImageType::RegionType VirtualRegionType
FixedImageType::PointType FixedImagePointType
MovingImageGradientImageType::Pointer MovingImageGradientImagePointer
static const DimensionType VirtualImageDimension
#define itkConceptMacro(name, concept)
TFixedImage FixedImageType
A templated class holding a n-Dimensional covariant vector.
MetricTraits::MovingImageGradientImageType MovingImageGradientImageType
Superclass::VirtualSizeType VirtualRadiusType
MetricTraits::DefaultFixedImageGradientCalculator DefaultFixedImageGradientCalculator
virtual void GetValueAndDerivativeExecute() const
MovingTransformType::JacobianType MovingTransformJacobianType
TMetricTraits MetricTraits
virtual ThreadIdType GetNumberOfThreadsUsed() const
Superclass::VirtualSizeType VirtualSizeType
Superclass::FixedInputPointType FixedInputPointType
MovingImageGradientCalculatorPointer m_MovingImageGradientCalculator
DefaultMovingImageGradientCalculator::Pointer m_DefaultMovingImageGradientCalculator
MetricTraits::FixedImageGradientCalculatorType FixedImageGradientCalculatorType
FixedImageGradientFilterPointer m_FixedImageGradientFilter
Superclass::VirtualImageType VirtualImageType
Superclass::GradientSourceType GradientSourceType
static const DimensionType FixedDimension
unsigned int ThreadIdType
FixedSampledPointSetType::ConstPointer FixedSampledPointSetConstPointer