13#ifndef vtkImageFourierFilter_h
14#define vtkImageFourierFilter_h
17#include "vtkImagingFourierModule.h"
23VTK_ABI_NAMESPACE_BEGIN
31#define vtkImageComplexEuclidSet(C, R, I) \
38#define vtkImageComplexPolarSet(C, M, P) \
41 (C).Real = (M)*cos(P); \
42 (C).Imag = (M)*sin(P); \
45#define vtkImageComplexPrint(C) \
48 printf("(%.3f, %.3f)", (C).Real, (C).Imag); \
51#define vtkImageComplexScale(cOut, S, cIn) \
54 (cOut).Real = (cIn).Real * (S); \
55 (cOut).Imag = (cIn).Imag * (S); \
58#define vtkImageComplexConjugate(cIn, cOut) \
61 (cOut).Imag = (cIn).Imag * -1.0; \
62 (cOut).Real = (cIn).Real; \
65#define vtkImageComplexAdd(C1, C2, cOut) \
68 (cOut).Real = (C1).Real + (C2).Real; \
69 (cOut).Imag = (C1).Imag + (C2).Imag; \
72#define vtkImageComplexSubtract(C1, C2, cOut) \
75 (cOut).Real = (C1).Real - (C2).Real; \
76 (cOut).Imag = (C1).Imag - (C2).Imag; \
79#define vtkImageComplexMultiply(C1, C2, cOut) \
81 vtkImageComplex vtkImageComplex_tMultiplyTemp; \
82 vtkImageComplex_tMultiplyTemp.Real = (C1).Real * (C2).Real - (C1).Imag * (C2).Imag; \
83 vtkImageComplex_tMultiplyTemp.Imag = (C1).Real * (C2).Imag + (C1).Imag * (C2).Real; \
84 cOut = vtkImageComplex_tMultiplyTemp; \
88#define vtkImageComplexExponential(cIn, cOut) \
90 double tmp = exp(cIn.Real); \
91 cOut.Real = tmp * cos(cIn.Imag); \
92 cOut.Imag = tmp * sin(cIn.Imag); \
Filters that execute axes in series.
Superclass that implements complex numbers.
void ExecuteRfft(vtkImageComplex *in, vtkImageComplex *out, int N)
This function calculates the whole fft of an array.
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Override to change extent splitting rules.
~vtkImageFourierFilter() override=default
void ExecuteFft(vtkImageComplex *in, vtkImageComplex *out, int N)
This function calculates the whole fft of an array.
void ExecuteFftStepN(vtkImageComplex *p_in, vtkImageComplex *p_out, int N, int bsize, int n, int fb)
void ExecuteFftStep2(vtkImageComplex *p_in, vtkImageComplex *p_out, int N, int bsize, int fb)
vtkImageFourierFilter()=default
void PrintSelf(ostream &os, vtkIndent indent) override
Construct an instance of vtkImageDecomposeFilter filter with default dimensionality 3.
void ExecuteFftForwardBackward(vtkImageComplex *in, vtkImageComplex *out, int N, int fb)
a simple class to control print indentation