#include <itkFrequencyExpandImageFilter.h>
Expand the size of an image in the frequency domain by an integer factor in each dimension.
FrequencyExpandImageFilter increases the size of an image in the frequency domain (for example, the output of a FFTImageFilter), by an integer factor in each dimension. The output image is composed by the input image, but all the new high frequency pixels are set to Zero, no interpolation is made.
Note that the input image shouldn't be shifted by ShiftFFTImageFilter. It must conserve the following standard structure in frequency (in all dims):
N = even , f_Nyq is unique, but shared between pos and neg freqs. [ <------—f_pos ------------—f_Nyq--> ] [ <---—f_Nyq--------—f_neg ---------> ] [0 LowFreqs .. HighFreqs f_Nyquist(at N/2) HighFreqs .. LowFreqs ]
N = odd , f_Nyq has pos and neg freqs components. [ <-—f_pos —f_Nyq(N/2)---><—f_Nyq((N+1)/2) –f_neg --> ] [0 LFs .. HFs f_Nyq(at N/2) f_Nyq(at (N+1)/2) HFs .. LFs ]
The output image size in each dimension is given by:
OutputSize[j] = InputSize[j] * ExpandFactors[j]
This filter will produce an output with different pixel spacing that its input image such that:
OutputSpacing[j] = InputSpacing[j] / ExpandFactors[j]
The filter is templated over the input image, and will produce the same image type for the output.
Example (Odd): inputSize = 5 expandFactors = [2] outputSize = 10 f_pos f_neg inputImageIndices = 0 1 2 3 4 outputImageIndices = 0 1 2 [ 3 4 5 6 7 ] 8 9 [ Zeros ] So: input(4) == output(9),etc
Example (Even): inputSize = 8 expandFactors = [2] outputSize = 16 f_pos f_neg inputImageIndices = 0 1 2 3 4 (4) 5 6 7 outputImageIndices = 0 1 2 3 4 [ 5 6 7 8 9 10 11 ] 12 13 14 15 [ Zeros ] So: input(7) == output(15), etc
Paste input regions to the outputImage: the positive frequencies: index <= floor(inputSize/2.0) at the begining of the output, including zero component, and negative frequencies: index > floor(inputSize/2.0) (>= if even) at the end.
If inputSize[dim] is even, Nyquist (highest) freq is unique, but shared between negative and positive frequencies. So this freq (index=4) it is copied to the output: index >= floor(inputSize/2.0).
If the input image is generated from an FFT of a real image, then the input is hermitian; 0 (DC) I(1) == I(N-1) I(2) == I(N-2) ... I(N/2) if N=even. Unique Nyquist: shared between pos and neg freqs. OR I(N/2) == I((N+1)/2) if N=odd. Nyquist has pos and neg components.
Note that this filter doesn't require the input to be hermitian.
This code was contributed in the Insight Journal paper: https://hdl.handle.net....
Definition at line 102 of file itkFrequencyExpandImageFilter.h.
Inheritance diagram for itk::FrequencyExpandImageFilter< TImageType >:
Collaboration diagram for itk::FrequencyExpandImageFilter< TImageType >:Static Public Member Functions | |
| static Pointer | New () |
Static Public Member Functions inherited from itk::ImageToImageFilter< TImageType, TImageType > | |
| static double | GetGlobalDefaultCoordinateTolerance () |
| static double | GetGlobalDefaultCoordinateTolerance () |
| static double | GetGlobalDefaultDirectionTolerance () |
| static double | GetGlobalDefaultDirectionTolerance () |
| static void | SetGlobalDefaultCoordinateTolerance (double) |
| static void | SetGlobalDefaultCoordinateTolerance (double) |
| static void | SetGlobalDefaultDirectionTolerance (double) |
| static void | SetGlobalDefaultDirectionTolerance (double) |
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 = TImageType::ImageDimension |
Static Public Attributes inherited from itk::ImageToImageFilter< TImageType, TImageType > | |
| static constexpr unsigned int | InputImageDimension |
| static constexpr unsigned int | InputImageDimension |
| static constexpr unsigned int | OutputImageDimension |
| static constexpr unsigned int | OutputImageDimension |
Static Public Attributes inherited from itk::ImageSource< TOutputImage > | |
| static constexpr unsigned int | OutputImageDimension = TOutputImage::ImageDimension |
Private Attributes | |
| ExpandFactorsType | m_ExpandFactors |
Additional Inherited Members | |
Protected Types inherited from itk::ImageToImageFilter< TImageType, TImageType > | |
| using | InputToOutputRegionCopierType |
| using | OutputToInputRegionCopierType |
Static Protected Member Functions inherited from itk::ImageSource< TOutputImage > | |
| static const ImageRegionSplitterBase * | GetGlobalDefaultSplitter () |
| static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION | ThreaderCallback (void *arg) |
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 Attributes inherited from itk::ImageSource< TOutputImage > | |
| bool | m_DynamicMultiThreading { true } |
Protected Attributes inherited from itk::ProcessObject | |
| TimeStamp | m_OutputInformationMTime {} |
| bool | m_Updating {} |
Protected Attributes inherited from itk::LightObject | |
| std::atomic< int > | m_ReferenceCount {} |
| using itk::FrequencyExpandImageFilter< TImageType >::ConstPointer = SmartPointer<const Self> |
Definition at line 111 of file itkFrequencyExpandImageFilter.h.
| using itk::FrequencyExpandImageFilter< TImageType >::ExpandFactorsType = FixedArray<unsigned int, ImageDimension> |
The type of the expand factors representation
Definition at line 131 of file itkFrequencyExpandImageFilter.h.
| using itk::FrequencyExpandImageFilter< TImageType >::ImagePointer = typename ImageType::Pointer |
Definition at line 128 of file itkFrequencyExpandImageFilter.h.
| using itk::FrequencyExpandImageFilter< TImageType >::ImageRegionType = typename TImageType::RegionType |
Typedef to describe the output image region type.
Definition at line 120 of file itkFrequencyExpandImageFilter.h.
| using itk::FrequencyExpandImageFilter< TImageType >::ImageType = typename Superclass::InputImageType |
Inherit some types from superclass.
Definition at line 126 of file itkFrequencyExpandImageFilter.h.
| using itk::FrequencyExpandImageFilter< TImageType >::PixelType = typename ImageType::PixelType |
Definition at line 127 of file itkFrequencyExpandImageFilter.h.
| using itk::FrequencyExpandImageFilter< TImageType >::Pointer = SmartPointer<Self> |
Definition at line 110 of file itkFrequencyExpandImageFilter.h.
| using itk::FrequencyExpandImageFilter< TImageType >::Self = FrequencyExpandImageFilter |
Standard class type alias.
Definition at line 108 of file itkFrequencyExpandImageFilter.h.
| using itk::FrequencyExpandImageFilter< TImageType >::Superclass = ImageToImageFilter<TImageType, TImageType> |
Definition at line 109 of file itkFrequencyExpandImageFilter.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 |
This method causes the filter to generate its output.
Reimplemented from itk::ProcessObject.
|
overridevirtual |
FrequencyExpandImageFilter needs a smaller input requested region than the output requested region. As such, ShrinkImageFilter needs to provide an implementation for GenerateInputRequestedRegion() in order to inform the pipeline execution model.
Reimplemented from itk::ProcessObject.
|
overridevirtual |
FrequencyExpandImageFilter produces an image which is a different resolution and with a different pixel spacing than its input image. As such, FrequencyExpandImageFilter needs to provide an implementation for UpdateOutputInformation() in order to inform the pipeline execution model. The original documentation of this method is below.
Reimplemented from itk::ProcessObject.
|
virtual |
Get the expand factors.
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::ImageToImageFilter< TImageType, TImageType >.
References FrequencyExpandImageFilter().
|
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::LightObject.
|
virtual |
|
virtual |
Set the expand factors. Values are clamped to a minimum value of 1. Default is 1 for all dimensions.
|
staticconstexpr |
ImageDimension enumeration.
Definition at line 123 of file itkFrequencyExpandImageFilter.h.
|
private |
Definition at line 172 of file itkFrequencyExpandImageFilter.h.