ITK  5.0.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | List of all members
itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField > Class Template Reference

#include <itkVariationalRegistrationNCCFunction.h>

+ Inheritance diagram for itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >:
+ Collaboration diagram for itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >:

Detailed Description

template<typename TFixedImage, typename TMovingImage, typename TDisplacementField>
class itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >

This class computes NCC forces in the variational registration framework.

This class implements NCC forces as given in Hermosillo, Chefd'Hotel, and Faugeras. "Variational methods for multimodal image matching." IJCV 50(3), 2002: 329-343 and Avants et al. "Symmetric diffeomorphic image registration with cross-correlation: evaluating automated labeling of elderly and neurodegenerative brain." Medical image analysis 12(1), 2008: 26-41 (except Jacobian term). We define the derivative of NCC between two images as:

\[ f^{NCC}(x)=\tau\kappa\frac{2\sum_w (F-\bar{F})(M-\bar{M})}{\sum_w (F-\bar{F})^2\ \sum_w (M-\bar{M})^2}\left((M-\bar{M}) - \frac{\sum_w (F-\bar{F})(M-\bar{M})}{\sum_w (F-\bar{F})^2}(F-\bar{F})\right) \nabla M(x+u(x)) \]

$\tau$ is the step size and $\kappa$ is the mean squared spacing. Use SetRadius() (see FiniteDifferenceFunction) to set the size of the neighbourhood to compute local mean values $\bar{F}$ and $\bar{M}$ and the local sums. Alternative, the classical gradient $\nabla M(x+u(x))$ can be replaced by $\nabla F(x)$ or $\frac{\nabla F(x) + \nabla M(x+u(x))}{2}$.

See Also
VariationalRegistrationFilter
VariationalRegistrationFunction
Note
This class was developed with funding from the German Research Foundation (DFG: EH 224/3-1 and HA 235/9-1).
Author
Alexander Schmidt-Richberg
Rene Werner
Jan Ehrhardt

Definition at line 64 of file itkVariationalRegistrationNCCFunction.h.

Public Types

using ConstPointer = SmartPointer< const Self >
 
using DisplacementFieldType = typename Superclass::DisplacementFieldType
 
using DisplacementFieldTypePointer = typename Superclass::DisplacementFieldTypePointer
 
using FixedImagePointer = typename Superclass::FixedImagePointer
 
using FixedImageType = typename Superclass::FixedImageType
 
using FloatOffsetType = typename Superclass::FloatOffsetType
 
using GradientCalculatorPointer = typename GradientCalculatorType::Pointer
 
using GradientCalculatorType = CentralDifferenceImageFunction< FixedImageType >
 
using IndexType = typename FixedImageType::IndexType
 
using MaskImagePointer = typename Superclass::MaskImagePointer
 
using MaskImageType = typename Superclass::MaskImageType
 
using MovingImagePointer = typename Superclass::MovingImagePointer
 
using MovingImageType = typename Superclass::MovingImageType
 
using NeighborhoodType = typename Superclass::NeighborhoodType
 
using PixelType = typename Superclass::PixelType
 
using Pointer = SmartPointer< Self >
 
using RadiusType = typename Superclass::RadiusType
 
using Self = VariationalRegistrationNCCFunction
 
using SizeType = typename FixedImageType::SizeType
 
using SpacingType = typename FixedImageType::SpacingType
 
using Superclass = VariationalRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField >
 
- Public Types inherited from itk::VariationalRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField >
using ConstPointer = SmartPointer< const Self >
 
using DisplacementFieldType = TDisplacementField
 
using DisplacementFieldTypePointer = typename DisplacementFieldType::ConstPointer
 
using FixedImagePointer = typename FixedImageType::ConstPointer
 
using FixedImageType = TFixedImage
 
using MaskImagePixelType = unsigned char
 
using MaskImagePointer = typename MaskImageType::ConstPointer
 
using MaskImageType = Image< MaskImagePixelType, ImageDimension >
 
using MovingImagePointer = typename MovingImageType::ConstPointer
 
using MovingImageType = TMovingImage
 
using MovingImageWarperPointer = typename MovingImageWarperType::Pointer
 
