#include <itkPhaseCorrelationOperator.h>
The class is templated over the registration method type, in which it has to be plugged in.
The two input spectrums may have different size, while their real size is the same. To subsample them to same resolution, high frequencies must be excluded.
Then is computed freaquency ratio at every index of output correlation surface.
This class provides interface for further techniques to improve the registration performance. Method AdjustOutputInformation() enables for example to limit the computation only to low frequencies. Method ComputeAtIndex() computes a frequency ratio at single index of output image and overriding it may enable some special weighting or filtering.
Public Types | |
typedef itk::Image< ComplexPixelType, pcm::Dimension > | ComplexImageType |
Typedef to images. | |
Public Member Functions | |
itkNewMacro (Self) | |
Method for creation through the object factory. | |
itkTypeMacro (PhaseCorrelationOperator, ImageToImageFilter) | |
Run-time type information (and related methods). | |
itkStaticConstMacro (ImageDimension, unsigned int, Dimension) | |
ImageDimension enumeration. | |
void | SetFixedImage (ComplexImageType *) |
Connect the fixed image. | |
void | SetMovingImage (ComplexImageType *) |
Connect the moving image. | |
virtual void | GenerateOutputInformation () |
PhaseCorrelationOperator produces an image which is a different resolution and with a different pixel spacing than its input images. | |
virtual void | GenerateInputRequestedRegion () |
PhaseCorrelationOperator needs a larger input requested region than the output requested region. | |
Protected Member Functions | |
void | ThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, int threadId) |
PhaseCorrelationOperator can be implemented as a multithreaded filter. | |
virtual void | AdjustOutputInformation (typename ComplexImageType::SpacingType &spacing, typename ComplexImageType::IndexType &index, typename ComplexImageType::SizeType &size) |
After the largest possible output data size is determined is this method called to additionally adjust the output parameters (reduce the size). | |
virtual ComplexPixelType | ComputeAtIndex (typename ComplexImageType::IndexType &outputIndex, ComplexPixelType &fixedValue, ComplexPixelType &movingValue) |
Computes a phase correlation ratio for single frequency index. |
typedef itk::Image< ComplexPixelType, pcm::Dimension > pcm::PhaseCorrelationOperator< TFixedImage, TMovingImage >::ComplexImageType |
Typedef to images.
pcm::PhaseCorrelationOperator< TFixedImage, TMovingImage >::itkNewMacro | ( | Self | ) |
Method for creation through the object factory.
pcm::PhaseCorrelationOperator< TFixedImage, TMovingImage >::itkTypeMacro | ( | PhaseCorrelationOperator< TFixedImage, TMovingImage > | , | |
ImageToImageFilter | ||||
) |
Run-time type information (and related methods).
pcm::PhaseCorrelationOperator< TFixedImage, TMovingImage >::itkStaticConstMacro | ( | ImageDimension | , | |
unsigned | int, | |||
Dimension | ||||
) |
ImageDimension enumeration.
void pcm::PhaseCorrelationOperator< TFixedImage, TMovingImage >::SetFixedImage | ( | ComplexImageType * | ) |
Connect the fixed image.
void pcm::PhaseCorrelationOperator< TFixedImage, TMovingImage >::SetMovingImage | ( | ComplexImageType * | ) |
Connect the moving image.
virtual void pcm::PhaseCorrelationOperator< TFixedImage, TMovingImage >::GenerateOutputInformation | ( | ) | [virtual] |
PhaseCorrelationOperator produces an image which is a different resolution and with a different pixel spacing than its input images.
virtual void pcm::PhaseCorrelationOperator< TFixedImage, TMovingImage >::GenerateInputRequestedRegion | ( | ) | [virtual] |
PhaseCorrelationOperator needs a larger input requested region than the output requested region.
void pcm::PhaseCorrelationOperator< TFixedImage, TMovingImage >::ThreadedGenerateData | ( | const OutputImageRegionType & | outputRegionForThread, | |
int | threadId | |||
) | [protected] |
PhaseCorrelationOperator can be implemented as a multithreaded filter.
This method performs the computation.
virtual void pcm::PhaseCorrelationOperator< TFixedImage, TMovingImage >::AdjustOutputInformation | ( | typename ComplexImageType::SpacingType & | spacing, | |
typename ComplexImageType::IndexType & | index, | |||
typename ComplexImageType::SizeType & | size | |||
) | [inline, protected, virtual] |
After the largest possible output data size is determined is this method called to additionally adjust the output parameters (reduce the size).
The method is called in GenerateOutputInformation() method, so the input spacing, index and size can be determined from the inputs 0 (fixed image) and 1 (moving image).
This method empty here and can be reimplemented by child filters.
virtual ComplexPixelType pcm::PhaseCorrelationOperator< TFixedImage, TMovingImage >::ComputeAtIndex | ( | typename ComplexImageType::IndexType & | outputIndex, | |
ComplexPixelType & | fixedValue, | |||
ComplexPixelType & | movingValue | |||
) | [protected, virtual] |
Computes a phase correlation ratio for single frequency index.
This method is taken out from the computation in ThreadedGenerateData() to enable child filters to reimplement it in order to perform special computations at certain frequencies.
?! This is still open problem, whether to ease the development of new operator filter and slow the computation by calling such method at every index, or whether to let the implementor of new operator reimplement entire ThreadedGenerateData() method (copying common parts and rewriting new parts).