VTK  9.7.1
vtkTableFFT.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2009 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-NVIDIA-USGov
4 
32 #ifndef vtkTableFFT_h
33 #define vtkTableFFT_h
34 
35 #include "vtkFFT.h" // For vtkFFT::Scaling
36 #include "vtkFiltersGeneralModule.h" // For export macro
37 #include "vtkSmartPointer.h" // For internal method.
38 #include "vtkTableAlgorithm.h"
39 
40 #include <memory> // For unique_ptr
41 
42 VTK_ABI_NAMESPACE_BEGIN
43 
44 class VTKFILTERSGENERAL_EXPORT vtkTableFFT : public vtkTableAlgorithm
45 {
46 public:
48  static vtkTableFFT* New();
49  void PrintSelf(ostream& os, vtkIndent indent) override;
50 
52 
60  vtkGetMacro(CreateFrequencyColumn, bool);
61  vtkSetMacro(CreateFrequencyColumn, bool);
62  vtkBooleanMacro(CreateFrequencyColumn, bool);
64 
66 
72  vtkGetMacro(DefaultSampleRate, double);
73  vtkSetMacro(DefaultSampleRate, double);
75 
79  enum : int
80  {
81  HANNING = 0,
86 
87  MAX_WINDOWING_FUNCTION
88  };
89 
91 
98  vtkGetMacro(WindowingFunction, int);
99  virtual void SetWindowingFunction(int);
101 
103 
112  vtkGetMacro(ReturnOnesided, bool);
113  vtkSetMacro(ReturnOnesided, bool);
114  vtkBooleanMacro(ReturnOnesided, bool);
116 
118 
131  vtkGetMacro(AverageFft, bool);
132  virtual void SetAverageFft(bool);
133  vtkBooleanMacro(AverageFft, bool);
134 
136 
146  vtkGetMacro(Normalize, bool);
147  vtkSetMacro(Normalize, bool);
148  vtkBooleanMacro(Normalize, bool);
150 
152 
154 
162  vtkGetMacro(BlockSize, int);
163  virtual void SetBlockSize(int);
165 
167 
177  vtkGetMacro(BlockOverlap, int);
178  vtkSetMacro(BlockOverlap, int);
180 
182 
190  vtkGetMacro(ScalingMethod, int);
191  vtkSetClampMacro(ScalingMethod, int, vtkFFT::Scaling::Density, vtkFFT::Scaling::Spectrum);
193 
195 
204  vtkGetMacro(Detrend, bool);
205  vtkSetMacro(Detrend, bool);
206  vtkBooleanMacro(Detrend, bool);
208 
209 protected:
210  vtkTableFFT();
211  ~vtkTableFFT() override;
212 
213  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
214  vtkInformationVector* outputVector) override;
215 
221  void Initialize(vtkTable* input);
222 
227 
228 private:
229  vtkTableFFT(const vtkTableFFT&) = delete;
230  void operator=(const vtkTableFFT&) = delete;
231 
232  // Common
233  bool CreateFrequencyColumn = false;
234  double DefaultSampleRate = 1e4;
235  bool ReturnOnesided = false;
236  bool AverageFft = false;
237  int WindowingFunction = RECTANGULAR;
238  // Direct method
239  bool Normalize = false;
240  // Welch method
241  int BlockSize = 1024;
242  int BlockOverlap = -1;
243  bool Detrend = false;
244  int ScalingMethod = 0;
245 
246  struct vtkInternal;
247  std::unique_ptr<vtkInternal> Internals;
248 };
249 
250 VTK_ABI_NAMESPACE_END
251 #endif // vtkTableFFT_h
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkTableAlgorithm * New()
Store vtkAlgorithm input/output information.
a simple class to control print indentation
Definition: vtkIndent.h:28
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:44
FFT for table columns.
Definition: vtkTableFFT.h:44
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:59
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
Superclass for algorithms that produce only vtkTables as output.
Store zero or more vtkInformation instances.