using MovingImageWarperType = itk::ContinuousBorderWarpImageFilter< FixedImageType, WarpedImageType, DisplacementFieldType >
 
using Pointer = SmartPointer< Self >
 
using Self = VariationalRegistrationFunction
 
using Superclass = FiniteDifferenceFunction< TDisplacementField >
 
using TimeStepType = typename Superclass::TimeStepType
 
using WarpedImagePointer = typename WarpedImageType::ConstPointer
 
using WarpedImageType = TFixedImage
 
- Public Types inherited from itk::FiniteDifferenceFunction< TDisplacementField >
using ConstPointer = SmartPointer< const Self >
 
using DefaultBoundaryConditionType = ZeroFluxNeumannBoundaryCondition< ImageType >
 
using FloatOffsetType = Vector< float, Self::ImageDimension >
 
using ImageType = TDisplacementField
 
using NeighborhoodScalesType = Vector< PixelRealType, Self::ImageDimension >
 
using NeighborhoodType = ConstNeighborhoodIterator< TDisplacementField, DefaultBoundaryConditionType >
 
using PixelRealType = double
 
using PixelType = typename ImageType::PixelType
 
using Pointer = SmartPointer< Self >
 
using RadiusType = typename ConstNeighborhoodIterator< TDisplacementField >::RadiusType
 
using Self = FiniteDifferenceFunction
 
using Superclass = LightObject
 
using TimeStepType = double
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightObject
 

Public Member Functions

Superclass::TimeStepType ComputeGlobalTimeStep (void *) const override
 
PixelType ComputeUpdate (const NeighborhoodType &neighborhood, void *globalData, const FloatOffsetType &offset=FloatOffsetType(0.0)) override
 
virtual ::itk::LightObject::Pointer CreateAnother () const
 
virtual const char * GetNameOfClass () const
 
void InitializeIteration () override
 
virtual void SetGradientTypeToFixedImage ()
 
virtual void SetGradientTypeToSymmetric ()
 
virtual void SetGradientTypeToWarpedMovingImage ()
 
- Public Member Functions inherited from itk::VariationalRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField >
virtual const
DisplacementFieldType
GetDisplacementField (void) const
 
virtual const FixedImageTypeGetFixedImage (void) const
 
void * GetGlobalDataPointer () const override
 
virtual MaskImagePixelType GetMaskBackgroundThreshold (void) const
 
virtual const MaskImageTypeGetMaskImage (void) const
 
virtual double GetMetric () const
 
virtual const MovingImageTypeGetMovingImage (void) const
 
virtual const
MovingImageWarperType
GetMovingImageWarper (void) const
 
virtual double GetRMSChange () const
 
virtual const TimeStepType GetTimeStep (void) const
 
void ReleaseGlobalDataPointer (void *GlobalData) const override
 
virtual void SetDisplacementField (DisplacementFieldType *ptr)
 
virtual void SetFixedImage (const FixedImageType *ptr)
 
virtual void SetMaskBackgroundThreshold (MaskImagePixelType threshold)
 
virtual void SetMaskImage (const MaskImageType *ptr)
 
virtual void SetMovingImage (const MovingImageType *ptr)
 
virtual void SetMovingImageWarper (MovingImageWarperType *ptr)
 
virtual void SetTimeStep (TimeStepType timeStep)
 
- Public Member Functions inherited from itk::FiniteDifferenceFunction< TDisplacementField >
const NeighborhoodScalesType ComputeNeighborhoodScales () const
 
virtual PixelType ComputeUpdate (const NeighborhoodType &neighborhood, void *globalData, const FloatOffsetType &offset=FloatOffsetType(0.0))=0
 
const RadiusTypeGetRadius () const
 
void GetScaleCoefficients (PixelRealType vals[ImageDimension]) const
 
void SetRadius (const RadiusType &r)
 
void SetScaleCoefficients (PixelRealType vals[ImageDimension])
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 
virtual void Register () const
 
virtual void SetReferenceCount (int)
 
virtual void UnRegister () const noexcept
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Static Public Attributes

static constexpr unsigned int ImageDimension = Superclass::ImageDimension
 
- Static Public Attributes inherited from itk::VariationalRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField >
static constexpr unsigned int ImageDimension = Superclass::ImageDimension
 
