#include <itkFFTPadImageFilter.h>
Pad an image to make it suitable for an FFT transformation.
FFT filters usually requires a specific image size. The size is decomposed in several prime factors, and the filter only supports prime factors up to a maximum value. This filter automatically finds the greatest prime factor required by the available implementation and pads the input appropriately.
This code was adapted from the Insight Journal contribution:
"FFT Based Convolution" by Gaetan Lehmann https://doi.org/10.54294/0iky0u
Definition at line 52 of file itkFFTPadImageFilter.h.
Static Public Attributes | |
static constexpr unsigned int | ImageDimension = TOutputImage::ImageDimension |
static constexpr unsigned int | InputImageDimension = TInputImage::ImageDimension |
static constexpr unsigned int | OutputImageDimension = TOutputImage::ImageDimension |
![]() | |
static constexpr unsigned int | ImageDimension |
![]() | |
static constexpr unsigned int | InputImageDimension |
static constexpr unsigned int | InputImageDimension |
static constexpr unsigned int | OutputImageDimension |
static constexpr unsigned int | OutputImageDimension |
![]() | |
static constexpr unsigned int | OutputImageDimension |
Private Attributes | |
DefaultBoundaryConditionType | m_DefaultBoundaryCondition {} |
SizeValueType | m_SizeGreatestPrimeFactor {} |
Additional Inherited Members | |
![]() | |
using | InputToOutputRegionCopierType |
using | OutputToInputRegionCopierType |
![]() | |
static const ImageRegionSplitterBase * | GetGlobalDefaultSplitter () |
static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION | ThreaderCallback (void *arg) |
![]() | |
template<typename TSourceObject> | |
static void | MakeRequiredOutputs (TSourceObject &sourceObject, const DataObjectPointerArraySizeType numberOfRequiredOutputs) |
static constexpr float | progressFixedToFloat (uint32_t fixed) |
static uint32_t | progressFloatToFixed (float f) |
![]() | |
bool | m_DynamicMultiThreading |
![]() | |
TimeStamp | m_OutputInformationMTime {} |
bool | m_Updating {} |
![]() | |
std::atomic< int > | m_ReferenceCount {} |
using itk::FFTPadImageFilter< TInputImage, TOutputImage >::BoundaryConditionType = ImageBoundaryCondition<TInputImage, TOutputImage> |
Typedef to describe the boundary condition.
Definition at line 100 of file itkFFTPadImageFilter.h.
using itk::FFTPadImageFilter< TInputImage, TOutputImage >::ConstPointer = SmartPointer<const Self> |
Definition at line 61 of file itkFFTPadImageFilter.h.
using itk::FFTPadImageFilter< TInputImage, TOutputImage >::DefaultBoundaryConditionType = ZeroFluxNeumannBoundaryCondition<TInputImage, TOutputImage> |
Definition at line 101 of file itkFFTPadImageFilter.h.
using itk::FFTPadImageFilter< TInputImage, TOutputImage >::IndexType = typename InputImageType::IndexType |
Definition at line 69 of file itkFFTPadImageFilter.h.
using itk::FFTPadImageFilter< TInputImage, TOutputImage >::InputImagePixelType = typename InputImageType::PixelType |
Definition at line 66 of file itkFFTPadImageFilter.h.
using itk::FFTPadImageFilter< TInputImage, TOutputImage >::InputImageType = TInputImage |
Some convenient type alias.
Definition at line 64 of file itkFFTPadImageFilter.h.
using itk::FFTPadImageFilter< TInputImage, TOutputImage >::OutputImagePixelType = typename OutputImageType::PixelType |
Definition at line 67 of file itkFFTPadImageFilter.h.
using itk::FFTPadImageFilter< TInputImage, TOutputImage >::OutputImageType = TOutputImage |
Definition at line 65 of file itkFFTPadImageFilter.h.
using itk::FFTPadImageFilter< TInputImage, TOutputImage >::Pointer = SmartPointer<Self> |
Definition at line 60 of file itkFFTPadImageFilter.h.
using itk::FFTPadImageFilter< TInputImage, TOutputImage >::RegionType = typename InputImageType::RegionType |
Definition at line 68 of file itkFFTPadImageFilter.h.
using itk::FFTPadImageFilter< TInputImage, TOutputImage >::Self = FFTPadImageFilter |
Standard class type aliases.
Definition at line 58 of file itkFFTPadImageFilter.h.
using itk::FFTPadImageFilter< TInputImage, TOutputImage >::SizeType = typename InputImageType::SizeType |
Definition at line 70 of file itkFFTPadImageFilter.h.
using itk::FFTPadImageFilter< TInputImage, TOutputImage >::Superclass = PadImageFilterBase<TInputImage, TOutputImage> |
Definition at line 59 of file itkFFTPadImageFilter.h.
|
protected |
Referenced by GetNameOfClass().
|
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::LightObject.
|
overrideprotectedvirtual |
Generate the information describing the output data. The default implementation of this method will copy information from the input to the output. A filter may override this method if its output will have different information than its input. For instance, a filter that shrinks an image will need to provide an implementation for this method that changes the spacing of the pixels. Such filters should call their superclass' implementation of this method prior to changing the information values they need (i.e. GenerateOutputInformation() should call Superclass::GenerateOutputInformation() prior to changing the information.
Reimplemented from itk::ProcessObject.
|
overridevirtual |
Reimplemented from itk::LightObject.
References FFTPadImageFilter().
|
virtual |
Set/Get the greatest prime factor allowed on the size of the padded image.
The filter increases the dimensional sizes of the image to reach a size with the greatest prime factor smaller or equal to the specified value. The default values is obtained from the ForwardFFTImageFilter, which is 13 for FFTW, and 5 for VNL.
A greatest prime factor of 2 produce a size which is a power of 2, and thus is suitable for vnl base fft filters. A greatest prime factor of 1 or less - typically 0 - disable the extra padding.
|
static |
Standard New method.
|
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::LightObject.
|
virtual |
Set/Get the greatest prime factor allowed on the size of the padded image.
The filter increases the dimensional sizes of the image to reach a size with the greatest prime factor smaller or equal to the specified value. The default values is obtained from the ForwardFFTImageFilter, which is 13 for FFTW, and 5 for VNL.
A greatest prime factor of 2 produce a size which is a power of 2, and thus is suitable for vnl base fft filters. A greatest prime factor of 1 or less - typically 0 - disable the extra padding.
|
staticconstexpr |
Definition at line 75 of file itkFFTPadImageFilter.h.
|
staticconstexpr |
ImageDimension constants
Definition at line 73 of file itkFFTPadImageFilter.h.
|
private |
Definition at line 116 of file itkFFTPadImageFilter.h.
|
private |
Definition at line 114 of file itkFFTPadImageFilter.h.
|
staticconstexpr |
Definition at line 74 of file itkFFTPadImageFilter.h.