#include <itkPhaseCorrelationImageRegistrationMethod.h>
Base class for phase-correlation-based image registration.
Phase Correlation Method (PCM) estimates shift between the Fixed image and Moving image. See C. D. Kuglin and D. C. Hines, The phase correlation image alignment method, in Proc. Int. Conf. on Cybernetics and Society, pp. 163-165, IEEE, Sep. 1975 for method description.
The method consists of 6 steps:
Resampling (step 0) is not included in the method itself - it is a prerequisite of PCM. It is required that the input itk::Image's have the same Spacing and Direction. If that is not the case, resample one of the images with the ResampleImageFilter prior to applying this method.
This class will zero-pad the images so they have the same real size (in all dimensions) and are multiples of FFT's supported prime factors.
Step 1. is performed by this class too using FFT filters supplied by itk::RealToHalfHermitianForwardFFTImageFilter::New() factory.
Step 2. is performed by generic PhaseCorrelationOperator supplied at run-time. PhaseCorrelationOperator can be derived to implement some special filtering during this phase.
As some special techniques (e.g. to compute subpixel shifts) require complex correlation surface, while the others compute the shift from real correlation surface.
Step 3. is there to ease registration in case of significant low and/or high frequency artifcats, such as uneven lighting or high noise.
Step 4. is carried by this class only when necessary. The IFFT filter is created using itk::HalfHermitianToRealInverseFFTImageFilter::New() factory.
Step 5. is performed with the run-time supplied PhaseCorrelationOptimizer. It has to determine the shift from the real or complex correlation surface and fixed and moving image's origins.
First, plug in the operator, optimizer and the input images. The method is executed by calling Update() (or updating some downstream filter).
The output shift can be passed downstream in the form of TranslationTransform or can be obtained as transform parameters vector. The transform can be directly used to resample the Moving image to match the Fixed image.
This class allows caching of image FFTs, because image montaging usually requires a single tile to participate in multiple image registrations.
TInternalPixelTypePixel will be used by internal filters. It should be float for integral and float inputs, and double for double inputs.
Definition at line 134 of file itkPhaseCorrelationImageRegistrationMethod.h.
Inheritance diagram for itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >:
Collaboration diagram for itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >:Static Public Member Functions | |
| static Pointer | New () |
Static Public Member Functions inherited from itk::Object | |
| static bool | GetGlobalWarningDisplay () |
| static void | GlobalWarningDisplayOff () |
| static void | GlobalWarningDisplayOn () |
| static Pointer | New () |
| static void | SetGlobalWarningDisplay (bool val) |
Static Public Member Functions inherited from itk::LightObject | |
| static void | BreakOnError () |
| static Pointer | New () |
Static Public Attributes | |
| static constexpr unsigned int | ImageDimension = FixedImageType::ImageDimension |
| static constexpr unsigned int | MovingImageDimension = MovingImageType::ImageDimension |
Protected Types | |
| using | BandBassFilterType |
| using | FixedConstantPadderType = ConstantPadImageFilter<FixedImageType, RealImageType> |
| using | FixedMirrorPadderType = MirrorPadImageFilter<FixedImageType, RealImageType> |
| using | FixedPadderImageFilter = PadImageFilter<FixedImageType, RealImageType> |
| using | FixedRoIType = RegionOfInterestImageFilter<FixedImageType, FixedImageType> |
| using | FrequencyFunctorType = std::function<typename BandBassFilterType::ValueFunctionType> |
| using | IFFTFilterType = HalfHermitianToRealInverseFFTImageFilter<ComplexImageType, RealImageType> |
| using | MovingConstantPadderType = ConstantPadImageFilter<MovingImageType, RealImageType> |
| using | MovingMirrorPadderType = MirrorPadImageFilter<MovingImageType, RealImageType> |
| using | MovingPadderImageFilter = PadImageFilter<MovingImageType, RealImageType> |
| using | MovingRoIType = RegionOfInterestImageFilter<MovingImageType, MovingImageType> |
Protected Attributes | |
| FrequencyFunctorType | m_BandPassFunctor |
| FrequencyFunctorType | m_HighPassFunctor |
| const FrequencyFunctorType | m_IdentityFunctor = [](typename BandBassFilterType::FrequencyIteratorType &) {} |
| FrequencyFunctorType | m_LowPassFunctor |
Protected Attributes inherited from itk::ProcessObject | |
| TimeStamp | m_OutputInformationMTime {} |
| bool | m_Updating {} |
Protected Attributes inherited from itk::LightObject | |
| std::atomic< int > | m_ReferenceCount {} |
Additional Inherited Members | |
Static Protected Member Functions inherited from itk::ProcessObject | |
| template<typename TSourceObject> | |
| static void | MakeRequiredOutputs (TSourceObject &sourceObject, const DataObjectPointerArraySizeType numberOfRequiredOutputs) |
| static constexpr float | progressFixedToFloat (uint32_t fixed) |
| static uint32_t | progressFloatToFixed (float f) |
|
protected |
Definition at line 445 of file itkPhaseCorrelationImageRegistrationMethod.h.
| using itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::ComplexConjugateImageType = Image<std::complex<InternalPixelType>, Self::ImageDimension> |
Type of the image, that is passed between the internal components.
Definition at line 176 of file itkPhaseCorrelationImageRegistrationMethod.h.
| using itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::ComplexImageType = typename FFTFilterType::OutputImageType |
Image's FFT type.
Definition at line 216 of file itkPhaseCorrelationImageRegistrationMethod.h.
| using itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::ConfidencesVector = typename OptimizerType::ConfidenceVector |
Confidences corresponding to offsets.
Definition at line 385 of file itkPhaseCorrelationImageRegistrationMethod.h.
| using itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::ConstPointer = SmartPointer<const Self> |
Definition at line 143 of file itkPhaseCorrelationImageRegistrationMethod.h.
| using itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::DataObjectPointer = typename DataObject::Pointer |
Smart Pointer type to a DataObject.
Definition at line 200 of file itkPhaseCorrelationImageRegistrationMethod.h.
| using itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::FFTFilterType = RealToHalfHermitianForwardFFTImageFilter<RealImageType> |
Internal FFT filter type.
Definition at line 213 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
protected |
Definition at line 440 of file itkPhaseCorrelationImageRegistrationMethod.h.
| using itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::FixedImageConstPointer = typename FixedImageType::ConstPointer |
Definition at line 154 of file itkPhaseCorrelationImageRegistrationMethod.h.
| using itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::FixedImagePixelType = typename FixedImageType::PixelType |
Definition at line 153 of file itkPhaseCorrelationImageRegistrationMethod.h.
| using itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::FixedImageType = TFixedImage |
Type of the Fixed image.
Definition at line 152 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
protected |
Definition at line 442 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
protected |
Definition at line 438 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
protected |
Types for internal componets.
Definition at line 436 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
protected |
Definition at line 448 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
protected |
Definition at line 444 of file itkPhaseCorrelationImageRegistrationMethod.h.
| using itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::InternalPixelType = TInternalPixelType |
Pixel type, that will be used by internal filters. It should be float for integral and float inputs and it should be double for double inputs
Definition at line 170 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
protected |
Definition at line 441 of file itkPhaseCorrelationImageRegistrationMethod.h.
| using itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::MovingImageConstPointer = typename MovingImageType::ConstPointer |
Definition at line 159 of file itkPhaseCorrelationImageRegistrationMethod.h.
| using itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::MovingImagePixelType = typename MovingImageType::PixelType |
Definition at line 158 of file itkPhaseCorrelationImageRegistrationMethod.h.
| using itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::MovingImageType = TMovingImage |
Type of the Moving image.
Definition at line 157 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
protected |
Definition at line 443 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
protected |
Definition at line 439 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
protected |
Definition at line 437 of file itkPhaseCorrelationImageRegistrationMethod.h.
| using itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::OffsetVector = typename OptimizerType::OffsetVector |
Resulting vector of offsets.
Definition at line 375 of file itkPhaseCorrelationImageRegistrationMethod.h.
| using itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::OperatorPointer = typename OperatorType::Pointer |
Definition at line 180 of file itkPhaseCorrelationImageRegistrationMethod.h.
| using itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::OperatorType = PhaseCorrelationOperator<InternalPixelType, ImageDimension> |
Type of the Operator
Definition at line 179 of file itkPhaseCorrelationImageRegistrationMethod.h.
| using itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::OptimizerPointer = typename OptimizerType::Pointer |
Definition at line 184 of file itkPhaseCorrelationImageRegistrationMethod.h.
| using itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::OptimizerType = PhaseCorrelationOptimizer<InternalPixelType, ImageDimension> |
Type of the Optimizer
Definition at line 183 of file itkPhaseCorrelationImageRegistrationMethod.h.
| using itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::PaddingMethodEnum = PhaseCorrelationImageRegistrationMethodEnums::PaddingMethod |
Definition at line 272 of file itkPhaseCorrelationImageRegistrationMethod.h.
| using itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::ParametersType = typename TransformType::ParametersType |
Type for the output transform parameters (the shift).
Definition at line 191 of file itkPhaseCorrelationImageRegistrationMethod.h.
| using itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::Pointer = SmartPointer<Self> |
Definition at line 142 of file itkPhaseCorrelationImageRegistrationMethod.h.
| using itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::RealImageType = Image<InternalPixelType, ImageDimension> |
Type of the image, that is passed between the internal components.
Definition at line 173 of file itkPhaseCorrelationImageRegistrationMethod.h.
| using itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::Self = PhaseCorrelationImageRegistrationMethod |
Standard class type aliases.
Definition at line 140 of file itkPhaseCorrelationImageRegistrationMethod.h.
| using itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::SizeType = Size<ImageDimension> |
Image and region size type.
Definition at line 165 of file itkPhaseCorrelationImageRegistrationMethod.h.
| using itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::Superclass = ProcessObject |
Definition at line 141 of file itkPhaseCorrelationImageRegistrationMethod.h.
| using itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::TransformOutputConstPointer = typename TransformOutputType::ConstPointer |
Definition at line 197 of file itkPhaseCorrelationImageRegistrationMethod.h.
| using itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::TransformOutputPointer = typename TransformOutputType::Pointer |
Definition at line 196 of file itkPhaseCorrelationImageRegistrationMethod.h.
| using itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::TransformOutputType = DataObjectDecorator<TransformType> |
Type for the output: Using Decorator pattern for enabling the Transform to be passed in the data pipeline
Definition at line 195 of file itkPhaseCorrelationImageRegistrationMethod.h.
| using itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::TransformPointer = typename TransformType::Pointer |
Definition at line 188 of file itkPhaseCorrelationImageRegistrationMethod.h.
| using itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::TransformType = TranslationTransform<typename MovingImageType::PointType::ValueType, ImageDimension> |
Type for the transform.
Definition at line 187 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
protected |
|
overrideprotecteddefault |
|
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::Object.
|
protected |
Determine the correct padding for the fixed image and moving image.
|
overrideprotectedvirtual |
Method invoked by the pipeline in order to trigger the computation of the registration.
Reimplemented from itk::ProcessObject.
|
overrideprotectedvirtual |
Method invoked by the pipeline to determine the output information.
Reimplemented from itk::ProcessObject.
|
inlinevirtual |
Definition at line 325 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
inlinevirtual |
Definition at line 305 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
virtual |
|
inlinevirtual |
Definition at line 350 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
inlinevirtual |
Get the confidences corresponding to offsets.
Definition at line 389 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
virtual |
|
virtual |
|
virtual |
Get the fixed image's FFT (useful for caching). Available after Update() has been called.
|
virtual |
|
virtual |
Get the moving image's FFT (useful for caching). Available after Update() has been called.
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::ProcessObject.
|
virtual |
|
inlinevirtual |
Get the computed offsets.
Definition at line 379 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
virtual |
|
virtual |
| const TransformOutputType * itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::GetOutput | ( | ) | const |
Returns the transform resulting from the registration process
|
virtual |
| const RealImageType * itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::GetPhaseCorrelationImage | ( | ) | const |
Returns the phase correlation image from the registration process
|
inlinevirtual |
Get the correlation surface.
Use method appropriate to the type (real/complex) of optimizer. If the complex optimizer is used, the real correlation surface is not available or is not up-to-date.
Definition at line 337 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
virtual |
Get the computed transformation parameters.
|
protectedvirtual |
Initialize by setting the interconnects between the components.
|
protectedvirtual |
Make a DataObject of the correct type to used as the specified output.
Every ProcessObject subclass must be able to create a DataObject that can be used as a specified output. This method is automatically called when DataObject::DisconnectPipeline() is called. DataObject::DisconnectPipeline, disconnects a data object from being an output of its current source. When the data object is disconnected, the ProcessObject needs to construct a replacement output data object so that the ProcessObject is in a valid state. So DataObject::DisconnectPipeline eventually calls ProcessObject::MakeOutput. Note that MakeOutput always returns a itkSmartPointer to a DataObject. ImageSource and MeshSource override this method to create the correct type of image and mesh respectively. If a filter has multiple outputs of different types, then that filter must provide an implementation of MakeOutput().
Reimplemented from itk::ProcessObject.
|
overrideprotectedvirtual |
Make a DataObject of the correct type to be used as the specified output.
Reimplemented from itk::ProcessObject.
|
static |
Method for creation through the object factory.
|
overrideprotectedvirtual |
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from itk::Object.
| SizeType itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::RoundUpToFFTSize | ( | SizeType | inSize | ) |
Given an image size, returns the smallest size which factorizes using FFT's prime factors.
|
inlinevirtual |
Set/Get high frequency threshold for Butterworth band-pass. Expressed in Hertz. Valid range (0.0, 1.0). If equal to 0.0 it means high pass filtering is disabled.
Definition at line 314 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
inlinevirtual |
Set/Get low frequency threshold for Butterworth band-pass. Expressed in Hertz. Valid range (0.0, 1.0). If equal to 0.0 it means low pass filtering is disabled.
Definition at line 294 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
virtual |
Set/Get the order for Butterworth band-pass filtering of complex correlation surface. Greater than zero. Default is 3.
|
virtual |
Set/Get tile cropping. Should tiles be cropped to overlapping region for computing the cross correlation? Default: True.
This improves results, and in case overlaps are less than 25% computation is also faster.
| void itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::SetFixedImage | ( | const FixedImageType * | fixedImage | ) |
Set/Get the Fixed image.
| void itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::SetFixedImageFFT | ( | const ComplexImageType * | fixedImageFFT | ) |
Set the fixed image's cached FFT.
| void itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::SetMovingImage | ( | const MovingImageType * | movingImage | ) |
Set/Get the Moving image.
| void itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::SetMovingImageFFT | ( | const ComplexImageType * | movingImageFFT | ) |
Set the moving image's cached FFT.
|
virtual |
Set/Get obligatory padding. If set, padding of this many pixels is added on both beginning and end sides of each dimension of the image.
|
virtual |
Set/Get the Operator.
|
virtual |
Set/Get the Optimizer.
| void itk::PhaseCorrelationImageRegistrationMethod< TFixedImage, TMovingImage, TInternalPixelType >::SetPaddingMethod | ( | const PaddingMethodEnum | paddingMethod | ) |
|
virtual |
Set/Get the PadToSize. Unset by setting a size of all zeroes.
If PadToSize is set, image sizes are ignored and this size is used.
If used in a montage, a maximum image size can be determined, RoundUpToFFTSize() called and the resulting size set as PadToSize.
|
overridevirtual |
Passes ReleaseDataBeforeUpdateFlag to internal filters.
Reimplemented from itk::ProcessObject.
|
overridevirtual |
Passes ReleaseDataFlag to internal filters.
Reimplemented from itk::ProcessObject.
|
protectedvirtual |
Provides derived classes with the ability to set this private var
|
protected |
Method that initiates the optimization process.
|
staticconstexpr |
Dimensionality of input and output data is assumed to be the same.
Definition at line 162 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
private |
Definition at line 480 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
protected |
Definition at line 451 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
private |
Definition at line 483 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
private |
Definition at line 482 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
private |
Definition at line 474 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
private |
Definition at line 487 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
private |
Definition at line 460 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
private |
Definition at line 462 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
private |
Definition at line 476 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
private |
Definition at line 478 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
private |
Definition at line 472 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
private |
Definition at line 470 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
private |
Definition at line 485 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
protected |
Definition at line 452 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
protected |
Definition at line 450 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
private |
Definition at line 489 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
private |
Definition at line 484 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
protected |
Definition at line 453 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
private |
Definition at line 475 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
private |
Definition at line 488 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
private |
Definition at line 459 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
private |
Definition at line 463 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
private |
Definition at line 477 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
private |
Definition at line 479 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
private |
Definition at line 473 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
private |
Definition at line 471 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
private |
Definition at line 467 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
private |
Definition at line 456 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
private |
Definition at line 457 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
private |
Definition at line 468 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
private |
Definition at line 466 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
private |
Definition at line 465 of file itkPhaseCorrelationImageRegistrationMethod.h.
|
staticconstexpr |
Definition at line 394 of file itkPhaseCorrelationImageRegistrationMethod.h.