- Static Public Attributes inherited from itk::FiniteDifferenceFunction< TDisplacementField >
static constexpr unsigned int ImageDimension
 

Protected Types

using FixedImageNeighborhoodIteratorType = ConstNeighborhoodIterator< FixedImageType >
 
using GlobalDataStruct = typename Superclass::GlobalDataStruct
 
enum  GradientType {
  GRADIENT_TYPE_WARPED = 0,
  GRADIENT_TYPE_FIXED = 1,
  GRADIENT_TYPE_SYMMETRIC = 2
}
 

Protected Member Functions

void PrintSelf (std::ostream &os, Indent indent) const override
 
 VariationalRegistrationNCCFunction ()
 
 ~VariationalRegistrationNCCFunction () override
 
- Protected Member Functions inherited from itk::VariationalRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField >
virtual const WarpedImagePointer GetWarpedImage (void) const
 
 VariationalRegistrationFunction ()
 
virtual void WarpMovingImage (void)
 
 ~VariationalRegistrationFunction () override
 
- Protected Member Functions inherited from itk::FiniteDifferenceFunction< TDisplacementField >
 FiniteDifferenceFunction ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
 ~FiniteDifferenceFunction () override=default
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Protected Attributes

GradientCalculatorPointer m_FixedImageGradientCalculator
 
GradientType m_GradientType
 
double m_Normalizer
 
GradientCalculatorPointer m_WarpedImageGradientCalculator
 
- Protected Attributes inherited from itk::FiniteDifferenceFunction< TDisplacementField >
RadiusType m_Radius
 
PixelRealType m_ScaleCoefficients [ImageDimension]
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount
 

Member Typedef Documentation

template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
using itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::ConstPointer = SmartPointer< const Self >

Definition at line 74 of file itkVariationalRegistrationNCCFunction.h.

template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
using itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::DisplacementFieldType = typename Superclass::DisplacementFieldType

Deformation field type.

Definition at line 102 of file itkVariationalRegistrationNCCFunction.h.

template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
using itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::DisplacementFieldTypePointer = typename Superclass::DisplacementFieldTypePointer

Definition at line 103 of file itkVariationalRegistrationNCCFunction.h.

template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
using itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::FixedImageNeighborhoodIteratorType = ConstNeighborhoodIterator<FixedImageType>
protected

FixedImage image neighborhood iterator type.

Definition at line 151 of file itkVariationalRegistrationNCCFunction.h.

template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
using itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::FixedImagePointer = typename Superclass::FixedImagePointer

Definition at line 91 of file itkVariationalRegistrationNCCFunction.h.

template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
using itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::FixedImageType = typename Superclass::FixedImageType

FixedImage image type.

Definition at line 90 of file itkVariationalRegistrationNCCFunction.h.

template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
using itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::FloatOffsetType = typename Superclass::FloatOffsetType

Definition at line 109 of file itkVariationalRegistrationNCCFunction.h.

template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
using itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::GlobalDataStruct = typename Superclass::GlobalDataStruct
protected

Definition at line 153 of file itkVariationalRegistrationNCCFunction.h.

template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
using itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::GradientCalculatorPointer = typename GradientCalculatorType::Pointer

Definition at line 113 of file itkVariationalRegistrationNCCFunction.h.

template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
using itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::GradientCalculatorType = CentralDifferenceImageFunction<FixedImageType>

Gradient calculator type.

Definition at line 112 of file itkVariationalRegistrationNCCFunction.h.

template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
using itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::IndexType = typename FixedImageType::IndexType

Definition at line 97 of file itkVariationalRegistrationNCCFunction.h.

template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
using itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::MaskImagePointer = typename Superclass::MaskImagePointer

Definition at line 95 of file itkVariationalRegistrationNCCFunction.h.

template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
using itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::MaskImageType = typename Superclass::MaskImageType

MaskImage image type.

Definition at line 94 of file itkVariationalRegistrationNCCFunction.h.

template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
using itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::MovingImagePointer = typename Superclass::MovingImagePointer

Definition at line 87 of file itkVariationalRegistrationNCCFunction.h.

