template<class TFixedImage, class TMovingImage, class TVirtualImage = TFixedImage>
class itk::ANTSNeighborhoodCorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >
Computes normalized cross correlation using a small neighborhood for each voxel between two images, with speed optimizations for dense registration.
Please cite this reference for more details:
Brian B. Avants, Nicholas J. Tustison, Gang Song, Philip A. Cook, Arno Klein, James C. Gee, A reproducible evaluation of ANTs similarity metric performance in brain image registration, NeuroImage, Volume 54, Issue 3, 1 February 2011, Pages 2033-2044, ISSN 1053-8119, DOI: 10.1016/j.neuroimage.2010.09.025.
Around each voxel, the neighborhood is defined as a N-Dimensional rectangle centered at the voxel. The size of the rectangle is 2*radius+1. The normalized correlation between neighborhoods of fixed image and moving image are averaged over the whole image as the final metric.
- Note
- A radius less than 2 can be unstable. 2 is the default.
This class uses a specific fast implementation that is described in the above paper. There are two particular speed-ups:
1) It is assumed that the derivative is only affected by changes in the transform at the center of the window. This is obviously not true but speeds the evaluation up considerably and works well in practice. This assumption is the main differentiation of this approach from a more generic one.
2) The evaluation uses on-the-fly queues with multi-threading and a sliding neighborhood window. This is described in the above paper and specifically optimized for dense registration.
Example of usage:
typedef itk::ANTSNeighborhoodCorrelationImageToImageMetricv4 <ImageType, ImageType> MetricType; typedef MetricType::Pointer MetricTypePointer; MetricTypePointer metric = MetricType::New();
// set all parameters Size<Dimension> neighborhoodRadius; neighborhoodRadius.Fill(2); metric->SetRadius(neighborhood_radius); metric->SetFixedImage(fixedImage); metric->SetMovingImage(movingImage); metric->SetFixedTransform(transformFix); metric->SetMovingTransform(transformMov);
// initialization after parameters are set. metric->Initialize();
// getting derivative and metric value metric->GetValueAndDerivative(valueReturn, derivativeReturn);
This class is templated over the type of the two input objects. This is the base class for a hierarchy of similarity metrics that may, in derived classes, operate on meshes, images, etc. This class computes a value that measures the similarity between the two objects.
- Note
- Sparse sampling is not supported by this metric. An exception will be thrown if m_UseFixedSampledPointSet is set. Support for sparse sampling will require a parallel implementation of the neighborhood scanning, which currently caches information as the neighborhood window moves.
Definition at line 94 of file itkANTSNeighborhoodCorrelationImageToImageMetricv4.h.
|
typedef SmartPointer< const Self > | ConstPointer |
|
typedef Superclass::DerivativeType | DerivativeType |
|
typedef
Superclass::DerivativeValueType | DerivativeValueType |
|
typedef
Superclass::FixedImageGradientType | FixedImageGradientType |
|
typedef
FixedTransformType::JacobianType | FixedImageJacobianType |
|
typedef
Superclass::FixedImagePixelType | FixedImagePixelType |
|
typedef
Superclass::FixedImagePointType | FixedImagePointType |
|
typedef Superclass::FixedImageType | FixedImageType |
|
typedef
Superclass::FixedOutputPointType | FixedOutputPointType |
|
typedef
Superclass::FixedTransformType::JacobianType | FixedTransformJacobianType |
|
typedef
Superclass::FixedTransformType | FixedTransformType |
|
typedef
Superclass::ImageDimensionType | ImageDimensionType |
|
typedef
VirtualImageType::RegionType | ImageRegionType |
|
typedef VirtualImageType::IndexType | IndexType |
|
typedef
Superclass::InternalComputationValueType | InternalComputationValueType |
|
typedef Superclass::JacobianType | JacobianType |
|
typedef Superclass::MeasureType | MeasureType |
|
typedef
Superclass::MovingImageGradientType | MovingImageGradientType |
|
typedef
MovingTransformType::JacobianType | MovingImageJacobianType |
|
typedef
Superclass::MovingImagePixelType | MovingImagePixelType |
|
typedef
Superclass::MovingImagePointType | MovingImagePointType |
|
typedef Superclass::MovingImageType | MovingImageType |
|
typedef
Superclass::MovingOutputPointType | MovingOutputPointType |
|
typedef
Superclass::MovingTransformType::JacobianType | MovingTransformJacobianType |
|
typedef
Superclass::MovingTransformType | MovingTransformType |
|
typedef
Superclass::NumberOfParametersType | NumberOfParametersType |
|
typedef SmartPointer< Self > | Pointer |
|
typedef VirtualImageType::SizeType | RadiusType |
|
typedef
ANTSNeighborhoodCorrelationImageToImageMetricv4 | Self |
|
typedef ImageToImageMetricv4
< TFixedImage, TMovingImage,
TVirtualImage > | Superclass |
|
typedef
Superclass::VirtualImageGradientType | VirtualImageGradientType |
|
typedef
Superclass::VirtualImageType | VirtualImageType |
|
typedef
Superclass::VirtualPointType | VirtualPointType |
|
typedef SmartPointer< const Self > | ConstPointer |
|
typedef
Superclass::CoordinateRepresentationType | CoordinateRepresentationType |
|
typedef
MetricTraits::DefaultFixedImageGradientCalculator | DefaultFixedImageGradientCalculator |
|
typedef
MetricTraits::DefaultFixedImageGradientFilter | DefaultFixedImageGradientFilter |
|
typedef
MetricTraits::DefaultMovingImageGradientCalculator | DefaultMovingImageGradientCalculator |
|
typedef
MetricTraits::DefaultMovingImageGradientFilter | DefaultMovingImageGradientFilter |
|
typedef Superclass::DerivativeType | DerivativeType |
|
typedef DerivativeType::ValueType | DerivativeValueType |
|
typedef Superclass::DimensionType | DimensionType |
|
typedef
MetricTraits::FixedGradientPixelType | FixedGradientPixelType |
|
typedef CovariantVector
< typename
FixedImageGradientType::ValueType,
FixedImageDimension > | FixedImageComponentGradientType |
|
typedef
FixedImageType::ConstPointer | FixedImageConstPointer |
|
typedef
FixedImageGradientCalculatorType::Pointer | FixedImageGradientCalculatorPointer |
|
typedef
MetricTraits::FixedImageGradientCalculatorType | FixedImageGradientCalculatorType |
|
typedef
FixedImageGradientFilterType::Pointer | FixedImageGradientFilterPointer |
|
typedef
MetricTraits::FixedImageGradientFilterType | FixedImageGradientFilterType |
|
typedef
FixedImageGradientImageType::Pointer | FixedImageGradientImagePointer |
|
typedef
MetricTraits::FixedImageGradientImageType | FixedImageGradientImageType |
|
typedef
MetricTraits::FixedImageGradientType | FixedImageGradientType |
|
typedef FixedImageType::IndexType | FixedImageIndexType |
|
typedef
FixedImageMaskType::ConstPointer | FixedImageMaskConstPointer |
|
typedef FixedImageMaskType::Pointer | FixedImageMaskPointer |
|
typedef SpatialObject
< itkGetStaticConstMacro(FixedImageDimension) > | FixedImageMaskType |
|
typedef FixedImageType::PixelType | FixedImagePixelType |
|
typedef FixedImageType::Pointer | FixedImagePointer |
|
typedef FixedImageType::PointType | FixedImagePointType |
|
typedef TFixedImage | FixedImageType |
|
typedef
Superclass::FixedInputPointType | FixedInputPointType |
|
typedef
FixedInterpolatorType::Pointer | FixedInterpolatorPointer |
|
typedef
InterpolateImageFunction
< FixedImageType,
CoordinateRepresentationType > | FixedInterpolatorType |
|
typedef
Superclass::FixedOutputPointType | FixedOutputPointType |
|
typedef FixedImagePixelType | FixedPixelType |
|
typedef MetricTraits::FixedRealType | FixedRealType |
|
typedef
FixedSampledPointSetType::ConstPointer | FixedSampledPointSetConstPointer |
|
typedef
FixedSampledPointSetType::Pointer | FixedSampledPointSetPointer |
|
typedef PointSet< typename
FixedImageType::PixelType,
itkGetStaticConstMacro(FixedImageDimension)> | FixedSampledPointSetType |
|
typedef NumericTraits
< FixedRealType >
::ScalarRealType | FixedScalarRealType |
|
typedef
Superclass::FixedTransformJacobianType | FixedTransformJacobianType |
|
typedef
Superclass::FixedTransformParametersType | FixedTransformParametersType |
|
typedef
Superclass::FixedTransformPointer | FixedTransformPointer |
|
typedef
Superclass::FixedTransformType | FixedTransformType |
|
typedef
Superclass::GradientSourceType | GradientSourceType |
|
typedef Superclass::DimensionType | ImageDimensionType |
|
typedef
Superclass::InternalComputationValueType | InternalComputationValueType |
|
typedef Superclass::JacobianType | JacobianType |
|
typedef Superclass::MeasureType | MeasureType |
|
typedef
DefaultImageToImageMetricTraitsv4
< TFixedImage, TMovingImage,
TVirtualImage > | MetricTraits |
|
typedef
MetricTraits::MovingGradientPixelType | MovingGradientPixelType |
|
typedef CovariantVector
< typename
MovingImageGradientType::ValueType,
MovingImageDimension > | MovingImageComponentGradientType |
|
typedef
MovingImageType::ConstPointer | MovingImageConstPointer |
|
typedef
MovingImageGradientCalculatorType::Pointer | MovingImageGradientCalculatorPointer |
|
typedef
MetricTraits::MovingImageGradientCalculatorType | MovingImageGradientCalculatorType |
|
typedef
MovingImageGradientFilterType::Pointer | MovingImageGradientFilterPointer |
|
typedef
MetricTraits::MovingImageGradientFilterType | MovingImageGradientFilterType |
|
typedef
MovingImageGradientImageType::Pointer | MovingImageGradientImagePointer |
|
typedef
MetricTraits::MovingImageGradientImageType | MovingImageGradientImageType |
|
typedef
MetricTraits::MovingImageGradientType | MovingImageGradientType |
|
typedef MovingImageType::IndexType | MovingImageIndexType |
|
typedef
MovingImageMaskType::ConstPointer | MovingImageMaskConstPointer |
|
typedef
MovingImageMaskType::Pointer | MovingImageMaskPointer |
|
typedef SpatialObject
< itkGetStaticConstMacro(MovingImageDimension) > | MovingImageMaskType |
|
typedef MovingImageType::PixelType | MovingImagePixelType |
|
typedef MovingImageType::Pointer | MovingImagePointer |
|
typedef MovingImageType::PointType | MovingImagePointType |
|
typedef MovingImageType::RegionType | MovingImageRegionType |
|
typedef TMovingImage | MovingImageType |
|
typedef
Superclass::MovingInputPointType | MovingInputPointType |
|
typedef
MovingInterpolatorType::Pointer | MovingInterpolatorPointer |
|
typedef
InterpolateImageFunction
< MovingImageType,
CoordinateRepresentationType > | MovingInterpolatorType |
|
typedef
Superclass::MovingOutputPointType | MovingOutputPointType |
|
typedef MovingImagePixelType | MovingPixelType |
|
typedef
MetricTraits::MovingRealType | MovingRealType |
|
typedef NumericTraits
< MovingRealType >
::ScalarRealType | MovingScalarRealType |
|
typedef
Superclass::MovingTransformJacobianType | MovingTransformJacobianType |
|
typedef
Superclass::MovingTransformParametersType | MovingTransformParametersType |
|
typedef
Superclass::MovingTransformPointer | MovingTransformPointer |
|
typedef
Superclass::MovingTransformType | MovingTransformType |
|
typedef
Superclass::NumberOfParametersType | NumberOfParametersType |
|
typedef Superclass::ParametersType | ParametersType |
|
typedef
Superclass::ParametersValueType | ParametersValueType |
|
typedef SmartPointer< Self > | Pointer |
|
typedef ImageToImageMetricv4 | Self |
|
typedef ObjectToObjectMetric
< TFixedImage::ImageDimension,
TMovingImage::ImageDimension,
TVirtualImage > | Superclass |
|
typedef
Superclass::VirtualDirectionType | VirtualDirectionType |
|
typedef CovariantVector
< typename
VirtualImageGradientType::ValueType,
VirtualImageDimension > | VirtualImageComponentGradientType |
|
typedef
MetricTraits::VirtualImageGradientType | VirtualImageGradientType |
|
typedef
Superclass::VirtualImagePointer | VirtualImagePointer |
|
typedef
Superclass::VirtualImageType | VirtualImageType |
|
typedef
Superclass::VirtualIndexType | VirtualIndexType |
|
typedef
Superclass::VirtualPointType | VirtualOriginType |
|
typedef
Superclass::VirtualPixelType | VirtualPixelType |
|
typedef
Superclass::VirtualPointSetPointer | VirtualPointSetPointer |
|
typedef
Superclass::VirtualPointSetType | VirtualPointSetType |
|
typedef
Superclass::VirtualPointType | VirtualPointType |
|
typedef Superclass::VirtualSizeType | VirtualRadiusType |
|
typedef
Superclass::VirtualRegionType | VirtualRegionType |
|
typedef Superclass::VirtualSizeType | VirtualSizeType |
|
typedef
Superclass::VirtualSpacingType | VirtualSpacingType |
|
typedef SmartPointer< const Self > | ConstPointer |
|
typedef
Superclass::ParametersValueType | CoordinateRepresentationType |
|
typedef Superclass::DerivativeType | DerivativeType |
|
typedef
Superclass::DerivativeValueType | DerivativeValueType |
|
typedef SizeValueType | DimensionType |
|
typedef
FixedTransformType::InputPointType | FixedInputPointType |
|
typedef
FixedTransformType::OutputPointType | FixedOutputPointType |
|
typedef
FixedTransformType::JacobianType | FixedTransformJacobianType |
|
typedef
FixedTransformType::ParametersType | FixedTransformParametersType |
|
typedef FixedTransformType::Pointer | FixedTransformPointer |
|
typedef Transform
< ParametersValueType,
TVirtualImage::ImageDimension,
TFixedDimension > | FixedTransformType |
|
typedef
Superclass::InternalComputationValueType | InternalComputationValueType |
|
typedef
FixedTransformType::JacobianType | JacobianType |
|
typedef Superclass::MeasureType | MeasureType |
|
typedef
DisplacementFieldTransform
< CoordinateRepresentationType,
itkGetStaticConstMacro(MovingDimension) > | MovingDisplacementFieldTransformType |
|
typedef
MovingTransformType::InputPointType | MovingInputPointType |
|
typedef
MovingTransformType::OutputPointType | MovingOutputPointType |
|
typedef
MovingTransformType::JacobianType | MovingTransformJacobianType |
|
typedef
MovingTransformType::ParametersType | MovingTransformParametersType |
|
typedef
MovingTransformType::Pointer | MovingTransformPointer |
|
typedef Transform
< ParametersValueType,
TVirtualImage::ImageDimension,
TMovingDimension > | MovingTransformType |
|
typedef
Superclass::NumberOfParametersType | NumberOfParametersType |
|
typedef Superclass::ParametersType | ParametersType |
|
typedef
Superclass::ParametersValueType | ParametersValueType |
|
typedef SmartPointer< Self > | Pointer |
|
typedef ObjectToObjectMetric | Self |
|
typedef ObjectToObjectMetricBase | Superclass |
|
typedef
VirtualImageType::DirectionType | VirtualDirectionType |
|
typedef
VirtualImageType::ConstPointer | VirtualImageConstPointer |
|
typedef VirtualImageType::Pointer | VirtualImagePointer |
|
typedef TVirtualImage | VirtualImageType |
|
typedef VirtualImageType::IndexType | VirtualIndexType |
|
typedef VirtualImageType::PointType | VirtualOriginType |
|
typedef VirtualImageType::PixelType | VirtualPixelType |
|
typedef
VirtualPointSetType::Pointer | VirtualPointSetPointer |
|
typedef PointSet
< VirtualPixelType,
itkGetStaticConstMacro(VirtualDimension)> | VirtualPointSetType |
|
typedef VirtualImageType::PointType | VirtualPointType |
|
typedef VirtualImageType::SizeType | VirtualRadiusType |
|
typedef
VirtualImageType::RegionType | VirtualRegionType |
|
typedef VirtualRegionType::SizeType | VirtualSizeType |
|
typedef
VirtualImageType::SpacingType | VirtualSpacingType |
|
typedef SmartPointer< const Self > | ConstPointer |
|
typedef
Superclass::ParametersValueType | CoordinateRepresentationType |
|
typedef Superclass::DerivativeType | DerivativeType |
|
typedef DerivativeType::ValueType | DerivativeValueType |
|
enum | GradientSourceType {
GRADIENT_SOURCE_FIXED =0,
GRADIENT_SOURCE_MOVING,
GRADIENT_SOURCE_BOTH
} |
|
typedef double | InternalComputationValueType |
|
typedef Superclass::MeasureType | MeasureType |
|
typedef unsigned int | NumberOfParametersType |
|
typedef Superclass::ParametersType | ParametersType |
|
typedef
Superclass::ParametersValueType | ParametersValueType |
|
typedef SmartPointer< Self > | Pointer |
|
typedef ObjectToObjectMetricBase | Self |
|
typedef SingleValuedCostFunctionv4 | Superclass |
|
typedef SmartPointer< const Self > | ConstPointer |
|
typedef Array
< ParametersValueType > | DerivativeType |
|
typedef double | MeasureType |
|
typedef Superclass::ParametersType | ParametersType |
|
typedef
Superclass::ParametersValueType | ParametersValueType |
|
typedef SmartPointer< Self > | Pointer |
|
typedef SingleValuedCostFunctionv4 | Self |
|
typedef CostFunction | Superclass |
|
typedef SmartPointer< const Self > | ConstPointer |
|
typedef OptimizerParameters
< ParametersValueType > | ParametersType |
|
typedef double | ParametersValueType |
|
typedef SmartPointer< Self > | Pointer |
|
typedef CostFunction | Self |
|
typedef Object | Superclass |
|
typedef SmartPointer< const Self > | ConstPointer |
|
typedef SmartPointer< Self > | Pointer |
|
typedef Object | Self |
|
typedef LightObject | Superclass |
|
typedef SmartPointer< const Self > | ConstPointer |
|
typedef SmartPointer< Self > | Pointer |
|
typedef LightObject | Self |
|