25#ifndef vtkImageFourierFilter_h
26#define vtkImageFourierFilter_h
29#include "vtkImagingFourierModule.h"
42#define vtkImageComplexEuclidSet(C, R, I) \
46#define vtkImageComplexPolarSet(C, M, P) \
47 (C).Real = (M)*cos(P); \
50#define vtkImageComplexPrint(C) printf("(%.3f, %.3f)", (C).Real, (C).Imag)
52#define vtkImageComplexScale(cOut, S, cIn) \
53 (cOut).Real = (cIn).Real * (S); \
54 (cOut).Imag = (cIn).Imag * (S)
56#define vtkImageComplexConjugate(cIn, cOut) \
57 (cOut).Imag = (cIn).Imag * -1.0; \
58 (cOut).Real = (cIn).Real
60#define vtkImageComplexAdd(C1, C2, cOut) \
61 (cOut).Real = (C1).Real + (C2).Real; \
62 (cOut).Imag = (C1).Imag + (C2).Imag
64#define vtkImageComplexSubtract(C1, C2, cOut) \
65 (cOut).Real = (C1).Real - (C2).Real; \
66 (cOut).Imag = (C1).Imag - (C2).Imag
68#define vtkImageComplexMultiply(C1, C2, cOut) \
70 vtkImageComplex vtkImageComplex_tMultiplyTemp; \
71 vtkImageComplex_tMultiplyTemp.Real = (C1).Real * (C2).Real - (C1).Imag * (C2).Imag; \
72 vtkImageComplex_tMultiplyTemp.Imag = (C1).Real * (C2).Imag + (C1).Imag * (C2).Real; \
73 cOut = vtkImageComplex_tMultiplyTemp; \
77#define vtkImageComplexExponential(cIn, cOut) \
79 double tmp = exp(cIn.Real); \
80 cOut.Real = tmp * cos(cIn.Imag); \
81 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