template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
using itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::MovingImageType = typename Superclass::MovingImageType

MovingImage image type.

Definition at line 86 of file itkVariationalRegistrationNCCFunction.h.

template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
using itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::NeighborhoodType = typename Superclass::NeighborhoodType

Definition at line 108 of file itkVariationalRegistrationNCCFunction.h.

template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
using itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::PixelType = typename Superclass::PixelType

Inherit some types from the superclass.

Definition at line 106 of file itkVariationalRegistrationNCCFunction.h.

template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
using itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::Pointer = SmartPointer< Self >

Definition at line 73 of file itkVariationalRegistrationNCCFunction.h.

template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
using itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::RadiusType = typename Superclass::RadiusType

Definition at line 107 of file itkVariationalRegistrationNCCFunction.h.

template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
using itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::Self = VariationalRegistrationNCCFunction

Standard class type alias.

Definition at line 71 of file itkVariationalRegistrationNCCFunction.h.

template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
using itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::SizeType = typename FixedImageType::SizeType

Definition at line 98 of file itkVariationalRegistrationNCCFunction.h.

template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
using itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::SpacingType = typename FixedImageType::SpacingType

Definition at line 99 of file itkVariationalRegistrationNCCFunction.h.

template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
using itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::Superclass = VariationalRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField >

Definition at line 72 of file itkVariationalRegistrationNCCFunction.h.

Member Enumeration Documentation

template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
enum itk::VariationalRegistrationNCCFunction::GradientType
protected

Type of available image forces

Enumerator
GRADIENT_TYPE_WARPED 
GRADIENT_TYPE_FIXED 
GRADIENT_TYPE_SYMMETRIC 

Definition at line 156 of file itkVariationalRegistrationNCCFunction.h.

Constructor & Destructor Documentation

template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::VariationalRegistrationNCCFunction ( )
protected
template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::~VariationalRegistrationNCCFunction ( )
inlineoverrideprotected

Definition at line 145 of file itkVariationalRegistrationNCCFunction.h.

Member Function Documentation

template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
Superclass::TimeStepType itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::ComputeGlobalTimeStep ( void *  ) const
inlineoverridevirtual
template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
PixelType itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::ComputeUpdate ( const NeighborhoodType neighborhood,
void *  globalData,
const FloatOffsetType offset = FloatOffsetType(0.0) 
)
override

This method is called by a finite difference solver image filter at each pixel that does not lie on a data set boundary

template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
virtual::itk::LightObject::Pointer itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::CreateAnother ( ) const
virtual

Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.

Reimplemented from itk::LightObject.

template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
virtual const char* itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::GetNameOfClass ( ) const
virtual
template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
void itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::InitializeIteration ( )
overridevirtual

Set the object's state before each iteration.

Reimplemented from itk::VariationalRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField >.

template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
static Pointer itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::New ( )
static

Method for creation through the object factory.

template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
void itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotectedvirtual

Print information about the filter.

Reimplemented from itk::VariationalRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField >.

template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
virtual void itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::SetGradientTypeToFixedImage ( )
inlinevirtual
template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
virtual void itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::SetGradientTypeToSymmetric ( )
inlinevirtual
template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
virtual void itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::SetGradientTypeToWarpedMovingImage ( )
inlinevirtual

Member Data Documentation

template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
constexpr unsigned int itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::ImageDimension = Superclass::ImageDimension
static

Get image dimension.

Definition at line 83 of file itkVariationalRegistrationNCCFunction.h.

template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
GradientCalculatorPointer itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::m_FixedImageGradientCalculator
protected

Function to compute derivatives of the fixed image.

Definition at line 163 of file itkVariationalRegistrationNCCFunction.h.

template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
GradientType itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::m_GradientType
protected
template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
double itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::m_Normalizer
protected
template<typename TFixedImage , typename TMovingImage , typename TDisplacementField >
GradientCalculatorPointer itk::VariationalRegistrationNCCFunction< TFixedImage, TMovingImage, TDisplacementField >::m_WarpedImageGradientCalculator
protected

Function to compute derivatives of the warped image.

Definition at line 166 of file itkVariationalRegistrationNCCFunction.h.


The documentation for this class was generated from the following file: